[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63043] cmake build rule uses host liblzma.so and other host librar
From: |
Boud Roukema |
Subject: |
[bug #63043] cmake build rule uses host liblzma.so and other host libraries |
Date: |
Sat, 10 Sep 2022 19:05:11 -0400 (EDT) |
Follow-up Comment #2, bug #63043 (project reproduce):
Compilation of 'cmake' fails on CentOS 7, so _ldd .local/bin/cmake_ gives _No
such file or directory_ . :P
On Debian 11.3, _ldd .local/bin/cmake_ shows that the Maneage libraries for
curl, liblzma, bz2, have been linked.
So the risk might be lower than I stated earlier: if linking succeeds, then on
at least two systems, the Maneage libraries *are* linked, not the host ones.
Hypothesis: with the current build rules, both the host system and Maneage
libraries are examined, and, if both are valid, a decision is then made to use
the Maneage libraries (probably because they're listed first). However, if one
is invalid (missing symbols), then there's a fatal error.
On Debian 11.3, the log includes lines like
/BUILD/software/installed/bin/g++ -liconv -O3 -DNDEBUG
-Wl,-rpath-link=/BUILD/software/installed/lib -L/BUILD/software/installed/lib
CMakeFiles/testAffinity.dir/testAffinity.cxx.o -o testAffinity
../../Source/libCMakeLib.a ../../Source/kwsys/libcmsys.a
../../Utilities/std/libcmstd.a ../../Utilities/cmexpat/libcmexpat.a
../../Utilities/cmlibarchive/libarchive/libcmlibarchive.a
/usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/liblzma.so
../../Utilities/cmzstd/libcmzstd.a /BUILD/software/installed/lib/libbz2.so
/BUILD/software/installed/lib/libcurl.so
../../Utilities/cmjsoncpp/libcmjsoncpp.a ../../Utilities/cmlibuv/libcmlibuv.a
-ldl -lrt ../../Utilities/cmlibrhash/libcmlibrhash.a -lpthread
The option '-L/BUILD/software/installed/lib' is given before
'/usr/lib/x86_64-linux-gnu/liblzma.so', and 'g++' may work with several
iterations - first check for consistency, and later make a final decision.
In any case, it should be possible to find build rules for cmake where
'/usr/lib/x86_64-linux-gnu/liblzma.so' is absent or becomes
'/BUILD/software/installed/lib/liblzma.so'; that would give valid command
lines for the compile instructions.
The error appears to come from something like a 'configure' command earlier,
but 'cmake' doesn't use a standard 'configure' file, just './bootstrap', so
it's not clear where the problem happens; there are several lines like this:
checking for -Wl,--no-as-needed... -- Looking for lzma_lzma_preset in
/usr/lib/x86_64-linux-gnu/liblzma.so - found
-- Found LibLZMA: /usr/lib/x86_64-linux-gnu/liblzma.so (found version "5.2.5")
I'm just guessing: I'm not an expert on g++ compilation algorithms or the
cmake build algorithm.
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?63043>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Boud Roukema, 2022/09/10
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Mohammad Akhlaghi, 2022/09/10
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries,
Boud Roukema <=
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Mohammad Akhlaghi, 2022/09/11
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Mohammad Akhlaghi, 2022/09/11
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Mohammad Akhlaghi, 2022/09/11
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Boud Roukema, 2022/09/13
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Mohammad Akhlaghi, 2022/09/15
- [bug #63043] cmake build rule uses host liblzma.so and other host libraries, Boud Roukema, 2022/09/20