eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
496 stars 84 forks source link

Configure breaks linking by manually adding `bundle1.o`: `duplicate symbol dyld_stub_binding_helper` #1662

Open barracuda156 opened 1 month ago

barracuda156 commented 1 month ago

GCC libraries are not supposed to be linked directly to. Configure specifically adds bundle, and that appears to break linking:

Making modules...

make[1]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod'
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/ctcp.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././ctcp.mod/ctcp.c && mv -f ctcp.o ../
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/console.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././console.mod/console.c && mv -f console.o ../
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/assoc.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././assoc.mod/assoc.c && mv -f assoc.o ../
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/channels.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././channels.mod/channels.c && mv -f channels.o ../
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/compress.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././compress.mod/compress.c && mv -f compress.o ../
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/blowfish.mod'
ccache /usr/bin/gcc-4.2 -std=gnu99 -fPIC -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -DMAKING_MODS -c .././blowfish.mod/blowfish.c && mv -f blowfish.o ../
ccache /usr/bin/gcc-4.2 -std=gnu99 -dynamiclib   -Wl,-single_module -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -o ../../../ctcp.so ../ctcp.o -L/opt/local/lib -L/opt/local/lib -ltcl8.6 -lz -lpthread -framework CoreFoundation -lssl -lcrypto  -lresolv /usr/lib/bundle1.o && touch ../../../ctcp.so
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/dylib1.10.5.o
collect2: ld returned 1 exit status
make[2]: *** [../../../ctcp.so] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/ctcp.mod'
make[1]: *** [ctcp.mod_so] Error 2
make[1]: *** Waiting for unfinished jobs....
ccache /usr/bin/gcc-4.2 -std=gnu99 -dynamiclib   -Wl,-single_module -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -o ../../../console.so ../console.o -L/opt/local/lib -L/opt/local/lib -ltcl8.6 -lz -lpthread -framework CoreFoundation -lssl -lcrypto  -lresolv /usr/lib/bundle1.o && touch ../../../console.so
ccache /usr/bin/gcc-4.2 -std=gnu99 -dynamiclib   -Wl,-single_module -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -o ../../../assoc.so ../assoc.o -L/opt/local/lib -L/opt/local/lib -ltcl8.6 -lz -lpthread -framework CoreFoundation -lssl -lcrypto  -lresolv /usr/lib/bundle1.o && touch ../../../assoc.so
ccache /usr/bin/gcc-4.2 -std=gnu99 -dynamiclib   -Wl,-single_module -pipe -Os -arch ppc -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/opt/local/include -DHAVE_CONFIG_H -I/opt/local/include -o ../../../compress.so ../compress.o -lz -L/opt/local/lib -L/opt/local/lib -ltcl8.6 -lz -lpthread -framework CoreFoundation -lssl -lcrypto  -lresolv /usr/lib/bundle1.o && touch ../../../compress.so
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/dylib1.10.5.o
collect2: ld returned 1 exit status
make[2]: *** [../../../console.so] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/console.mod'
make[1]: *** [console.mod_so] Error 2
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/dylib1.10.5.o
collect2: ld returned 1 exit status
make[2]: *** [../../../assoc.so] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/assoc.mod'
make[1]: *** [assoc.mod_so] Error 2
ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/dylib1.10.5.o
collect2: ld returned 1 exit status
make[2]: *** [../../../compress.so] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_irc_eggdrop/eggdrop/work/eggdrop-1.9.5/src/mod/compress.mod'
make[1]: *** [compress.mod_so] Error 2
michaelortmann commented 1 month ago

Additional info:

Installed macOS from scratch, then installed official command line developer tools (git, ...), then:

https://pastebin.com/RA8Giqqf

see also:

https://github.com/eggheads/eggdrop/blob/74c786165272a9a7c7a7374d1906d2b30201d862/aclocal.m4#L530

barracuda156 commented 1 month ago

Additional info:

Installed macOS from scratch, then installed official command line developer tools (git, ...), then:

https://pastebin.com/RA8Giqqf

@michaelortmann You could take a look how it is built in MacPorts: https://github.com/macports/macports-ports/blob/master/irc/eggdrop/Portfile (or install directly from MacPorts, if it is an acceptable option).

michaelortmann commented 1 month ago

Thank you!

Also for reference, this Issue is related to #176