AnsweredAssumed Answered

Problem compiling on t4240rdb - g++ can't find iostream or cmath includes

Question asked by nick caruso on Feb 29, 2016

I'm taking over a large code base which already compiles and runs on our T4240QDS machine, and I need to get it to compile on a newer T4240RDB.

 

I can find the header files for iostream and cmath on my T4240RDB machine, but the software build fails with

 

--------------------------------------------------------------------------------------------------------------------

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I. -I. -I/home/imn/jenkins/workspace/T4240-Build/IMN-Core/build/include -I/home/imn/jenkins/workspace/T4240-Build/IMN-Core/build/include -g -O2 -MT tif_stream.lo -MD -MP -MF .deps/tif_stream.Tpo -c tif_stream.cxx  -fPIC -DPIC -o .libs/tif_stream.o

tif_stream.cxx:31:20: fatal error: iostream: No such file or directory

#include <iostream>

                    ^

compilation terminated.

-------------------------------------------------------------------------------------------------------------------

 

I know iostream is installed:

--------------------------------------------------------------------------------------------------------------------

tiff-3.8.2/libtiff$ find /usr/include/ -name "iostream*"

/usr/include/c++/4.9.2/iostream

--------------------------------------------------------------------------------------------------------------------

 

And if I try to force g++ to look there with -I, I get:

--------------------------------------------------------------------------------------------------------------------

g++ -DHAVE_CONFIG_H -I. -I/usr/include/c++/4.9.2/ -I/home/imn/jenkins/workspace/T4240-Build/IMN-Core/build/include -I/home/imn/jenkins/workspace/T4240-Build/IMN-Core/build/include -g -O2 -MT tif_stream.lo -MD -MP -MF .deps/tif_stream.Tpo -c tif_stream.cxx  -fPIC -DPIC -o .libs/tif_stream.o

 

In file included from tif_stream.cxx:31:0:

/usr/include/c++/4.9.2/iostream:38:28: fatal error: bits/c++config.h: No such file or directory

#include <bits/c++config.h>

--------------------------------------------------------------------------------------------------------------------

 

That file is in /usr/include/c++/4.9.2/powerpc64-fsl-linux/, and if I include that, the compile succeeds.

 

Clearly, something is configured incorrectly.  The T4240RDB is running a system image that I built using the NXP SDK tools, using "bitbake fsl-image-full".

 

What am I missing?

 

Thanks!

Outcomes