bugzilla-daemon at mindrot.org
2005-Jun-03 18:41 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 Summary: Static Compile of 4.1.pl1 fails on Solaris 9 Product: Portable OpenSSH Version: 4.1p1 Platform: UltraSparc OS/Version: Solaris Status: NEW Severity: normal Priority: P2 Component: Build system AssignedTo: bitbucket at mindrot.org ReportedBy: mc_reis at hotmail.com Hello, I'm really at a loss here trying to compile openssh4.1pl1 statically on my Solaris box. Dynamically compiling with the same flags works (removing -static). I'm using gcc 3.3.0 and openssl 0.9.7g. I'll attach the entire config log later. Please let me know if I can provide any additional information. <Script used to call configure> export CFLAGS="-I/usr/cs/lib:/usr/lib" export CPPFLAGS="-I/usr/cs/lib:/usr/lib" export LD_LIBRARY_PATH=/usr/cs/lib:/usr/lib ./configure LD_LIBRARY_PATH=/usr/cs/lib:/usr/lib --prefix=/usr/cs/testing --with-zlib=/usr/cs/testing/lib/ --with-ssl-dir=/usr/cs/ssl --with-ldflags="-static -lnsl" </Script> <Configure Messages> .... checking whether snprintf correctly terminates long strings... yes checking whether system supports SO_PEERCRED getsockopt... no checking whether getpgrp requires zero arguments... yes configure: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) *** </Messages> <Listing of openssl libs> ls -al /usr/cs/lib | grep libcrypto.a -rw-r--r-- 1 root 2059764 May 16 17:30 libcrypto.a </Listing> <Excerpt of Config.log> configure:13908: gcc -o conftest -I/usr/cs/lib:/usr/lib -Wall -Wpointer-arith -Wno-uninitialized -I/usr/local/ssl/include -I/usr/cs/testing/lib/ -I/usr/cs/lib:/usr/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/cs/testing/lib/ -R/usr/cs/testing/lib/ -static -lnsl conftest.c -lcrypto -lz -lsocket >&5 Undefined first referenced symbol in file endnetconfig /usr/lib/libsocket.a(_soutil.o) getnetconfig /usr/lib/libsocket.a(_soutil.o) setnetconfig /usr/lib/libsocket.a(_soutil.o) ld: fatal: Symbol referencing errors. No output written to conftest collect2: ld returned 1 exit status configure:13914: $? = 1 configure: failed program was: </Config.log> ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 18:56 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From tim at multitalents.net 2005-06-04 04:56 ------- Why are you are using --with-ssl-dir=/usr/cs/ssl if your ssl libs are in /usr/cs/lib? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 18:59 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From mc_reis at hotmail.com 2005-06-04 04:59 ------- (In reply to comment #1)> Why are you are using --with-ssl-dir=/usr/cs/ssl if your ssl libs > are in /usr/cs/lib?The openssl is a split install where /usr/cs/ssl contains "certs, man, private" and /usr/cs/lib contains the libs. I've also created symlinks for lib and include in /usr/cs/ssl to point to /usr/cs in addition to changing that flag to try /usr/cs and /usr/cs/lib. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 18:59 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From mc_reis at hotmail.com 2005-06-04 04:59 ------- Created an attachment (id=927) --> (http://bugzilla.mindrot.org/attachment.cgi?id=927&action=view) Config.log Here is the configure log from a failed ./configure ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 19:50 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From tim at multitalents.net 2005-06-04 05:50 ------- (In reply to comment #2)> The openssl is a split install where /usr/cs/ssl contains "certs, man,...OpenSSH doesn't care where the ssl certs, etc. are. It only cares about the libs and include files. So if the openssl libs are in /sr/cs/lib and the includes are in /usr/cs/include, you would use --with-ssl-dir=/usr/cs But now back to the real problem.> Undefined first referenced > symbol in file > endnetconfig /usr/lib/libsocket.a(_soutil.o) > getnetconfig /usr/lib/libsocket.a(_soutil.o) > setnetconfig /usr/lib/libsocket.a(_soutil.o) > ld: fatal: Symbol referencing errors. No output written to conftest > collect2: ld returned 1 exit statusDoes Solaris 9 have /usr/lib/libnsl.a ? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 20:22 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From mc_reis at hotmail.com 2005-06-04 06:22 ------- Yes, it is there. /usr/cs/src/openssh-4.1p1 ; ls -al /usr/lib | grep nsl -rw-r--r-- 1 root 1184388 Oct 9 2003 libnsl.a lrwxrwxrwx 1 root 13 Jun 22 2004 libnsl.so -> ./libnsl.so.1 -rwxr-xr-x 1 root 743856 Oct 9 2003 libnsl.so.1 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 20:39 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From tim at multitalents.net 2005-06-04 06:39 ------- OK so track down which library has endnetconfig, getnetconfig, and setnetconfig in it. You may find they don't exist in a static library. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-03 21:05 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From mc_reis at hotmail.com 2005-06-04 07:05 ------- Hrm.. The symbols look like they are in libnsl.a /usr/cs/src/openssh-4.1p1 ; nm /usr/lib/libnsl.a | grep endnetconfig 0000011c T endnetconfig U endnetconfig U endnetconfig U endnetconfig U endnetconfig U endnetconfig U endnetconfig U endnetconfig U endnetconfig /usr/cs/src/openssh-4.1p1 ; objdump -t /usr/lib/libnsl.a | grep -i setnetconfig 0000005c g F .text 000000c0 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig 00000000 F *UND* 00000000 setnetconfig /usr/cs/src/openssh-4.1p1 ; objdump -t /usr/lib/libnsl.a | grep -i getnetconfig 00000574 l F .text 00000260 fgetnetconfig 00000190 g F .text 00000114 getnetconfig 000002a4 g F .text 00000154 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent 00000000 F *UND* 00000000 getnetconfig 00000000 F *UND* 00000000 getnetconfigent ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jun-04 00:45 UTC
[Bug 1052] Static Compile of 4.1.pl1 fails on Solaris 9
http://bugzilla.mindrot.org/show_bug.cgi?id=1052 ------- Additional Comments From dtucker at zip.com.au 2005-06-04 10:45 ------- To fix that particular problem, you just need to reverse the order of the -lsocket and -lnsl. ./configure --with-ldflags=-static --libs=-lnsl ought to do it. It's likely that it still won't build, though, since static linking is not supported by Sun: http://www.sun.com/bigadmin/content/misc/solaris2faq.html#q6.24 $ cat test.c char RAND_add(); int main() { RAND_add(); return 0; } $ gcc test.c -L/usr/local/ssl/lib -static -lcrypto -lsocket -lnsl /usr/lib/libnsl.a(netdir.o)(.text+0xdec): In function `load_xlate': : undefined reference to `dlopen' /usr/lib/libnsl.a(netdir.o)(.text+0xe20): In function `load_xlate': : undefined reference to `dlsym' [snip other dl* functions] You may be able to fiddle with the linker flags to make it build, according to the information at the URL and your requirements. If you do then good luck to you, however since static linking isn't supported by Sun it's not supported by us either. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.