[Dovecot] linking problems of dovecot 2.0.3

Funda Wang fundawang at gmail.com
Sun Sep 19 09:04:49 EEST 2010


Hello,

I'm currently packaging dovecot 2.0.3 under Mandriva Linux. It has
been using LDFLAGS="-Wl,--as-needed -Wl,--no-undefined" for shared
libraries for over two years[1]. And I've found there are lots of
linking problems with dovecot 2.0.3.

After some investigation, I've made small patch regarding dovecot
2.0.3, posted here:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/dovecot/branches/dovecot2/current/SOURCES/dovecot-2.0.3-linkage.patch

Even after applying mentioned patch, it still produce following errors:
make[3]: Entering directory `/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common'
/bin/sh ../../libtool --tag=CC   --mode=link gcc  -std=gnu99 -O2 -g
-pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fstack-protector --param=ssp-buffer-size=4 -fstack-protector-all
-Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2
 -export-dynamic -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro
-Wl,-O1 -Wl,--build-id -o libdovecot-login.la -rpath
/usr/lib64/dovecot  liblogin.la ../lib-dict/libdict.la
../lib-dovecot/libdovecot.la -lrt
libtool: link: gcc -shared -Wl,--as-needed  -Wl,--whole-archive
./.libs/liblogin.a ../lib-dict/.libs/libdict.a -Wl,--no-whole-archive
-Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-O1
-Wl,--build-id    -Wl,-rpath
-Wl,/tmp/dovecot/BUILD/dovecot-2.0.3/src/lib-dovecot/.libs -Wl,-rpath
-Wl,/usr/lib64/dovecot -L/usr/lib64/ -lssl -lcrypto -ldl -lpthread
../lib-dovecot/.libs/libdovecot.so -lrt -Wl,-soname
-Wl,libdovecot-login.so.0 -o .libs/libdovecot-login.so.0.0.0
./.libs/liblogin.a(client-common.o): In function `get_var_expand_table':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/client-common.c:372:
undefined reference to `login_binary'
./.libs/liblogin.a(client-common.o): In function `client_create':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/client-common.c:50:
undefined reference to `client_vfuncs'
./.libs/liblogin.a(client-common-auth.o): In function `client_auth_parse_args':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/client-common-auth.c:111:
undefined reference to `login_binary'
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/client-common-auth.c:99:
undefined reference to `login_binary'
./.libs/liblogin.a(client-common-auth.o): In function `client_auth_begin':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/client-common-auth.c:491:
undefined reference to `login_binary'
./.libs/liblogin.a(login-settings.o): In function `login_settings_read':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/login-settings.c:195:
undefined reference to `login_binary'
./.libs/liblogin.a(main.o): In function `login_access_lookup_next':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/main.c:185:
undefined reference to `login_binary'
./.libs/liblogin.a(main.o):/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/main.c:338:
more undefined references to `login_binary' follow
./.libs/liblogin.a(main.o): In function `main':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/main.c:358:
undefined reference to `login_process_preinit'
./.libs/liblogin.a(main.o): In function `main_init':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/main.c:308:
undefined reference to `clients_init'
./.libs/liblogin.a(main.o): In function `main_deinit':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/main.c:317:
undefined reference to `clients_deinit'
./.libs/liblogin.a(sasl-server.o): In function
`anvil_check_too_many_connections':
/tmp/dovecot/BUILD/dovecot-2.0.3/src/login-common/sasl-server.c:187:
undefined reference to `login_binary'
collect2: ld returned 1 exit status

Could somebody take a look?

Thanks.

[1]: http://wiki.mandriva.com/en/Underlinking


More information about the dovecot mailing list