strange library linking problem
Hi,On solaris 8, i'm trying to compile sshd 4.0p1 statically to roll out to a network, but im getting problems.. im no expert with solaris, but iirc the same sorta trick works with linux:
Code:
[01:30 PM] jumpstart1:/var/tmp/andy/openssh-4.0p1# gcc -o sshd sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o sshpty.o sshlogin.o servconf.o serverloop.o auth.o auth1.o auth2.o auth-options.o session.o auth-chall.o auth2-chall.o groupaccess.o auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o auth-krb5.o auth2-gss.o gss-serv.o gss-serv-krb5.o loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o audit.o audit-bsm.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/lib -lssh -lopenbsd-compat -lresolv -lcrypto -lrt -lz -lsocket -lnsl [01:32 PM] jumpstart1:/var/tmp/andy/openssh-4.0p1# ll sshd -rwxr-xr-x 1 root other 990372 Jun 21 13:32 sshd* [01:32 PM] jumpstart1:/var/tmp/andy/openssh-4.0p1#
Code:
[01:32 PM] jumpstart1:/var/tmp/andy/openssh-4.0p1# gcc -o sshd sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o sshpty.o sshlogin.o servconf.o serverloop.o auth.o auth1.o auth2.o auth-options.o session.o auth-chall.o auth2-chall.o groupaccess.o auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o auth-krb5.o auth2-gss.o gss-serv.o gss-serv-krb5.o loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o audit.o audit-bsm.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/lib -lssh -lopenbsd-compat -lresolv -lcrypto -lrt -lz -lsocket -lnsl -static ld: fatal: library -lresolv: not found ld: fatal: library -lrt: not found ld: fatal: File processing errors. No output written to sshd collect2: ld returned 1 exit status [01:33 PM] jumpstart1:/var/tmp/andy/openssh-4.0p1#