Summary: | app-arch/libarchive-3.7.8: Fails to build with USE=lzo - undefined reference to `lzo1x_decompress_safe' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | zyxhere <zyx> |
Component: | Current packages | Assignee: | Michał Górny <mgorny> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | amonakov+bugs.gentoo, zyx |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
build.log
config.log.xz dev-libs:lzo-2.10:20250329-093609.log |
Description
zyxhere
2025-03-28 10:44:23 UTC
This is a 32-bit bubblewrap chroot and am using slibtool but building lzo and libarchive with or without slibtool doesn't fix it unfortunately > checking for lzo1x_decompress_safe in -llzo2... no
That looks wrong. config.log, plz.
Created attachment 923217 [details]
config.log.xz
Here's your answer: configure:17017: checking for lzo1x_decompress_safe in -llzo2 configure:17040: i686-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -flto=auto -fno-semantic-interposition -ftrivial-a uto-var-init=zero -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fdiagnostics-color=always -Wl,-O1 -Wl,--as-needed -W l,-z,pack-relative-relocs conftest.c -llzo2 -lzstd -llz4 -lbz2 -lz -llzma >&5 conftest.c:118:6: error: type of 'lzo1x_decompress_safe' does not match original declaration [-Werror=lto-type-mismatch] 118 | char lzo1x_decompress_safe (); | ^ /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: return value type mismatch /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: type 'int' should match type 'char' /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: 'lzo1x_decompress_safe' was previously declared here lto1: some warnings being treated as errors lto-wrapper: fatal error: i686-pc-linux-gnu-gcc returned 1 exit status compilation terminated. /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status configure:17040: $? = 1 Apparently it uses the standard AC_CHECK_LIB, so wtf? We have a theory that your lzo was built with +static-libs and installed liblzo2.a contains LTO sections, can you confirm that? (In reply to Alexander Monakov from comment #6) > We have a theory that your lzo was built with +static-libs and installed > liblzo2.a contains LTO sections, can you confirm that? Nope localhost ~ # emerge -pvO lzo These are the packages that would be merged, in order: [ebuild R ] dev-libs/lzo-2.10:2::gentoo USE="-examples (-split-usr) -static-libs" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB I will note that this is a 32-bit bubblewrap chroot (more like a container I guess) Would you mind double-checking if liblzo2.a is really not present in the filesystem? It is present localhost ~ # find / -iname "liblzo2.a" /usr/lib/liblzo2.a (In reply to Michał Górny from comment #4) > Here's your answer: > > > configure:17017: checking for lzo1x_decompress_safe in -llzo2 > configure:17040: i686-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe > -flto=auto -fno-semantic-interposition -ftrivial-a > uto-var-init=zero -Werror=odr -Werror=lto-type-mismatch > -Werror=strict-aliasing -fdiagnostics-color=always -Wl,-O1 -Wl,--as-needed > -W > l,-z,pack-relative-relocs conftest.c -llzo2 -lzstd -llz4 -lbz2 -lz -llzma > >&5 > conftest.c:118:6: error: type of 'lzo1x_decompress_safe' does not match > original declaration [-Werror=lto-type-mismatch] > 118 | char lzo1x_decompress_safe (); > | ^ > /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: > return value type mismatch > /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: > type 'int' should match type 'char' > /var/tmp/portage/dev-libs/lzo-2.10/work/lzo-2.10/src/lzo1x_d.ch:38:1: note: > 'lzo1x_decompress_safe' was previously declared here > lto1: some warnings being treated as errors > lto-wrapper: fatal error: i686-pc-linux-gnu-gcc returned 1 exit status > compilation terminated. > /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: > error: lto-wrapper failed > collect2: error: ld returned 1 exit status > configure:17040: $? = 1 Removing -flto lets it compile fine (In reply to zyxhere from comment #9) > It is present > localhost ~ # find / -iname "liblzo2.a" > /usr/lib/liblzo2.a That is quite weird. Could you rebuild dev-libs/lzo and confirm whether it is installing that file? Or perhaps it is an orphan file on your system? (In reply to Michał Górny from comment #11) > (In reply to zyxhere from comment #9) > > It is present > > localhost ~ # find / -iname "liblzo2.a" > > /usr/lib/liblzo2.a > > That is quite weird. Could you rebuild dev-libs/lzo and confirm whether it > is installing that file? Or perhaps it is an orphan file on your system? Yes its installing it: >>> Installing (1 of 1) dev-libs/lzo-2.10::gentoo * checking 21 files for package collisions >>> Merging dev-libs/lzo-2.10 to / --- /usr/ --- /usr/include/ --- /usr/include/lzo/ === /usr/include/lzo/lzoutil.h === /usr/include/lzo/lzodefs.h === /usr/include/lzo/lzoconf.h === /usr/include/lzo/lzo_asm.h === /usr/include/lzo/lzo2a.h === /usr/include/lzo/lzo1z.h === /usr/include/lzo/lzo1y.h === /usr/include/lzo/lzo1x.h === /usr/include/lzo/lzo1f.h === /usr/include/lzo/lzo1c.h === /usr/include/lzo/lzo1b.h === /usr/include/lzo/lzo1a.h === /usr/include/lzo/lzo1.h --- /usr/share/ --- /usr/share/doc/ --- /usr/share/doc/lzo-2.10/ === /usr/share/doc/lzo-2.10/LZO.TXT.bz2 === /usr/share/doc/lzo-2.10/LZOAPI.TXT.bz2 === /usr/share/doc/lzo-2.10/LZO.FAQ.bz2 === /usr/share/doc/lzo-2.10/THANKS.bz2 === /usr/share/doc/lzo-2.10/NEWS.bz2 === /usr/share/doc/lzo-2.10/AUTHORS --- /usr/lib/ >>> /usr/lib/liblzo2.a --- /usr/lib/pkgconfig/ === /usr/lib/pkgconfig/lzo2.pc >>> Safely unmerging already-installed instance... --- replaced obj /usr/share/doc/lzo-2.10/THANKS.bz2 --- replaced obj /usr/share/doc/lzo-2.10/NEWS.bz2 --- replaced obj /usr/share/doc/lzo-2.10/LZOAPI.TXT.bz2 --- replaced obj /usr/share/doc/lzo-2.10/LZO.TXT.bz2 --- replaced obj /usr/share/doc/lzo-2.10/LZO.FAQ.bz2 --- replaced obj /usr/share/doc/lzo-2.10/AUTHORS --- replaced dir /usr/share/doc/lzo-2.10 --- replaced dir /usr/share/doc --- replaced dir /usr/share --- replaced obj /usr/lib/pkgconfig/lzo2.pc --- replaced dir /usr/lib/pkgconfig --- replaced obj /usr/lib/liblzo2.a --- replaced dir /usr/lib --- replaced obj /usr/include/lzo/lzoutil.h --- replaced obj /usr/include/lzo/lzodefs.h --- replaced obj /usr/include/lzo/lzoconf.h --- replaced obj /usr/include/lzo/lzo_asm.h --- replaced obj /usr/include/lzo/lzo2a.h --- replaced obj /usr/include/lzo/lzo1z.h --- replaced obj /usr/include/lzo/lzo1y.h --- replaced obj /usr/include/lzo/lzo1x.h --- replaced obj /usr/include/lzo/lzo1f.h --- replaced obj /usr/include/lzo/lzo1c.h --- replaced obj /usr/include/lzo/lzo1b.h --- replaced obj /usr/include/lzo/lzo1a.h --- replaced obj /usr/include/lzo/lzo1.h --- replaced dir /usr/include/lzo --- replaced dir /usr/include --- replaced dir /usr >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. >>> dev-libs/lzo-2.10 merged. >>> Regenerating /etc/ld.so.cache... >>> Completed (1 of 1) dev-libs/lzo-2.10::gentoo Could you include the log for dev-libs/lzo, please? As you can guess, it doesn't do that for me. You can also try if removing lto from lzo makes it stop installing the static library. Created attachment 923235 [details]
dev-libs:lzo-2.10:20250329-093609.log
There are two logs in /var/log/portage so I only attached the bigger one
(In reply to Michał Górny from comment #13) > Could you include the log for dev-libs/lzo, please? As you can guess, it > doesn't do that for me. > > You can also try if removing lto from lzo makes it stop installing the > static library. Without lto /usr/lib/liblzo2.a is still installed Something is seriously broken here:
> checking whether the i686-pc-linux-gnu-gcc linker (ld.mold) supports shared libraries... no
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... unsupported
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... no
config.log may help. You also want to try with GNU ld.
(In reply to Michał Górny from comment #16) > Something is seriously broken here: > > > checking whether the i686-pc-linux-gnu-gcc linker (ld.mold) supports shared libraries... no > > checking dynamic linker characteristics... GNU/Linux ld.so > > checking how to hardcode library paths into programs... unsupported > > checking whether stripping libraries is possible... yes > > checking if libtool supports shared libraries... no > > config.log may help. You also want to try with GNU ld. Wait hold on a sec I don't have mold installed (yet) I forgot I had LD="ld.mold" in make.conf (In reply to zyxhere from comment #17) > (In reply to Michał Górny from comment #16) > > Something is seriously broken here: > > > > > checking whether the i686-pc-linux-gnu-gcc linker (ld.mold) supports shared libraries... no > > > checking dynamic linker characteristics... GNU/Linux ld.so > > > checking how to hardcode library paths into programs... unsupported > > > checking whether stripping libraries is possible... yes > > > checking if libtool supports shared libraries... no > > > > config.log may help. You also want to try with GNU ld. > > Wait hold on a sec I don't have mold installed (yet) I forgot I had > LD="ld.mold" in make.conf Oof yea it compiled fine now even with LTO, sorry for the newbie mistake |