From: Andreas Ziegler <br015@umbiko.net>
To: C D <dellicker@live.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] Forcing linker to look at right library path?
Date: Tue, 14 Mar 2023 07:46:16 +0000 [thread overview]
Message-ID: <70f71def3775c5412b70ddae1b3caac0@umbiko.net> (raw)
In-Reply-To: <mailman.10087.1678750430.50374.buildroot@buildroot.org>
Hi Chris,
On 2023-03-13 23:33, C D <dellicker@live.com> wrote:
>
> Good afternoon,
>
> 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.
Did you use BR2_TOOLCHAIN_EXTRA_LIBS? I would expect them to appear
under /usr/lib[64] on the target.
> 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 libraries and pkg-config files need to be present in the toolchain
directory, usually located under output/host/<toolchain-name>/sysroot
(normally ./usr/lib and ./usr/lib/pkg-config).
> 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?
This is highly specific to (a) the build system used and (b) the
interaction between Buildroot's and the package's make file.
Standard include paths for headers and libraries are preset in the
toolchain binaries.
Buildroot sets the binary path, and standard environment variables
before executing make in the package build directory.
If your Makefile uses variables that can be overridden, set them from
the Buildroot package make file, using e.g. CONF_ENV (autotools) or
MAKE_ENV (generic).
If the project Makefile uses pkg-config to determine include paths, you
need a build-time dependency on host-pkgconf (and probably set
PKG_CONFIG_PATH).
>
> Thanks,
> Chris
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next parent reply other threads:[~2023-03-14 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.10087.1678750430.50374.buildroot@buildroot.org>
2023-03-14 7:46 ` Andreas Ziegler [this message]
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
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
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=70f71def3775c5412b70ddae1b3caac0@umbiko.net \
--to=br015@umbiko.net \
--cc=buildroot@buildroot.org \
--cc=dellicker@live.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.