codegooglecom / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

libproxy fails to build on Solaris due to missing linker flags #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try to build libproxy on solaris

What is the expected output? What do you see instead?

Expected:
build successfully
Seen instead:
libtool: link: sparc-sun-solaris2.10-gcc -I../../src/lib -g -std=c99 -O2
-pipe -mcpu=ultrasparc
-DPLUGINDIR=\"/home/pub/lib/gentoo-prefix/usr/lib/libproxy/0.2.3/plugins\"
-DSYSCONFDIR=\"/home/pub/lib/gentoo-prefix/etc\" -D_POSIX_C_SOURCE=200112L
-o .libs/proxy proxy-proxy.o  ../lib/.libs/libproxy.so -lm -Wl,-rpath
-Wl,/home/pub/lib/gentoo-prefix/usr/lib                                   

../lib/.libs/libproxy.so: undefined reference to `gethostbyname'          

../lib/.libs/libproxy.so: undefined reference to `send'
../lib/.libs/libproxy.so: undefined reference to `freeaddrinfo'
../lib/.libs/libproxy.so: undefined reference to `inet_pton'
../lib/.libs/libproxy.so: undefined reference to `recv'
../lib/.libs/libproxy.so: undefined reference to `__xnet_socket'
../lib/.libs/libproxy.so: undefined reference to `__xnet_getaddrinfo'
../lib/.libs/libproxy.so: undefined reference to `getservbyname'
../lib/.libs/libproxy.so: undefined reference to `__xnet_connect'
collect2: ld returned 1 exit status
make[2]: *** [proxy] Error 1

What version of the product are you using? On what operating system?

libproxy-0.2.3
SunOS 5.10 Generic_138888-08 sun4u sparc SUNW,Sun-Fire

Please provide any additional information below.

The error is because gethostbyname, freeaddrinfo, inet_pton etc. require
the -lsocket -lnsl linker flags.
Adding the flags to the build system fixes the problem. Probably the
correct way to proceed is adding a configure check whether gethostbyname
requires -lsocket -lnsl.

Original issue reported on code.google.com by nguyench...@gmail.com on 26 May 2009 at 10:47

GoogleCodeExporter commented 9 years ago
Please try with the trunk version.

the solaris issues should have been fixed in the meantime.

Original comment by dominiqu...@gmail.com on 29 May 2009 at 9:22

GoogleCodeExporter commented 9 years ago

Original comment by dominiqu...@gmail.com on 19 Jun 2009 at 7:15