[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2' wi
From: |
usaonmonday at gmail dot com |
Subject: |
[Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2' with LTO and symver attribute |
Date: |
Wed, 29 May 2024 18:13:38 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30281
Andrey Sotnikov <usaonmonday at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |usaonmonday at gmail dot com
--- Comment #11 from Andrey Sotnikov <usaonmonday at gmail dot com> ---
After my system updated (I suspect glibc 2.39), I started seeing these errors
during compilation:
/home/user/binutils-env/bin/ld: error: .libs/synctrace.o: multiple definition
of 'pthread_cond_wait'
/home/user/binutils-env/bin/ld: .libs/synctrace.o: previous definition here
/home/user/binutils-env/bin/ld: error: .libs/synctrace.o: multiple definition
of 'pthread_cond_timedwait'
/home/user/binutils-env/bin/ld: .libs/synctrace.o: previous definition here
/home/user/binutils-env/bin/ld: error: .libs/synctrace.o: multiple definition
of 'pthread_join'
/home/user/binutils-env/bin/ld: .libs/synctrace.o: previous definition here
/home/user/binutils-env/bin/ld: error: .libs/synctrace.o: multiple definition
of 'sem_wait'
/home/user/binutils-env/bin/ld: .libs/synctrace.o: previous definition here
collect2: error: ld returned 1 exit status
The culprit commit is
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66f76c545b293f8b89fef0f996a3a48fa59fae61
Checked with GCC 13 and 14.
The failing command line was
gcc -shared -fPIC -DPIC .libs/synctrace.o -march=native -mtune=native
-Wl,--version-script
-Wl,../../../binutils-gdb/gprofng/libcollector/libgprofng.ver
-Wl,--no-as-needed -Wl,-lrt -Wl,-ldl -Wl,-soname -Wl,libgp-sync.so -o
.libs/libgp-sync.so
-fuse-ld=bfd does help.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2' with LTO and symver attribute,
usaonmonday at gmail dot com <=