From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: C D <dellicker@live.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] Forcing linker to look at right library path?
Date: Tue, 14 Mar 2023 08:58:23 +0100 [thread overview]
Message-ID: <20230314085823.5a37e5e9@windsurf> (raw)
In-Reply-To: <SJ0PR05MB7625D8C1B77DE29365DEDB13D4B99@SJ0PR05MB7625.namprd05.prod.outlook.com>
Hello,
On Mon, 13 Mar 2023 23:33:45 +0000
C D <dellicker@live.com> wrote:
> I'm running in to an issue with a package linking against libubsan
> and libasan. I've figured out how to compile Buildroot so that it
> copies those libraries to the correct output/target/lib and
> output/target/lib64 locations, but it seems like the package is
> linking to the versions installed in my OS (RHEL 8.7) in /usr/lib64
> instead.
>
> So, in /usr/lib64 I have libasan.so.5 and libubsan.so.1, and in
> Buildroot's output/target/lib64 I have libasan.so.6; when I boot into
> Buildroot and run my program, it errors out because it's looking for
> libasan.so.5.
The Buildroot cross-compiler doesn't look for libraries in
target/usr/lib, but in staging/usr/lib. Having shared libraries in
target/usr/lib is important for your applications to work at run-time
on the target, but those shared libraries should also be present in
staging/usr/lib for the cross-compiler to find them at build time.
> What do I need to do for it to point to the correct library location
> when linking? Is this a Buildroot config option, or something I need
> to set up in my Makefile?
The answer entirely depends on which package you're trying to build.
However, first thing would be to make sure that libasan and libubsan
are both in staging/usr/lib. This should already help significantly, as
it means the cross-compiler will find them.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-03-14 7:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 23:33 [Buildroot] Forcing linker to look at right library path? C D
2023-03-14 7:58 ` Thomas Petazzoni via buildroot [this message]
2023-03-14 18:43 ` C D
2023-03-14 21:07 ` Thomas Petazzoni via buildroot
2023-03-15 7:18 ` Peter Korsgaard
2023-03-15 19:59 ` C D
[not found] <mailman.10087.1678750430.50374.buildroot@buildroot.org>
2023-03-14 7:46 ` Andreas Ziegler
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=20230314085823.5a37e5e9@windsurf \
--to=buildroot@buildroot.org \
--cc=dellicker@live.com \
--cc=thomas.petazzoni@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.