From: "Khem Raj" <raj.khem@gmail.com>
To: Bel Hadj Salem Talel <bhstalel@gmail.com>, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Cross compilation error finding libraries
Date: Tue, 27 Oct 2020 08:29:05 -0700 [thread overview]
Message-ID: <0187eef8-2c60-1faf-7b23-7b0e096b69a1@gmail.com> (raw)
In-Reply-To: <jNpM.1603792334866771604.SbqP@lists.yoctoproject.org>
On 10/27/20 2:52 AM, Bel Hadj Salem Talel wrote:
> 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.
I see that your linker is not using proper sysroot perhaps using
LD=${CC} might help.
> Thanks, Talel
>
>
>
>
next prev parent reply other threads:[~2020-10-27 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 9:52 Cross compilation error finding libraries Bel Hadj Salem Talel
2020-10-27 15:29 ` Khem Raj [this message]
2020-10-27 16:41 ` Bel Hadj Salem Talel
2020-10-27 19:01 ` [yocto] " Khem Raj
2020-10-29 15:15 ` Bel Hadj Salem Talel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0187eef8-2c60-1faf-7b23-7b0e096b69a1@gmail.com \
--to=raj.khem@gmail.com \
--cc=bhstalel@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox