From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [autobuild.buildroot.net] Build results for 2017-01-24
Date: Thu, 09 Feb 2017 21:02:49 +0100 [thread overview]
Message-ID: <1486670569.4238.1.camel@embedded.rocks> (raw)
In-Reply-To: <CAHXCMMJ_bNBo+dx3N1ugJQmJQxCvc+PaWjY93oYCi1nTBQQTew@mail.gmail.com>
Hi,
On Tue, 2017-02-07 at 14:29 +0100, Samuel Martin wrote:
> On Tue, Feb 7, 2017 at 2:00 PM, J?rg Krause <joerg.krause@embedded.ro
> cks> wrote:
> > Hi Samuel,
> >
> > On Tue, 2017-02-07 at 12:28 +0100, Samuel Martin wrote:
> > > J?rg, all,
> > >
> > > On Tue, Feb 7, 2017 at 12:38 AM, J?rg Krause
> > > <joerg.krause@embedded.rocks> wrote:
> > > > Hi Samuel,
> > > >
> >
> > [snip]
> >
> > > >
> > > > Version 3.6.3 works, too. So, I did a git bisect. The rpath
> > > > issue
> > > > was
> > > > introduced in "Teach find_library and find_package to search
> > > > lib32
> > > > paths" [1].
> > >
> > > Thanks for the investigation!
> > >
> > > >
> > > > Any ideas how to fix this?
> > >
> > > Not so far :-/
> >
> > Ray Donnely proposed a potential fix for this issue [1] on the
> > CMake
> > mailing list. I have not tried the patch so far.
>
> Good to know CMake folks are already on this issue.
I had a closer look on why the rpath '/usr/lib32' is used in CMake 3.7.
This upstream commit [1] adds a property `FIND_LIBRARY_USE_LIB32_PATHS`
which is set to TRUE for the Linux platform [2]. This changes the
behavior of `find_library()`. Before the commit `/sysroot/usr/lib` was
found as library path, but now it's `/sysroot/usr/lib32`.
When determining the runtime search path, CMake compares the pathes
found by `find_library()` with a list of implicit runtime pathes. This
list contains `/sysroot/usr/lib` but not `/sysroot/usr/lib32`.
If the library path found by `find_library()` matches a search path
from the list of implicit runtime pathes it is dropped, otherwise it is
added to rpath after removing the `/sysroot` path.
As the implicit runtime search pathes does not contain
`/sysroot/usr/lib32` the rpath is set to `/usr/lib32`.
Note, that this is true not only for bctoolbox but for all CMake
packages!
The behavior of determining the runtime path is controlled by the
property `FIND_LIBRARY_USE_LIB32_PATHS`. As already mentioned, the
value is set to `TRUE` for the Linux platfrom. I tried to overwrite the
property in the toolchain file, without any luck.
Another possibility might be to add `/sysroot/usr/lib32` to the list of
implicit link directories, but using
`CMAKE_C_IMPLICIT_LINK_DIRECTORIES` in the toolchain file did not work
for me.
An approach which worked for me was to remove the `CMAKE_SYSTEM_NAME`
setting from the toolchain file. This way, I was able to set the
`FIND_LIBRARY_USE_LIB32_PATHS` property to `FALSE` and `/usr/lib32` was
not set as rpath anymore.
Samuel, do you have any idea how to set the property
`FIND_LIBRARY_USE_LIB32_PATHS` without removing `CMAKE_SYSTEM_NAME`
from the toolchain file?
Or is there any other solution?
[1] https://gitlab.kitware.com/cmake/cmake/commit/896ad251de49f167f4ce3
cbbcf9a6cce85a16681
[2] https://gitlab.kitware.com/cmake/cmake/blob/896ad251de49f167f4ce3cb
bcf9a6cce85a16681/Modules/Platform/Linux.cmake#L56
J?rg
prev parent reply other threads:[~2017-02-09 20:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 7:30 [Buildroot] [autobuild.buildroot.net] Build results for 2017-01-24 Thomas Petazzoni
2017-01-25 21:05 ` Jörg Krause
2017-01-25 21:15 ` Baruch Siach
2017-01-26 11:04 ` Samuel Martin
2017-01-26 11:11 ` Baruch Siach
2017-01-26 11:14 ` Jörg Krause
2017-01-26 11:28 ` Baruch Siach
2017-01-29 20:37 ` Jörg Krause
2017-01-29 21:11 ` Baruch Siach
2017-01-30 19:59 ` Jörg Krause
2017-01-30 21:20 ` Baruch Siach
2017-01-30 21:22 ` Jörg Krause
2017-01-30 21:26 ` Baruch Siach
2017-01-30 21:45 ` Jörg Krause
2017-02-05 22:17 ` Jörg Krause
2017-02-06 11:06 ` Thomas Petazzoni
2017-02-06 16:52 ` Samuel Martin
2017-02-06 17:43 ` Jörg Krause
2017-02-06 17:53 ` Samuel Martin
2017-02-06 17:59 ` Jörg Krause
2017-02-06 18:14 ` Samuel Martin
2017-02-06 19:24 ` Jörg Krause
2017-02-06 21:12 ` Jörg Krause
2017-02-06 23:38 ` Jörg Krause
2017-02-07 11:28 ` Samuel Martin
2017-02-07 13:00 ` Jörg Krause
2017-02-07 13:29 ` Samuel Martin
2017-02-07 19:07 ` Jörg Krause
2017-02-09 20:02 ` Jörg Krause [this message]
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=1486670569.4238.1.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=buildroot@busybox.net \
/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