Open Quuxplusone opened 5 years ago
Bugzilla Link | PR43092 |
Status | NEW |
Importance | P enhancement |
Reported by | Manoj Gupta (manojgupta@google.com) |
Reported on | 2019-08-22 10:23:58 -0700 |
Last modified on | 2019-08-30 23:24:53 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | george.burgess.iv@gmail.com, htmldeveloper@gmail.com, i@maskray.me, llozano@chromium.org, llvm-bugs@lists.llvm.org, manojgupta@google.com, zhizhouy@google.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Easier repro:
$ git clone https://github.com/libfuse/libfuse.git
$ mkdir libfuse/build && cd libfuse/build
$ CC=/path/to/clang CXX=/path/to/clang++ meson ..
Linker will error out with same errors:
clang -o lib/libfuse3.so.3.6.2 'lib/76b5a35@@fuse3@sha/fuse.c.o'
'lib/76b5a35@@fuse3@sha/fuse_loop.c.o'
'lib/76b5a35@@fuse3@sha/fuse_loop_mt.c.o'
'lib/76b5a35@@fuse3@sha/fuse_lowlevel.c.o'
'lib/76b5a35@@fuse3@sha/fuse_opt.c.o' 'lib/76b5a35@@fuse3@sha/fuse_signals.c.o'
'lib/76b5a35@@fuse3@sha/buffer.c.o' 'lib/76b5a35@@fuse3@sha/cuse_lowlevel.c.o'
'lib/76b5a35@@fuse3@sha/helper.c.o' 'lib/76b5a35@@fuse3@sha/modules_subdir.c.o'
'lib/76b5a35@@fuse3@sha/mount_util.c.o' 'lib/76b5a35@@fuse3@sha/mount.c.o'
'lib/76b5a35@@fuse3@sha/modules_iconv.c.o' -Wl,--no-undefined -Wl,--as-needed -
shared -fPIC -Wl,--start-group -Wl,-soname,libfuse3.so.3 -Wl,--version-
script,build/libfuse/lib/fuse_versionscript -ldl -lrt -Wl,--end-group -pthread
../lib/fuse.c:4538: error: undefined reference to 'fuse_session_loop_mt_32'
../lib/cuse_lowlevel.c:356: error: undefined reference to
'fuse_session_loop_mt_32'
../lib/helper.c:316: error: undefined reference to 'fuse_new_31'
../lib/helper.c:344: error: undefined reference to 'fuse_loop_mt_32'
Reverted in r369790
Sorry for the trouble I caused. This is related to a nasty .symver issue
involving the assembler the linker. As the description said:
In lld, if it sees f and f@v1:
--version-script =(printf 'v1 {};') => f and f@v1
--version-script =(printf 'v1 { f; };') => f@v1 and f@@v1
It can be argued that @@@ added on 2000-11-13 corrected the @ and @@ mistake.
I hope we can handle .symver in a clean way (not an indirect symbol as used in
GNU ld).
Eventually I hope .symver @ and @@ can be a rename as @@@ does. The way fuse
and alsa-lib use .symver may be less than ideal. Let me check if fuse and alsa-
lib can be patched.