Cross compilation error finding libraries


Bel Hadj Salem Talel
 

Hi All,

I have an SDK populated from an image.
After sourcing the SDK env file, I try to run make on a project with this command :
make CC="$CC" LD="$LD" CFLAGS="${CFLAGS} --sysroot=/media/talel/data/sdk-multigate/sysroots/aarch64-poky-linux" CXXFLAGS="${CXXFLAGS} --sysroot=/media/talel/data/sdk-multigate/sysroots/aarch64-poky-linux"
I specified the CFLAGS and CXXFLAGS as mentionned in Yocto document (part 5.2 Makefile-Based projects) : https://www.yoctoproject.org/docs/1.1.2/adt-manual/adt-manual.html
Now I have this error:


** Building dynamic library (debug, shared) /home/talel/Documents/macchina.io/samples/LinuxThermalSimple/bin/Linux/x86_64/io.macchina.linux-thermal-simpled.so
aarch64-poky-linux-g++ -shared -Wl,-soname,io.macchina.linux-thermal-simpled.so -o /home/talel/Documents/macchina.io/samples/LinuxThermalSimple/bin/Linux/x86_64/io.macchina.linux-thermal-simpled.so  /home/talel/Documents/macchina.io/samples/LinuxThermalSimple/obj/Linux/x86_64/debug_shared/LinuxThermalSensor.o /home/talel/Documents/macchina.io/samples/LinuxThermalSimple/obj/Linux/x86_64/debug_shared/BundleActivator.o -L/home/talel/Documents/macchina.io/lib/Linux/x86_64 -L/home/talel/Documents/macchina.io/platform/lib/Linux/x86_64  -lIoTDevicesd -lPocoRemotingNGd -lPocoOSPd -lPocoUtild -lPocoXMLd -lPocoFoundationd  -lpthread -ldl -lrt
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find crti.o: No such file or directory
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find crtbeginS.o: No such file or directory
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lIoTDevicesd
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lPocoRemotingNGd
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lPocoOSPd
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lPocoUtild
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lPocoXMLd
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lPocoFoundationd
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lpthread
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -ldl
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lrt
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lstdc++
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lm
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lgcc_s
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lc
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find -lgcc_s
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find crtendS.o: No such file or directory
/media/talel/data/sdk-multigate/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/9.2.0/real-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
/home/talel/Documents/macchina.io/platform/build/rules/dylib:54: recipe for target '/home/talel/Documents/macchina.io/samples/LinuxThermalSimple/bin/Linux/x86_64/io.macchina.linux-thermal-simpled.so' failed
make: *** [/home/talel/Documents/macchina.io/samples/LinuxThermalSimple/bin/Linux/x86_64/io.macchina.linux-thermal-simpled.so] Error 1

I need help.
Thanks, Talel

Join yocto@lists.yoctoproject.org to automatically receive all group messages.