C++ compiler problems on b4860 target

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C++ compiler problems on b4860 target

960 Views
chandramills
Contributor I

I am using the SDK 1.8 and build an image.  I include dev-pkgs and tools-dev in the Yocto build image.  I try to compile and a *.cc file and I get the following error:

make[2]: Warning: File `lib/CMakeFiles/gnuradio-l3mod.dir/flags.make' has modification time 3.9e+0

2 s in the future                                                                                

Scanning dependencies of target gnuradio-l3mod                                                   

make[2]: warning:  Clock skew detected.  Your build may be incomplete.                           

make[2]: Warning: File `lib/CMakeFiles/gnuradio-l3mod.dir/flags.make' has modification time 3.9e+0

2 s in the future                                                                                

[ 16%] Building CXX object lib/CMakeFiles/gnuradio-l3mod.dir/l3_impl.cc.o                        

In file included from /usr/include/boost/config.hpp:40:0,                                        

                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,                            

                 from /usr/include/boost/shared_ptr.hpp:17,                                      

                 from /usr/include/gnuradio/types.h:27,                                          

                 from /usr/include/gnuradio/runtime_types.h:27,                                  

                 from /usr/include/gnuradio/io_signature.h:27,                                   

                 from /home/root/gr-l3mod/lib/l3_impl.cc:25:                                     

/usr/include/boost/config/select_stdlib_config.hpp:18:21: fatal error: cstddef: No such file or di

rectory                                                                                          

#  include <cstddef>                                                                            

                     ^                                                                           

compilation terminated.                                                                          

make[2]: *** [lib/CMakeFiles/gnuradio-l3mod.dir/l3_impl.cc.o] Error 1                            

make[1]: *** [lib/CMakeFiles/gnuradio-l3mod.dir/all] Error 2                                     

make: *** [all] Error 2                                                                          

root@b4860:~/gr-l3mod/build#

I looks like the standard include path for the compiler is not being set right.  How can I fix this?

C-

0 Kudos
2 Replies

692 Views
Pavel
NXP Employee
NXP Employee

Use SDK toolchain for your software compiling. Use the following command sequence:

(http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F3069706.html).

(https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-16DBC8E2-9A18-4867-9BE1-1...)

Build and install the standalone toolchain with Yocto:

$ source ./fsl-setup-poky -m <machine>

$ bitbake fsl-toolchain

$ cd build_<machine>_release/tmp/deploy/sdk

$ ./fsl-networking-eglibc-<host-system>-<core>-toolchain-<release>.sh

Note: The default installation path for standalone toolchain is /opt/. The install folder can be specified during the installation procedure.

Command sequence example for the LS1043A SDK 2.0.

sudo chmod 777 /opt/fsl-qoriq/2.0/environment-setup-ppce6500-fsl-linux

Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.

$ source /opt/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux

source /opt/fsl-qoriq/2.0/environment-setup-ppce6500-fsl-linux

Check result of "source" command. Use "echo $PATH" command. The "source" command should add path to gcc compiler.

You should see similar message:

echo $PATH

bash: /opt/fsl-qoriq/1.9/sysroots/x86_64-fslsdk-linux/usr/bin:/opt/fsl-qoriq/1.9/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe:

CC test.c -o test.elf

Use similar command sequence for the b4860 and SDK 1.8.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

692 Views
chandramills
Contributor I

My first error I posted was running on the target platform (b4860qds-64b). Your response is related to the development platform that Yocto is building on.  How do I get the right toolchain on the target platform so that the cstddef is found correctly?

0 Kudos