Bug 1391 - Problem compiling openssh 4.7p1
Summary: Problem compiling openssh 4.7p1
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 4.7p1
Hardware: Other Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
: 1389 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-12 11:50 AEDT by Pierre
Modified: 2008-04-04 10:01 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre 2007-11-12 11:50:56 AEDT
# make
(cd openbsd-compat && make)
make[1]: Entering directory `/tmp/openssh-4.7p1/openbsd-compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/openssh-4.7p1/openbsd-compat'
gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lsectok -lcrypto -lskey -lutil -lz -lnsl  -lcrypt -L/usr/local/lib -lopensc -lscconf -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -s -O3 -march=i686 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -std=gnu99 -L/usr/local/BerkeleyDB.4.1/lib -lpthread -lgpm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: warning: libcrypto.so.0.9.6, needed by /usr/local/lib/libopensc.so, not found (try using -rpath or -rpath-link)
/usr/lib/libncurses.so.5: undefined reference to `SP'
/usr/lib/libncurses.so.5: undefined reference to `_nc_set_buffer'
/usr/lib/libncurses.so.5: undefined reference to `tparm'
/usr/lib/libncurses.so.5: undefined reference to `_nc_globals'
/usr/lib/libncurses.so.5: undefined reference to `_nc_str_null'
/usr/lib/libncurses.so.5: undefined reference to `_nc_init_acs'
/usr/lib/libncurses.so.5: undefined reference to `del_curterm'
/usr/lib/libncurses.so.5: undefined reference to `_nc_doalloc'
/usr/lib/libncurses.so.5: undefined reference to `_nc_get_tty_mode'
/usr/lib/libncurses.so.5: undefined reference to `_nc_add_to_try'
/usr/lib/libncurses.so.5: undefined reference to `_nc_unicode_locale'
/usr/lib/libncurses.so.5: undefined reference to `keyok'
/usr/lib/libncurses.so.5: undefined reference to `TABSIZE'
/usr/lib/libncurses.so.5: undefined reference to `def_shell_mode'
/usr/lib/libncurses.so.5: undefined reference to `_nc_str_copy'
/usr/lib/libncurses.so.5: undefined reference to `erasechar'
/usr/lib/libncurses.so.5: undefined reference to `reset_prog_mode'
/usr/lib/libncurses.so.5: undefined reference to `nocbreak'
/usr/local/lib/libopensc.so: undefined reference to `des_ecb3_encrypt'
/usr/lib/libncurses.so.5: undefined reference to `unctrl'
/usr/lib/libncurses.so.5: undefined reference to `tigetflag'
/usr/lib/libncurses.so.5: undefined reference to `_nc_locale_breaks_acs'
/usr/lib/libncurses.so.5: undefined reference to `reset_shell_mode'
/usr/lib/libncurses.so.5: undefined reference to `cbreak'
/usr/lib/libncurses.so.5: undefined reference to `_nc_access'
/usr/lib/libncurses.so.5: undefined reference to `tputs'
/usr/lib/libncurses.so.5: undefined reference to `_nc_get_screensize'
/usr/local/lib/libopensc.so: undefined reference to `des_set_key_unchecked'
/usr/lib/libncurses.so.5: undefined reference to `_nc_screen_chain'
/usr/lib/libncurses.so.5: undefined reference to `_nc_safe_strcat'
/usr/lib/libncurses.so.5: undefined reference to `_nc_set_tty_mode'
/usr/lib/libncurses.so.5: undefined reference to `_nc_str_init'
/usr/lib/libncurses.so.5: undefined reference to `tigetstr'
/usr/lib/libncurses.so.5: undefined reference to `set_curterm'
/usr/lib/libncurses.so.5: undefined reference to `cur_term'
/usr/lib/libncurses.so.5: undefined reference to `_nc_flush'
/usr/lib/libncurses.so.5: undefined reference to `raw'
/usr/lib/libncurses.so.5: undefined reference to `putp'
/usr/lib/libncurses.so.5: undefined reference to `has_ic'
/usr/lib/libncurses.so.5: undefined reference to `acs_map'
/usr/lib/libncurses.so.5: undefined reference to `_nc_safe_strcpy'
/usr/lib/libncurses.so.5: undefined reference to `curs_set'
/usr/lib/libncurses.so.5: undefined reference to `_nc_update_screensize'
/usr/lib/libncurses.so.5: undefined reference to `setupterm'
/usr/lib/libncurses.so.5: undefined reference to `_nc_keypad'
/usr/lib/libncurses.so.5: undefined reference to `flushinp'
/usr/local/lib/libgpm.so: undefined reference to `stdscr'
/usr/lib/libncurses.so.5: undefined reference to `_nc_prescreen'
/usr/lib/libncurses.so.5: undefined reference to `typeahead'
/usr/lib/libncurses.so.5: undefined reference to `noraw'
/usr/lib/libncurses.so.5: undefined reference to `COLS'
/usr/lib/libncurses.so.5: undefined reference to `newscr'
/usr/lib/libncurses.so.5: undefined reference to `baudrate'
/usr/lib/libncurses.so.5: undefined reference to `_nc_getenv_num'
/usr/lib/libncurses.so.5: undefined reference to `killchar'
/usr/lib/libncurses.so.5: undefined reference to `curscr'
/usr/lib/libncurses.so.5: undefined reference to `_nc_timed_wait'
/usr/lib/libncurses.so.5: undefined reference to `_nc_handle_sigwinch'
/usr/lib/libncurses.so.5: undefined reference to `wtimeout'
/usr/lib/libncurses.so.5: undefined reference to `_nc_outch'
/usr/lib/libncurses.so.5: undefined reference to `LINES'
/usr/lib/libncurses.so.5: undefined reference to `def_prog_mode'
collect2: ld returned 1 exit status
make: *** [ssh] Error 1
Comment 1 Darren Tucker 2007-11-14 04:15:43 AEDT
What distro are you using, and what arguments did you give to openssh's configure?  You have several libraries that I would not expect to see (eg gpm, searching the berkeley DB dirs).

> /bin/ld:
> warning: libcrypto.so.0.9.6, needed by /usr/local/lib/libopensc.so, not
> found (try using -rpath or -rpath-link)

This seems to indicate that your opensc library was built against a version of openssl that is no longer installed.
Comment 2 Pierre 2007-11-15 08:40:16 AEDT
It's a LFS GNU/Linux system
I used ./configure --with-zlib --with-skey --with-ssl-engine --with-pam --with-rand-helper --with-sectok --with-opensc --with-kerberos5 --with-md5-passwords
I saw the error with opensc, but is it really the cause of the problem ?
Comment 3 Darren Tucker 2007-11-15 11:30:02 AEDT
(In reply to comment #2)
> It's a LFS GNU/Linux system
> I used ./configure --with-zlib --with-skey --with-ssl-engine --with-pam
> --with-rand-helper --with-sectok --with-opensc --with-kerberos5
> --with-md5-passwords
> I saw the error with opensc, but is it really the cause of the problem

Probably not, but it certainly casts serious doubt over the integrity of the system.

I suspect you have one or more problems with your libraries being linked against other libraries that are now missing or replaced. Since every LFS system is effectively a custom one-of-a-kind, sorting it out is up to you.

I suggest that you start by building openssh without any options.  If that works, start adding options one at a time until it stops working, then remove *all* of the files associated with that package that breaks it (make sure you get ones in /usr/local as well as /usr/{lib,include}), rebuild the package then try openssh again.  Repeat until everything you want works.
Comment 4 Pierre 2007-11-19 08:37:47 AEDT
I succeed to make it compile when I just removed the --with-opensc and --with-kerberos5 options.
There must be a problem with these libs on my system, and I will try to recompile them properly.
But maybe is it possible to add a check to the configure script to detect this kind of problems before the compilation ?
Comment 5 Darren Tucker 2007-11-19 19:13:34 AEDT
(In reply to comment #4)
> I succeed to make it compile when I just removed the --with-opensc and
> --with-kerberos5 options.
> There must be a problem with these libs on my system, and I will try to
> recompile them properly.
> But maybe is it possible to add a check to the configure script to
> detect this kind of problems before the compilation ?

Configure does a number of sanity checks but there's an almost infinite number of ways that a system can be broken so it's impossible for configure to check for all of them.  Closing bug.
Comment 6 Darren Tucker 2007-11-19 19:14:39 AEDT
*** Bug 1389 has been marked as a duplicate of this bug. ***
Comment 7 Damien Miller 2008-04-04 10:01:21 AEDT
Close resolved bugs after release.