| Summary: | Static Compile of 4.1.pl1 fails on Solaris 9 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Mark Reis <mc_reis> | ||||
| Component: | Build system | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED INVALID | ||||||
| Severity: | normal | ||||||
| Priority: | P2 | ||||||
| Version: | 4.1p1 | ||||||
| Hardware: | UltraSPARC | ||||||
| OS: | Solaris | ||||||
| Attachments: |
|
||||||
|
Description
Mark Reis
2005-06-04 04:41:18 AEST
Why are you are using --with-ssl-dir=/usr/cs/ssl if your ssl libs are in /usr/cs/lib? (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. Created attachment 927 [details]
Config.log
Here is the configure log from a failed ./configure
(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 status Does Solaris 9 have /usr/lib/libnsl.a ? 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 OK so track down which library has endnetconfig, getnetconfig, and setnetconfig in it. You may find they don't exist in a static library. 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
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. Static linking isn't supported by the OS vendor so closing this bug. Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4. |