hi, i have downloaded the linux-version of openssh-3.0.2p1. i wanted to compile it statically with the following configure-statement: ./configure --prefix=/usr/local/opt/openssh-3.0.2p1 --with-pam --with-md5-passwords --with-v4-default --with-ldflags=-static --with-ssl-dir=/usr/local/opt/openssl It worked for the older 2.9 version, but now i get the following error: gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/usr/local/opt/openssl/lib -static -lssh -lopenbsd-compat -lpam -ldl -lutil -lz -lnsl -lcrypto /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc.a(getopt.o): In function `_getopt_internal': /usr/src/build/40453-i386/BUILD/glibc-2.2.4/posix/getopt.c:516: multiple definition of `optind' openbsd-compat//libopenbsd-compat.a(getopt.o):/home/olli/openssh-3.0.2p1/openbsd-compat/getopt.c:64: first defined here /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc.a(getopt.o): In function `_getopt_internal': /usr/src/build/40453-i386/BUILD/glibc-2.2.4/posix/getopt.c:516: multiple definition of `opterr' openbsd-compat//libopenbsd-compat.a(getopt.o):/home/olli/openssh-3.0.2p1/openbsd-compat/getopt.c:64: first defined here collect2: ld returned 1 exit status make: *** [ssh] Error 1 Do you have a idea, whats the problem? how can i compile it statically? oliver -- Dipl. Inf. (FH) Oliver Joa senior IT-architect Gatrixx NetSolutions GmbH Karl-Goetz-Strasse 5 97424 Schweinfurt Fon +49 9721 797 420 Fax +49 9383 999-58 Mobil +49 160 47874 62 mailto:ojoa at gatrixx.com, ojoa at gmx.net, ojoa at yahoo.com, oliver at j-o-a.de Weitere Informationen erhalten Sie unter: http://www.gedif.de/
On Wed, Feb 27, 2002 at 11:06:54PM +0100, Oliver Joa wrote:> hi, > > i have downloaded the linux-version of openssh-3.0.2p1. i wanted > to compile it statically with the following configure-statement: > > ./configure --prefix=/usr/local/opt/openssh-3.0.2p1 --with-pam > --with-md5-passwords --with-v4-default --with-ldflags=-static > --with-ssl-dir=/usr/local/opt/openssl > > Do you have a idea, whats the problem? how can i compile > it statically?Well, I don't know the answer to your question, but --with-pam and static should be mutually exclusive. /fc
On Wed, 27 Feb 2002, Oliver Joa wrote:> hi, > > i have downloaded the linux-version of openssh-3.0.2p1. i wanted > to compile it statically with the following configure-statement: > > ./configure --prefix=/usr/local/opt/openssh-3.0.2p1 --with-pam > --with-md5-passwords --with-v4-default --with-ldflags=-static > --with-ssl-dir=/usr/local/opt/openssl >first off.. --with-md5-passwords is a worthless option if --with-pam is set. Since pam handles des vs md5 vs "password encryption of the month club".> It worked for the older 2.9 version, but now i get the following error: > > gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o > readconf.o clientloop.o -L. -Lopenbsd-compat/ > -L/usr/local/opt/openssl/lib -static -lssh -lopenbsd-compat -lpam -ldl > -lutil -lz -lnsl -lcrypto > /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc.a(getopt.o): In > function `_getopt_internal': > /usr/src/build/40453-i386/BUILD/glibc-2.2.4/posix/getopt.c:516: > multiple definition of `optind' > openbsd-compat//libopenbsd-compat.a(getopt.o):/home/olli/openssh-3.0.2p1/openbsd-compat/getopt.c:64: > first defined hereSecond off.. Since glibc does not support 'int optreset;' functionality implemented in most BSDes. We have to include our own. As a result a clash occurs on staticly compiling. To hack around to support -static on most platforms lacking optreset is too ugly to implement IMNSHO (and I think others agreed by lack of implementing it). If you really wish to play around go to openbsd-compat/getopt.c and change 'opterr' and 'optind' to extern int opterr; extern int optind; However if your mother dies due to the fact a crosswalk turns green while the redlight is on.. It is not our fault. =) And the concept of -static and --with-pam are not always compatible. - Ben