libassuan duplicate symbol (Re: Quick heads up: GnuPG 2.5.0 is now available)
Jeffrey Walton
noloader at gmail.com
Sat Jul 6 00:26:20 CEST 2024
On Fri, Jul 5, 2024 at 3:04 PM Ralph Seichter via Gnupg-devel
<gnupg-devel at gnupg.org> wrote:
>
> * Werner Koch via Gnupg-users:
>
> > Latest released libaries are required.
>
> Yeah, about that: I had trouble building libgpg-error 1.50 on macOS, but
> found a workaround in https://dev.gnupg.org/T7169 , so that's good. Alas,
> I have not yet found a workaround for libassuan-3.0.1:
>
> libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libassuan.9.dylib .libs/libassuan_la-assuan.o .libs/libassuan_la-context.o .libs/libassuan_la-system.o .libs/libassuan_la-debug.o .libs/libassuan_la-conversion.o .libs/libassuan_la-sysutils.o .libs/libassuan_la-client.o .libs/libassuan_la-server.o .libs/libassuan_la-assuan-error.o .libs/libassuan_la-assuan-buffer.o .libs/libassuan_la-assuan-handler.o .libs/libassuan_la-assuan-inquire.o .libs/libassuan_la-assuan-listen.o .libs/libassuan_la-assuan-pipe-server.o .libs/libassuan_la-assuan-socket-server.o .libs/libassuan_la-assuan-pipe-connect.o .libs/libassuan_la-assuan-socket-connect.o .libs/libassuan_la-assuan-uds.o .libs/libassuan_la-assuan-logging.o .libs/libassuan_la-assuan-socket.o .libs/libassuan_la-system-posix.o .libs/libassuan_la-assuan-io.o .libs/memrchr.o -L/tmp/build-1720202282/x86_64-dist/lib /tmp/build-1720202282/x86_64-dist/lib/libgpg-error.dylib -arch x86_64 -m64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.12 -O0 -arch x86_64 -install_name /tmp/build-1720202282/x86_64-dist/lib/libassuan.9.dylib -compatibility_version 10 -current_version 10.1
>
> duplicate symbol '___sputc' in:
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-server.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-error.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-debug.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-sysutils.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-client.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-listen.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-context.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-buffer.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-conversion.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-socket-server.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-pipe-server.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-inquire.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-pipe-connect.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-system.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-socket-connect.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-io.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-uds.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-handler.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-system-posix.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-logging.o
> /private/tmp/build-1720202282/x86_64-build/libassuan-3.0.1/src/.libs/libassuan_la-assuan-socket.o
> ld: 1 duplicate symbols
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[4]: *** [libassuan.la] Error 1
>
> Do you guys have any suggestions how to overcome this issue?
It smells a lot like <https://stackoverflow.com/q/32372786>.
Was everything built with `-stdlib=libc++`? libc++ is LLVM's standard
C++ library. libstdc++ is GNU's standard C++ library. It sounds like
both libraries are trying to provide the symbol.
Another interesting discussion is at
<https://github.com/numba/numba/issues/358>. I've never seen the
option they discuss, though. (adding the `-system-libX` option).
Jeff
More information about the Gnupg-devel
mailing list