Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921174 - dev-libs/libisofs-1.5.6_p1-r1 - fails to link with lld linker: ld.lld: error: version script assignment of 'LIBISOFS6' to symbol 'iso_image_get_app_use' failed: symbol not defined
Summary: dev-libs/libisofs-1.5.6_p1-r1 - fails to link with lld linker: ld.lld: error:...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-01 18:56 UTC by ernsteiswuerfel
Modified: 2024-03-17 13:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (libisofs-1.5.6_p120240101-183759.log,85.78 KB, text/plain)
2024-01-01 18:56 UTC, ernsteiswuerfel
Details
emerge --info (file_921174.txt,7.40 KB, text/plain)
2024-01-01 18:57 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-01-01 18:56:46 UTC
Created attachment 881234 [details]
build.log

The build log mentions ld.lld despite mold being set in make.conf via LDFLAGS="-fuse-ld=mold ${LDFLAGS} -Wl,-z,pack-relative-relocs".

Anyhow the build fails only with mold being used, it builds ok with lld. This is on a musl/clang system.

[...]
clang: warning: optimization flag '-fexpensive-optimizations' is not supported [-Wignored-optimization-argument]
/bin/sh ./libtool  --tag=CC   --mode=link clang -DLibisofs_with_aaip_acL -DLibisofs_with_aaip_xattR -DLibisofs_with_sys_xattR -DLibisofs_with_zliB  -DNDEBUG -fexpensive-optimizations -O3 -Os -march=x86-64-v2 -pipe -version-info 98:0:92 -Wl,--version-script=./libisofs/libisofs.ver -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-z,pack-relative-relocs -o libisofs/libisofs.la -rpath /usr/lib libisofs/libisofs_libisofs_la-builder.lo libisofs/libisofs_libisofs_la-node.lo libisofs/libisofs_libisofs_la-tree.lo libisofs/libisofs_libisofs_la-find.lo libisofs/libisofs_libisofs_la-image.lo libisofs/libisofs_libisofs_la-fsource.lo libisofs/libisofs_libisofs_la-fs_local.lo libisofs/libisofs_libisofs_la-fs_image.lo libisofs/libisofs_libisofs_la-messages.lo libisofs/libisofs_libisofs_la-libiso_msgs.lo libisofs/libisofs_libisofs_la-stream.lo libisofs/libisofs_libisofs_la-filter.lo libisofs/filters/libisofs_libisofs_la-external.lo libisofs/filters/libisofs_libisofs_la-zisofs.lo libisofs/filters/libisofs_libisofs_la-gzip.lo libisofs/libisofs_libisofs_la-util.lo libisofs/libisofs_libisofs_la-util_rbtree.lo libisofs/libisofs_libisofs_la-util_htable.lo libisofs/libisofs_libisofs_la-filesrc.lo libisofs/libisofs_libisofs_la-ecma119.lo libisofs/libisofs_libisofs_la-ecma119_tree.lo libisofs/libisofs_libisofs_la-buffer.lo libisofs/libisofs_libisofs_la-rockridge.lo libisofs/libisofs_libisofs_la-rockridge_read.lo libisofs/libisofs_libisofs_la-joliet.lo libisofs/libisofs_libisofs_la-hfsplus.lo libisofs/libisofs_libisofs_la-hfsplus_decompose.lo libisofs/libisofs_libisofs_la-hfsplus_classes.lo libisofs/libisofs_libisofs_la-hfsplus_case.lo libisofs/libisofs_libisofs_la-eltorito.lo libisofs/libisofs_libisofs_la-system_area.lo libisofs/libisofs_libisofs_la-make_isohybrid_mbr.lo libisofs/libisofs_libisofs_la-iso1999.lo libisofs/libisofs_libisofs_la-data_source.lo libisofs/libisofs_libisofs_la-aaip_0_2.lo libisofs/libisofs_libisofs_la-md5.lo -lpthread -lz -lacl 
libtool: link: clang -shared  -fPIC -DPIC  libisofs/.libs/libisofs_libisofs_la-builder.o libisofs/.libs/libisofs_libisofs_la-node.o libisofs/.libs/libisofs_libisofs_la-tree.o libisofs/.libs/libisofs_libisofs_la-find.o libisofs/.libs/libisofs_libisofs_la-image.o libisofs/.libs/libisofs_libisofs_la-fsource.o libisofs/.libs/libisofs_libisofs_la-fs_local.o libisofs/.libs/libisofs_libisofs_la-fs_image.o libisofs/.libs/libisofs_libisofs_la-messages.o libisofs/.libs/libisofs_libisofs_la-libiso_msgs.o libisofs/.libs/libisofs_libisofs_la-stream.o libisofs/.libs/libisofs_libisofs_la-filter.o libisofs/filters/.libs/libisofs_libisofs_la-external.o libisofs/filters/.libs/libisofs_libisofs_la-zisofs.o libisofs/filters/.libs/libisofs_libisofs_la-gzip.o libisofs/.libs/libisofs_libisofs_la-util.o libisofs/.libs/libisofs_libisofs_la-util_rbtree.o libisofs/.libs/libisofs_libisofs_la-util_htable.o libisofs/.libs/libisofs_libisofs_la-filesrc.o libisofs/.libs/libisofs_libisofs_la-ecma119.o libisofs/.libs/libisofs_libisofs_la-ecma119_tree.o libisofs/.libs/libisofs_libisofs_la-buffer.o libisofs/.libs/libisofs_libisofs_la-rockridge.o libisofs/.libs/libisofs_libisofs_la-rockridge_read.o libisofs/.libs/libisofs_libisofs_la-joliet.o libisofs/.libs/libisofs_libisofs_la-hfsplus.o libisofs/.libs/libisofs_libisofs_la-hfsplus_decompose.o libisofs/.libs/libisofs_libisofs_la-hfsplus_classes.o libisofs/.libs/libisofs_libisofs_la-hfsplus_case.o libisofs/.libs/libisofs_libisofs_la-eltorito.o libisofs/.libs/libisofs_libisofs_la-system_area.o libisofs/.libs/libisofs_libisofs_la-make_isohybrid_mbr.o libisofs/.libs/libisofs_libisofs_la-iso1999.o libisofs/.libs/libisofs_libisofs_la-data_source.o libisofs/.libs/libisofs_libisofs_la-aaip_0_2.o libisofs/.libs/libisofs_libisofs_la-md5.o   -lpthread -lz -lacl  -O3 -Os -march=x86-64-v2 -Wl,--version-script=./libisofs/libisofs.ver -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs   -Wl,-soname -Wl,libisofs.so.6 -o libisofs/.libs/libisofs.so.6.92.0
ld.lld: error: version script assignment of 'LIBISOFS6' to symbol 'iso_image_get_app_use' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:725: libisofs/libisofs.la] Error 1
 * ERROR: dev-libs/libisofs-1.5.6_p1::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2024-01-01 18:57:40 UTC
Created attachment 881235 [details]
emerge --info
Comment 2 Matthew Smith gentoo-dev 2024-03-16 07:49:48 UTC
I think that this is an issue with lld and not mold. With mold, the missing symbol in the version script is a warning and not an error.

dev-libs/libisofs-1.5.6_p1 doesn't appear to respect your LDFLAGS and libtool still links with lld (or whatever the compiler's default is).

Building dev-libs/libisofs-1.5.6_p1-r1 with mold works fine for me, and libtool is definitely using mold:

> readelf -p .comment .libs/libisofs.so 
>
> String dump of section '.comment':
>   [     0]  GCC: (Gentoo 14.0.1_pre20240218 p23) 14.0.1 20240218 (experimental)
>   [    44]  mold 2.4.1 (compatible with GNU ld)
Comment 3 ernsteiswuerfel archtester 2024-03-17 13:11:31 UTC
Thanks for the hint!

But on my current musl/clang system I can't reproduce it, neither with mold nor with lld...

So closing as invalid now. In case I see it again I'll reopen and check the circumstances more thoroughly.