I am currently having issues building my application with the latest toolchain. I have used the new capabilities of it being relocatable to place it somewhere sensible and I think this may be what is breaking it. My old toolchain in /opt still works perfectly. The error I receive is: /home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: cannot find crtbegin.o: No such file or directory collect2: error: ld returned 1 exit status make: *** [R0005] Error 1 However, crtbeign.o is at the path: [jack@archHP armv7a-vfp-neon-poky-linux-gnueabi]$ pwd /home/jack/Projects/R0005-SDK-210912/sysroots/armv7a-vfp-neon-poky-linux-gnueabi [jack@archHP armv7a-vfp-neon-poky-linux-gnueabi]$ find . -name crtbegin.o ./usr/lib/arm-poky-linux-gnueabi/4.7.2/crtbegin.o [jack@archHP armv7a-vfp-neon-poky-linux-gnueabi]$ ls usr/lib lib/ libexec/ [jack@archHP armv7a-vfp-neon-poky-linux-gnueabi]$ ls usr/libexec/ pt_chown [jack@archHP armv7a-vfp-neon-poky-linux-gnueabi]$
Exact steps: bitbake meta-toolchain run toolchain setup script tell application to use new toolchain and sysroot compile This was appearing before the patches that were merged today. Works fine when installed in default location. Some more verbose output: /home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/as -v -I /home/jack/Projects/R0005-SDK-210912/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/include -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -meabi=5 -o src/systemConfig.o /tmp/ccr24jiu.s GNU assembler version 2.22 (arm-poky-linux-gnueabi) using BFD version (GNU Binutils) 2.22 COMPILER_PATH=/home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/:/home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/ LIBRARY_PATH=/home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../lib/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/:/home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../lib/armv7a-vfp-neon-poky-linux-gnueabi/gcc/ COLLECT_GCC_OPTIONS='-I' '/home/jack/Projects/R0005-SDK-210912/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/include' '-O0' '-mfpu=neon' '-mfloat-abi=softfp' '-mcpu=cortex-a8' '-g3' '-Wall' '-Wextra' '-c' '-fmessage-length=0' '-v' '-MMD' '-MP' '-MF' 'src/systemConfig.d' '-MT' 'src/systemConfig.d' '-o' 'src/systemConfig.o' '-mtls-dialect=gnu' /home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: cannot find crt1.o: No such file or directory /home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: cannot find crti.o: No such file or directory /home/jack/Projects/R0005-SDK-210912/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/../../libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: cannot find crtbegin.o: No such file or directory /lib/libpthread.so.0: file not recognized: File format not recognized collect2: error: ld returned 1 exit status make: *** [R0005] Error 1
Jack, Just want to confirm that the error shows with the toolchain generatd with the most recent patch that Laurentiu sent and merged into master (as of last night or today as to which time zone we're talking about), right? Also, why chang this to target 1.1.2. The relocatable SDK is a new feature in 1.3, so not applicatible to anything prior to 1.3
Hi Jessica, I performed a git pull at around 4pm GMT - I cannot tell you the revision until I am back at work on Monday. I imagine it would be: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=30b7781650e3ff092d04889beab2e87eaff29cdb Best Regards, Jack.
Created attachment 832 [details] c++ test application
Created attachment 833 [details] Compilation output
I created a small C++ test app and tested if it compiles with both mips and arm toolchains I just generated. It compiled just fine! No error about not finding the crt*.o objects. I attached both the test app and the compilation output. I'm afraid I'm gonna need more info about your setup. At my end, it just works! Steps I followed: $ MACHINE=qemuarm bitbake meta-toolchain-sdk $ bash tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-gmae-1.2+snapshot-20120921.sh $ source environment-setup-armv5te-poky-linux-gnueabi $ make $ qemu-arm ../sdk/sysroots/armv5te-poky-linux-gnueabi/lib/ld-linux.so.3 --library-path ../sdk/sysroots/armv5te-poky-linux-gnueabi/lib:../sdk/sysroots/armv5te-poky-linux-gnueabi/usr/lib ./test_hw Constructor! Hello World! Destructor!
Created attachment 834 [details] Compilation Output You can see there are still some reference to /opt in the output, however I have no idea where they're coming from.
It might also be worth noting that my application is a C application rather than C++. I am also compiling from within Eclipse using thier own autmatic makefiles and I do not pass it a sysroot, but instead I pass it the sysroot lib and include directories.
Created attachment 835 [details] Make output
From the make.output it looks like the crt*.o objects are found just fine if running make manually... It might be an Eclipse plugin issue here not creating the Makefiles correctly and/or not sourcing the environment properly.
Ok, can I just note that I am not using the Yocto Elclipse Plugin here but a standard Eclipse project configured to use the toolchain.
Jack, Is there any particular reason that you're not passing eclipse project a sysroot and instead of your sysroot include and lib sub-dirs? Also, please pass the sysroot as the root directory of your sysroot per your setup, for you case, "-sysroot=/home/jack/Projects/R0005-SDK-210912/sysroots"
This is now fixed. I needed to pass the --sysroot flag to both the compiler AND the linker - I had tried the sysroot flag with one but not realised that it didn't also set it for the other. Thank you for your help everyone, sorry for wasting your time!
Closing, problem solved.
verified