GNOME Bugzilla – Bug 633948
Try harder to use -lresolv in LDAP_LIBS
Last modified: 2011-06-03 13:48:21 UTC
Created attachment 173798 [details] [review] Try harder to use -lresolv I'm trying to build evolution-exchange 2.32.0 using the tarballs on Ubuntu natty and running into issues which I will assume are caused by new strictness in gcc 4.5: libtool: link: gcc -g -O2 -g -Wall -O2 -fPIC -fno-strict-aliasing -o exchange-connector-setup exchange_connector_setup-ximian-connector-setup.o exchange_connector_setup-exchange-autoconfig-wizard.o -pthread -pthread ../server/xntlm/.libs/libxntlm.a ../server/lib/.libs/libexchange.a -L/usr/lib ../server/storage/.libs/libexchange-storage.a -lkrb5 -lk5crypto -lcom_err -lgssapi_krb5 -lz -ledataserverui-1.2 /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpangocairo-1.0.so -lgdk_pixbuf-2.0 -lm /usr/lib/libcairo.so -lpng12 /usr/lib/libpango-1.0.so /usr/lib/libfreetype.so -lfontconfig -ledata-book-1.2 -lebook-1.2 -lcamel-1.2 /usr/lib/libsqlite3.so -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ledata-cal-1.2 -lecal-1.2 -lical -licalss -licalvcal -ledataserver-1.2 /usr/lib/libxml2.so /usr/lib/libgconf-2.so -legroupwise-1.2 -lsoup-2.4 -lebackend-1.2 /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so -lldap -llber -lnsl -pthread /usr/bin/ld.bfd.real: ../server/lib/.libs/libexchange.a(libexchange_la-e2k-autoconfig.o): undefined reference to symbol '__res_querydomain@@GLIBC_2.2.5' /usr/bin/ld.bfd.real: note: '__res_querydomain@@GLIBC_2.2.5' is defined in DSO /lib64/libresolv.so.2 so try adding it to the linker command line /lib64/libresolv.so.2: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[3]: *** [exchange-connector-setup] Erreur 1 make[3]: quittant le répertoire « /home/mtrudel/Projects/ubuntu/build-area/evolution-exchange-2.32.0/tools » make[2]: *** [all-recursive] Erreur 1 make[2]: quittant le répertoire « /home/mtrudel/Projects/ubuntu/build-area/evolution-exchange-2.32.0 » make[1]: *** [all] Erreur 2 make[1]: quittant le répertoire « /home/mtrudel/Projects/ubuntu/build-area/evolution-exchange-2.32.0 » make: *** [debian/stamp-makefile-build] Erreur This issue seems to be correct with the attached patch. It simply goes one step further and tries to see if -lresolv should be added by testing for __res_query if the check for res_query failed.
Thanks for a bug report and patch, but it doesn't work for me. The config.log shows me: > configure:15915: checking for res_query in -lresolv > configure:15940: gcc -o ... > ... > configure:15949: result: no > configure:15954: checking for __res_query in -lresolv > configure:15979: gcc -o ... > configure:15979: $? = 0 > configure:15988: result: yes > configure:16001: checking for bind in -lsocket thus the first wasn't found, but later in the same file I see: > LDAP_LIBS='-L/my/prefix/to/lib -lldap -llber -lnsl' thus no -lresolv were added to LDAP_LIBS.
Created attachment 189151 [details] [review] eex patch for evolution-exchange; I extended your patch slightly and it does the trick for me.
Created commit 44fecdf in eds master (3.1.2+) Created commit e246eac in evo master (3.1.2+) Created commit 1c35459 in eex master (3.1.2+)
*** Bug 642623 has been marked as a duplicate of this bug. ***