snowcrash
2007-Nov-28 06:43 UTC
[Dovecot] 1.1beta9 'make' fails on osx/Tiger, but OK on osx/Leopard (multiple definitions of symbol _hash_create)
i'm building dovecot 1.1.beta9 on both osx 10.4.11 osx 10.5.1 using Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /Builds/apple/gcc_42-5531/obj/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin8 --program-prefix--host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5531) on both boxes. configuring as Install prefix ...................... : /usr/local/dovecot File offsets ........................ : 64bit I/O loop method ..................... : kqueue File change notification method ..... : kqueue Building with SSL support ........... : yes (OpenSSL) Building with IPv6 support .......... : yes Building with pop3 server ........... : yes Building with mail delivery agent .. : yes Building with GSSAPI support ........ : no Building with user database modules . : static prefetch passwd passwd-file checkpassword sql Building with password lookup modules : passwd passwd-file pam checkpassword sql Building with SQL drivers ............:mysql sqlite is OK on both boxes. on Leopard, make completes without error. but, on Tiger, it fails @ make ... make[3]: Nothing to be done for `all'. Making all in master /bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -I/usr/local/ssl/include -L/usr/local/db46/lib -L/usr/local/sqlite/lib -lsqlite3 -L/usr/local/mysql/lib/mysql -L/usr/local/lib -liconv -o dovecot auth-process.o askpass.o capabilities-posix.o child-process.o dict-process.o dup2-array.o listener.o log.o login-process.o mail-process.o main.o master-settings.o syslog-util.o ssl-init.o ../lib-settings/libsettings.a ../lib/liblib.a gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -I/usr/local/ssl/include -o dovecot auth-process.o askpass.o capabilities-posix.o child-process.o dict-process.o dup2-array.o listener.o log.o login-process.o mail-process.o main.o master-settings.o syslog-util.o ssl-init.o -L/usr/local/db46/lib -L/usr/local/sqlite/lib /usr/local/sqlite/lib/libsqlite3.dylib -L/usr/local/lib -lreadline -lncurses -lpthread -L/usr/local/mysql/lib/mysql /usr/local/lib/libiconv.dylib ../lib-settings/libsettings.a ../lib/liblib.a /usr/libexec/gcc/powerpc-apple-darwin8/4.2.1/ld: multiple definitions of symbol _hash_create /usr/lib/gcc/powerpc-apple-darwin8/4.2.1/../../../libpthread.dylib(strhash.So) definition of _hash_create ../lib/liblib.a(hash.o) definition of _hash_create in section (__TEXT,__text) /usr/libexec/gcc/powerpc-apple-darwin8/4.2.1/ld: multiple definitions of symbol _hash_destroy /usr/lib/gcc/powerpc-apple-darwin8/4.2.1/../../../libpthread.dylib(strhash.So) definition of _hash_destroy ../lib/liblib.a(hash.o) definition of _hash_destroy in section (__TEXT,__text) collect2: ld returned 1 exit status make[3]: *** [dovecot] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 looks like problems with ot at all sure what in Tiger's causing this ... hints/suggestions? thanks!
Timo Sirainen
2007-Nov-28 07:22 UTC
[Dovecot] 1.1beta9 'make' fails on osx/Tiger, but OK on osx/Leopard (multiple definitions of symbol _hash_create)
On Tue, 2007-11-27 at 22:43 -0800, snowcrash wrote:> /usr/libexec/gcc/powerpc-apple-darwin8/4.2.1/ld: multiple definitions > of symbol _hash_create > /usr/lib/gcc/powerpc-apple-darwin8/4.2.1/../../../libpthread.dylib(strhash.So) > definition of _hash_createI'd report this as a bug to Apple. Standard libraries shouldn't export symbols with such a common name. This will probably fix it for now: diff -r 373beccc2468 src/lib/hash.h --- a/src/lib/hash.h Wed Nov 28 09:16:17 2007 +0200 +++ b/src/lib/hash.h Wed Nov 28 09:19:40 2007 +0200 @@ -1,5 +1,10 @@ #ifndef HASH_H #define HASH_H + +#ifdef __APPLE__ +# define hash_create hash_create_osx_leopard_pthreads_conflict_fix +# define hash_destroy hash_destroy_osx_leopard_pthreads_conflict_fix +#endif /* Returns hash code. */ typedef unsigned int hash_callback_t(const void *p); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20071128/9af74092/attachment-0002.bin>
Timo Sirainen
2007-Nov-28 07:41 UTC
[Dovecot] 1.1beta9 'make' fails on osx/Tiger, but OK on osx/Leopard (multiple definitions of symbol _hash_create)
On Tue, 2007-11-27 at 22:43 -0800, snowcrash wrote:> gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes > -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 > -Wbad-function-cast -Wstrict-aliasing=2 -I/usr/local/ssl/include -o > dovecot auth-process.o askpass.o capabilities-posix.o child-process.o > dict-process.o dup2-array.o listener.o log.o login-process.o > mail-process.o main.o master-settings.o syslog-util.o ssl-init.o > -L/usr/local/db46/lib -L/usr/local/sqlite/lib > /usr/local/sqlite/lib/libsqlite3.dylib -L/usr/local/lib -lreadline > -lncurses -lpthreadWhy is it linking any of -lreadline -lncurses -lpthread anyway? What line do they exist in Makefile? Does config.log say something about them? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20071128/63377827/attachment-0002.bin>