libassuan duplicate symbol

Jeffrey Walton noloader at gmail.com
Mon Jul 8 22:36:47 CEST 2024


On Mon, Jul 8, 2024 at 2:46 PM Ralph Seichter via Gnupg-devel
<gnupg-devel at gnupg.org> wrote:
>
> * Werner Koch via Gnupg-devel:
>
> > The SO name changed for libassuan.  Do you have an old version also
> > installed (should be libassuan.0.dylib) and this is accidently used
> > in the build?
>
> There was an older libassuan version in /opt/local/lib, courtesy of
> dependencies pulled in by MacPorts' "wget" port:
>
>   --->  Computing dependencies for wget
>   The following dependencies will be installed:
>    gnupg2
>    gpgme
>    libassuan
>
> Although the old library did not seem to be referenced by my own build,
> I removed the listed ports including libassuan, just to be sure.  Alas,
> my build still breaks due to duplicate symbols.
>
> I don't see any mention of the old name in my build logs (line breaks
> added for improved readability):
>
>   $ grep -E .libassuan\..+\.dylib' intel-2.5.0.log
>   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/gpgosx-2.5.0/x86_64-dist/lib
>   /tmp/gpgosx-2.5.0/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/gpgosx-2.5.0/x86_64-dist/lib/libassuan.9.dylib
>   -compatibility_version 10 -current_version 10.1
>
> See https://seichter.de/tmp/intel-2.5.0.log for the complete, unedited
> build log.

Looking at your build logs, these are the objects being linked:

    <...>/.libs/libassuan_la-server.o
    <...>/.libs/libassuan_la-sysutils.o
    <...>/.libs/libassuan_la-assuan-inquire.o
    <...>/.libs/libassuan_la-conversion.o
    <...>/.libs/libassuan_la-assuan-error.o
    <...>/.libs/libassuan_la-assuan-listen.o
    <...>/.libs/libassuan_la-assuan-pipe-server.o
    <...>/.libs/libassuan_la-assuan-socket-server.o
    <...>/.libs/libassuan_la-debug.o
    <...>/.libs/libassuan_la-assuan.o
    <...>/.libs/libassuan_la-context.o
    <...>/.libs/libassuan_la-assuan-buffer.o
    <...>/.libs/libassuan_la-system.o
    <...>/.libs/libassuan_la-client.o
    <...>/.libs/libassuan_la-assuan-socket-connect.o
    <...>/.libs/libassuan_la-assuan-uds.o
    <...>/.libs/libassuan_la-assuan-pipe-connect.o
    <...>/.libs/libassuan_la-assuan-handler.o
    <...>/.libs/libassuan_la-assuan-logging.o
    <...>/.libs/libassuan_la-assuan-io.o
    <...>/.libs/libassuan_la-system-posix.o
    <...>/.libs/libassuan_la-assuan-socket.o

Can you create a Bash script, for-each over each lib, and perform:

    nm -g <file> | c++filt | grep ' D ' | grep sputc

The script should tell you which objects are defining the symbol. The
' D ' makes sure it is defined in the translation unit, and not just
referenced (like with ' U ').

Jeff



More information about the Gnupg-devel mailing list