# openssh-3.9_p1-r2 Emerge Error

## ghanley

Greetings, all.

I'm having some trouble emerging openSSH. Here's the error:

collect2: ld returned 1 exit status

make: *** [sshd] Error 1

make: *** Waiting for unfinished jobs....

!!! ERROR: net-misc/openssh-3.9_p1-r2 failed.

!!! Function src_compile, Line 114, Exitcode 2

!!! compile problem

!!! If you need support, post the topmost build error, NOT this status message.

Any help or advice would e greatly appreciated. 

Here's my system info:

emerge --info

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.10-gentoo-r6 i686)

=================================================================

System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 2500+

Gentoo Base System version 1.4.16

Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 28 2005, 07:53:33)]

distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]

dev-lang/python:     2.3.5

sys-apps/sandbox:    [Not Present]

sys-devel/autoconf:  2.13, 2.59-r6

sys-devel/automake:  1.5, 1.9.4, 1.8.5-r3, 1.4_p6, 1.6.3, 1.7.9-r1

sys-devel/binutils:  2.15.92.0.2-r7

sys-devel/libtool:   1.4.3-r4

virtual/os-headers:  2.6.8.1

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="x86 3dnow X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl eds emacs emboss encode esd ethereal fam flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 guile imagemagick imlib ipv6 java jpeg ldap libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python readline sdl slang spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Thank you!

-- Gary

----------

## nixnut

post some more lines of the output before the error, about 15 lines.

----------

## ghanley

 *nixnut wrote:*   

> post some more lines of the output before the error, about 15 lines.

 

OK:

a - scard-opensc.o

a - gss-genr.o

i686-pc-linux-gnu-ranlib libssh.a

i686-pc-linux-gnu-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lresolv -lcrypto -lutil -lz -lnsl -lcrypt

i686-pc-linux-gnu-gcc -o sshd sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o sshpty.o sshlogin.o ser vconf.o serverloop.o auth.o auth1.o auth2.o auth-options.o session.o auth-chall.o auth2-chall.o groupaccess.o aut h-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-pa m.o auth-shadow.o auth-sia.o md5crypt.o ldapauth.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lwrap -lpam -ld l -lresolv -lcrypto -lutil -lz -lnsl -lcrypt

i686-pc-linux-gnu-gcc -o ssh-add ssh-add.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lresolv -lcrypto -lutil  -lz -lnsl -lcrypt

i686-pc-linux-gnu-gcc -o ssh-keygen ssh-keygen.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lresolv -lcrypto -lutil -lz -lnsl -lcrypt

ldapauth.o(.text+0x99): In function `ldap_connect':

: undefined reference to `ldap_init'

ldapauth.o(.text+0xbc): In function `ldap_connect':

: undefined reference to `ldap_set_option'

ldapauth.o(.text+0xe8): In function `ldap_connect':

: undefined reference to `ldap_simple_bind_s'

ldapauth.o(.text+0x109): In function `ldap_connect':

: undefined reference to `ldap_perror'

ldapauth.o(.text+0x12b): In function `ldap_connect':

: undefined reference to `ldap_start_tls_s'

ldapauth.o(.text+0x142): In function `ldap_connect':

: undefined reference to `ldap_perror'

ldapauth.o(.text+0x15b): In function `ldap_connect':

: undefined reference to `ldap_init'

ldapauth.o(.text+0x176): In function `ldap_connect':

: undefined reference to `ldap_set_option'

ldapauth.o(.text+0x294): In function `ldap_parse_servers':

: undefined reference to `ldap_is_ldap_url'

ldapauth.o(.text+0x349): In function `ldap_parse_servers':

: undefined reference to `ldap_free_urldesc'

ldapauth.o(.text+0x36e): In function `ldap_parse_servers':

: undefined reference to `ldap_free_urldesc'

ldapauth.o(.text+0x387): In function `ldap_parse_servers':

: undefined reference to `ldap_url_parse'

ldapauth.o(.text+0x501): In function `ldap_keys_free':

: undefined reference to `ldap_value_free'

ldapauth.o(.text+0x5c9): In function `ldap_getuserkey':

: undefined reference to `ldap_search_s'

ldapauth.o(.text+0x5ec): In function `ldap_getuserkey':

: undefined reference to `ldap_count_entries'

ldapauth.o(.text+0x606): In function `ldap_getuserkey':

: undefined reference to `ldap_first_entry'

ldapauth.o(.text+0x61d): In function `ldap_getuserkey':

: undefined reference to `ldap_get_values'

ldapauth.o(.text+0x627): In function `ldap_getuserkey':

: undefined reference to `ldap_count_values'

ldapauth.o(.text+0x636): In function `ldap_getuserkey':

: undefined reference to `ldap_msgfree'

ldapauth.o(.text+0x65a): In function `ldap_getuserkey':

: undefined reference to `ldap_msgfree'

ldapauth.o(.text+0x67b): In function `ldap_getuserkey':

: undefined reference to `ldap_perror'

ldapauth.o(.text+0x783): In function `ldap_ismember':

: undefined reference to `ldap_search_s'

ldapauth.o(.text+0x7a6): In function `ldap_ismember':

: undefined reference to `ldap_count_entries'

ldapauth.o(.text+0x7b6): In function `ldap_ismember':

: undefined reference to `ldap_msgfree'

ldapauth.o(.text+0x7c7): In function `ldap_ismember':

: undefined reference to `ldap_msgfree'

ldapauth.o(.text+0x7e1): In function `ldap_ismember':

: undefined reference to `ldap_perror'

collect2: ld returned 1 exit status

make: *** [sshd] Error 1

make: *** Waiting for unfinished jobs....

!!! ERROR: net-misc/openssh-3.9_p1-r2 failed.

!!! Function src_compile, Line 114, Exitcode 2

!!! compile problem

!!! If you need support, post the topmost build error, NOT this status message.

----------

## FreeFly42

Try

```
USE="-ldap" emerge -av openssh
```

or add -ldap to your /etc/make.conf and then emerge openssh again.  It seems that openssh adds +ldap by default even if you don't have it in your make.conf, but then one of the openssh dependencies is compiled without ldap support if you don't have it, hence the missing symbols.

----------

## darkphader

Maybe this:

https://bugs.gentoo.org/show_bug.cgi?id=94270

----------

## ghanley

Well, I already have ldap in my make.conf. 

I'll have to play around some more.  Maybe it's something I did...?

Thanks!

----------

## nikolai.schreier

Having the exact same problem here. Sure this isn't a dependency problem, since I did a emerge -e world and it stopped right here. 

But https://bugs.gentoo.org/show_bug.cgi?id=94270 indeed seems to be the issue. It was fixed in cvs 2 days ago and may take a while before hitting portage.

Well, USE="-ldap" emerge --oneshot openssh for now

Nik

----------

## ghanley

I finally got the package installed after unmerging and deleting anything openssh and then running emerge sync. 

Banging a nail with a sledgehammer I guess.

----------

