After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633948 - Try harder to use -lresolv in LDAP_LIBS
Try harder to use -lresolv in LDAP_LIBS
Status: RESOLVED FIXED
Product: Evolution Exchange
Classification: Deprecated
Component: Connector
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: Connector Maintainer
Ximian Connector QA
: 642623 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-11-03 20:15 UTC by Mathieu Trudel-Lapierre
Modified: 2011-06-03 13:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Try harder to use -lresolv (1.42 KB, patch)
2010-11-03 20:15 UTC, Mathieu Trudel-Lapierre
none Details | Review
eex patch (1.20 KB, patch)
2011-06-03 12:15 UTC, Milan Crha
committed Details | Review

Description Mathieu Trudel-Lapierre 2010-11-03 20:15:34 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.
Comment 1 Milan Crha 2011-06-03 12:12:47 UTC
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.
Comment 2 Milan Crha 2011-06-03 12:15:30 UTC
Created attachment 189151 [details] [review]
eex patch

for evolution-exchange;

I extended your patch slightly and it does the trick for me.
Comment 3 Milan Crha 2011-06-03 13:14:14 UTC
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+)
Comment 4 Milan Crha 2011-06-03 13:48:21 UTC
*** Bug 642623 has been marked as a duplicate of this bug. ***