Applications, development tools, FPGA, C, WEB
#4555 by xyefa
Wed Mar 09, 2016 8:56 pm

My gcc version is gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)

I followed the build instructions here: ... /

Everything was fine until I got to CMake, which failed to build.

In Directory: /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-

In file included from /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake- In member function ‘void cmsys_ios::istringstream::clear(int)’:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake- error: invalid conversion from ‘int’ to ‘std::ios_base::iostate {aka std::_Ios_Iostate}’ [-fpermissive]

The CMake mailing list seems to point to an issue with building CMake with GCC 5.1 (and very likely anything newer). The link is here: ... 60486.html

However the work-around is not very clear. As I understand it, the test for configure is having a hard time finding the sstream functions (which are defined in iostream). It should find these in the c++ library ...

The output of my ./configure was:

/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-$ ./configure
CMake, Copyright 2000-2012 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: gmake
g++ is GNU compiler
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ does not have sstream
g++ does not have strstream.h
g++ does not have strstrea.h
g++ does not have operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator<>::rebind<>
g++ does not have non-standard allocator<>::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use <>
g++ supports member templates
g++ has standard template specialization syntax
g++ has argument dependent lookup
g++ has struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping

#4564 by xyefa
Thu Mar 10, 2016 7:12 pm
So it looks like these errors are tied to gcc 5.1 or greater and CMake ... I also had to patch ncurses which did not like gcc 5.1 (or greater). There is a known patch for ncurses and it worked.

In order to build the RedPitaya Ecosystem on my Ubuntu box which is running gcc 5.2 I might have to step down to gcc 4.9 or try to fix the CMake issue ...

Still poking around.
#4565 by Nils Roos
Thu Mar 10, 2016 7:18 pm
It seems likely that these are the root causes - I recently set up a fresh build vm with the recommended components and it worked without a hitch. So I'd say the source itself is in the clear.
#4618 by xyefa
Tue Mar 15, 2016 7:32 pm
The issue turned out to be the Xilinx libstdc++ being picked up as opposed to the standard libstdc++. I unset the LD_LIBRARY_PATH and CMake got built. The Xilinx lib directory was the only thing defined in the LD_LIBRARY_PATH
#4628 by xyefa
Wed Mar 16, 2016 2:11 am
Hello Nils,

Our systems are different. If I run it on Ubuntu 14.04, very likely things will work.

My machine is Ubuntu 15.10, which is using a newer gcc ...

dev@testbox:~$ uname -a
Linux 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

dev@testbox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
#4633 by Nils Roos
Wed Mar 16, 2016 10:37 pm
OK, I got a couple of things for you:

  1. get these two packages - they do not interfere with your 5.1 toolchain

    Code: Select allsudo apt-get install gcc-4.9-multilib g++-4.9-multilib

  2. put a new directory "cmake" into OS/buildroot/patches and copy the following patch into it:

  3. The problem with nginx is actually that it has a home-brewed autoconfiguration procedure, which picks up the host toolchain instead of the crosscompiler and derives the wrong compiler options ("-Wno-unused" instead of the correct "-Wno-unused-parameter") for gcc versions >=5 . Replace patches/nginx.patch with this:

  4. call make with the following parameters

    Code: Select allmake HOSTCC=gcc-4.9 HOSTCPP=cpp-4.9 HOSTCXX=g++-4.9

I tested all this on a 15.10 VM. The workaround for ncurses is not neccessary with the older toolchain, and neither is clearing LD_LIBRARY_PATH.
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 4 guests