Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9807) GTK2 client doesn't link due to missing -lsocket
Home

[Freeciv-Dev] (PR#9807) GTK2 client doesn't link due to missing -lsocket

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9807) GTK2 client doesn't link due to missing -lsocket -lnsl
From: "Brett Albertson" <brett.albertson@xxxxxxxxxxxx>
Date: Wed, 25 Aug 2004 06:25:36 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9807 >

When I build the GTK2 client on Solaris, I get the following when
linking the civclient binary:

make[3]: Entering directory `/var/tmp/freeciv/client'
gcc  -O3 -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align
-Wmissing-prototypes -Wmissing-declarations   -o civclient     
attribute.o citydlg_common.o cityrepdata.o civclient.o chatline_common.o
connectdlg_common.o climisc.o climap.o clinet.o control.o goto.o
helpdata.o mapctrl_common.o mapview_common.o messagewin_common.o
packhand.o packhand_gen.o plrdlg_common.o options.o repodlgs_common.o
text.o tilespec.o audio.o audio_none.o gui-gtk-2.0/libguiclient.a
../common/aicore/libaicore.a ../utility/libcivutility.a
../common/libcivcommon.a agents/libagents.a ../common/aicore/libaicore.a
 -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
-lm -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
   -lnls -lz 
Undefined                       first referenced
 symbol                             in file
bind                                clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
gethostbyaddr                       clinet.o  (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
gethostbyname                      
../utility/libcivutility.a(netintf.o)  (symbol belongs to implicit
dependency /usr/lib/libnsl.so.1)
sendto                              clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
socket                              clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
setsockopt                          clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
connect                             clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
recvfrom                            clinet.o  (symbol belongs to
implicit dependency /usr/lib/libsocket.so.1)
inet_addr                           clinet.o  (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
inet_ntoa                           clinet.o  (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to civclient
collect2: ld returned 1 exit status
make[3]: *** [civclient] Error 1
make[3]: Leaving directory `/var/tmp/freeciv/client'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/freeciv/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/freeciv'
make: *** [all] Error 2

If I add "-lsocket -lnsl" to the civclient_LDFLAGS (or anywhere else) in
the Makefile, it links correctly.  This dependancy should probably be
detected in the configure script.

-- 
Brett Albertson
brett.albertson@xxxxxxxxxxxx


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9807) GTK2 client doesn't link due to missing -lsocket -lnsl, Brett Albertson <=