This is a fresh gentoo install on an AMD Sempron CPU. The version of openssh that shipped with the 2007.0 Stage 3 installed and runs fine, but some flags I want (especially "X") are not set. But every time I try to emerge an update for this package, compilation fails. Scouring the emerge log for clues suggests that LDAP may be to blame, so I have re-emerged openldap repeatedly, but the problem persists. Reproducible: Always Steps to Reproduce: 1. emerge -vaNDu openssh 2. wait a long time until it dies Actual Results: Excerpts from the emerge log: OpenSSH has been configured with the following options: User binaries: /usr/bin System binaries: /usr/sbin Configuration files: /etc/ssh Askpass program: /usr/lib64/misc/ssh-askpass Manual pages: /usr/share/man/manX PID file: /var/run Privilege separation chroot path: /var/empty sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin Manpage format: doc PAM support: no OSF SIA support: no KerberosV support: no SELinux support: no Smartcard support: no S/KEY support: no TCP Wrappers support: yes MD5 password support: yes libedit support: no Solaris process contract support: no IP address in $DISPLAY hack: no Translate v4 in v6 hack: yes BSD Auth support: no Random number source: OpenSSL internal ONLY Host: x86_64-pc-linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compiler flags: -march=k8 -msse3 -pipe -O2 -fno-reorder-blocks -fno-reorder-functions -Wall -Wpointer-arith -Wuninitialized -Wsign-c Preprocessor flags: Linker flags: Libraries: -lssl -lcrypto -ldl -lutil -lz -lnsl -lcrypt -lresolv -lresolv +for sshd: -lwrap Trouble starts way farther down the process, and looks like this.... a - kexdhc.o a - kexgexc.o a - scard.o a - msg.o a - progressmeter.o a - dns.o a - entropy.o a - scard-opensc.o a - gss-genr.o a - umac.o x86_64-pc-linux-gnu-ranlib libssh.a x86_64-pc-linux-gnu-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/ -l x86_64-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 servconf.o serverloop.o ./libssh.a(cipher.o): In function `cipher_set_keyiv': cipher.c:(.text+0x1ae): undefined reference to `EVP_CIPHER_CTX_iv_length' ./libssh.a(cipher.o): In function `cipher_get_keyiv': cipher.c:(.text+0x2ce): undefined reference to `EVP_CIPHER_CTX_iv_length' ./libssh.a(cipher.o): In function `cipher_crypt': cipher.c:(.text+0x420): undefined reference to `EVP_Cipher' .... ./libssh.a(mac.o): In function `mac_setup': mac.c:(.text+0x237): undefined reference to `EVP_MD_size' ./libssh.a(kexdh.o): In function `kex_dh_hash': kexdh.c:(.text+0x15a): undefined reference to `EVP_MD_size' ./libssh.a(kexgex.o): In function `kexgex_hash': kexgex.c:(.text+0x1ba): undefined reference to `EVP_MD_size' collect2: ld returned 1 exit status make: *** [sshd] Error 1 * * ERROR: net-misc/openssh-4.7_p1-r1 failed. * Call stack: * ebuild.sh, line 1701: Called dyn_compile * ebuild.sh, line 1039: Called qa_call 'src_compile' * ebuild.sh, line 44: Called src_compile * openssh-4.7_p1-r1.ebuild, line 122: Called die * The specific snippet of code: * emake || die "compile problem" * The die message: * compile problem * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/net-misc:openssh-4.7_p1-r1:20071218-005256.log'. Expected Results: Successful compilation and installation # uname -a Linux monkey 2.6.23-gentoo-r3 #2 SMP Mon Dec 10 08:02:56 PST 2007 x86_64 AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux # emerge --info Portage 2.1.3.19 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 x86_64) ================================================================= System uname: 2.6.23-gentoo-r3 x86_64 AMD Sempron(tm) Processor 3000+ Timestamp of tree: Mon, 17 Dec 2007 14:30:01 +0000 app-shells/bash: 3.2_p17 dev-java/java-config: 2.0.33-r1 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -pipe -O2 -fno-reorder-blocks -fno-reorder-functions" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ex t-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=k8 -msse3 -pipe -O2 -fno-reorder-blocks -fno-reorder-functions" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --t imeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 arts bash-completion berkdb bitmap-fonts cairo cdaudio cdr cdrom chroot cli colordiff cracklib dbus depth32 d ri dvd dvdr dvdread dvi eds emboss encode enscript esd evo exif fam flac fortran gdbm gif glx gpm gstreamer gtk gtk2 hal html iconv ipv6 isdnlog jpeg jpeg2k lame latex lcd lm_sensors logrotate mad md5sum midi mikmod mmx mono mp3 mpeg mudflap nas ncurses nfs nls nptl nptlo nly ntplonly nvidia ogg opengl openmp oss pcre pdf perl php png ppds print procmail python qt3 qt3support qt4 quicktime readline reflect ion reiserfs rtc screen sdl server session spell spl sse sse2 ssl subversion svg tcpd tcpwrapper tetex tiff truetype truetype-fonts type 1-fonts unicode vga vim-syntax vorbis xml xorg xterm xv xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci e mu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_P CM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null p lug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file au thz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env e xpires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad c fontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga vi a vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT
Either you chopped off some lines in your paste, or your system is broken: [block] x86_64-pc-linux-gnu-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o -L. -Lopenbsd-compat/ -l x86_64-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 servconf.o serverloop.o [/block] there should be an argument after -l, and there is no -l after the sshd, which means that openssl was not linked against as it should have been.
dont post excerpts, post the whole log ... and post it as an attachment
Created attachment 138894 [details] Build log for openssh 4.7.1-r1
post the config.log and Makefile as an attachment please: /var/tmp/portage/net-misc/openssh-4.7_p1*/work/openssh-4.7p1/Makefile /var/tmp/portage/net-misc/openssh-4.7_p1*/work/openssh-4.7p1/config.log
Created attachment 139297 [details] Makefile from 20 December emerge attempt As requested by SpanKY
Created attachment 139299 [details] config log from 20 December emerge attempt As requested ... Thanks for taking an interest. - Philip
Created attachment 139301 [details] Build log from 20 December emerge attempt Updated build log to match dates of other attachments -- replaces prev (older) copy
i'm guessing your original post is wrong as the output is quite different from your actual log file run: readelf -W -s /usr/lib/libcrypto.so | grep EVP_CIPHER_CTX make sure your crytpo lib has those EVP functions
(In reply to comment #8) > i'm guessing your original post is wrong as the output is quite different from > your actual log file No red-blooded gentoo user is going to boot ubuntu and wait while the smart guys solve his problems! So of course I have been trying all sorts of stuff while waiting. This may explain some drift between the content of my original post and the latest emerge log. This is why I later provided a consistent snapshot from 20 December. The key problem is unchanged, though. [More below.] > run: readelf -W -s /usr/lib/libcrypto.so | grep EVP_CIPHER_CTX > > make sure your crytpo lib has those EVP functions All those functions seem to be there. Here is the output from that command: # readelf -W -s /usr/lib/libcrypto.so | grep EVP_CIPHER_CTX 294: 00000000000c9330 149 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_ctrl 427: 00000000000cf8e0 7 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_block_size 670: 00000000000cf980 4 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_key_length 799: 00000000000c9410 104 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_set_key_length 1027: 00000000000c9310 30 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_set_padding 1074: 00000000000cf940 5 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_set_app_data 1129: 00000000000c94f0 25 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_free 1656: 00000000000cf960 7 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_iv_length 2267: 00000000000cf900 4 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_cipher 2461: 00000000000c9b70 44 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_new 2463: 00000000000cf930 5 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_get_app_data 2597: 00000000000cf920 8 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_flags 2634: 00000000000cf9a0 6 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_nid 2683: 00000000000c9510 12 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_init 3110: 00000000000c93d0 59 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_rand_key 3202: 00000000000c9480 102 FUNC GLOBAL DEFAULT 11 EVP_CIPHER_CTX_cleanup (In reply to comment #8) > i'm guessing your original post is wrong as the output is quite different from > your actual log file > > run: readelf -W -s /usr/lib/libcrypto.so | grep EVP_CIPHER_CTX > > make sure your crytpo lib has those EVP functions >
go into the build directory and run this: make sshd LDFLAGS='-L. -Lopenbsd-compat -Wl,--verbose -Wl,-M' >& log then post the log file as an attachment
Created attachment 139481 [details] log file from 'make' command suggested by SpanKY Thank you for your efficient and minimalist instructions, SpanKY. I love watching experts at work.
philip: is this still broken? vapier: you asked for input on this bug, review it?
(In reply to comment #12) > philip: is this still broken? > vapier: you asked for input on this bug, review it? Robin, Thanks for asking, but I can't answer. The machine in question needed to be put into service faster than my gentoo skills could sustain. So, nearly a year ago, I traded whatever credibility I may have had as a "red-blooded Gentoo user" for a working Ubuntu installation on that box. Regards, Philip.
Ok, just closing as NEEDINFO then. If anybody else sees it in future, they can reopen.
(In reply to Robin Johnson from comment #14) > Ok, just closing as NEEDINFO then. > If anybody else sees it in future, they can reopen. Please reopen. I am trying to emerge net-misc/openssh-6.8_p1::gentoo and getting the following output: a - kexc25519s.o x86_64-pc-linux-gnu-ranlib libssh.a x86_64-pc-linux-gnu-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o mux.o roaming_common.o roaming_client.o -L. -Lopenbsd-compat/ -Wl,-O1 -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -Wl,-O1 -Wl,--as-needed -pie -lssh -lopenbsd-compat -lssl -lcrypto -ldl -lutil -lz -lnsl -lcrypt -lresolv -lpthread x86_64-pc-linux-gnu-gcc -o sshd sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o audit.o audit-bsm.o audit-linux.o platform.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 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 sftp-server.o sftp-common.o roaming_common.o roaming_serv.o sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o sandbox-seccomp-filter.o sandbox-capsicum.o -L. -Lopenbsd-compat/ -Wl,-O1 -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -Wl,-O1 -Wl,--as-needed -pie -lssh -lopenbsd-compat -lpam -lssl -lcrypto -ldl -lutil -lz -lnsl -lcrypt -lresolv -lpthread x86_64-pc-linux-gnu-gcc -o ssh-add ssh-add.o -L. -Lopenbsd-compat/ -Wl,-O1 -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -Wl,-O1 -Wl,--as-needed -pie -lssh -lopenbsd-compat -lssl -lcrypto -ldl -lutil -lz -lnsl -lcrypt -lresolv -lpthread ./libssh.a(cipher.o): In function `cipher_reset_multithreaded': cipher.c:(.text+0x230): undefined reference to `evp_aes_ctr_mt' collect2: error: ld returned 1 exit status Makefile:164: recipe for target 'ssh' failed make: *** [ssh] Error 1 make: *** Waiting for unfinished jobs.... ./libssh.a(cipher.o): In function `cipher_reset_multithreaded': cipher.c:(.text+0x230): undefined reference to `evp_aes_ctr_mt' collect2: error: ld returned 1 exit status Makefile:167: recipe for target 'sshd' failed make: *** [sshd] Error 1 ./libssh.a(cipher.o): In function `cipher_reset_multithreaded': cipher.c:(.text+0x230): undefined reference to `evp_aes_ctr_mt' collect2: error: ld returned 1 exit status Makefile:173: recipe for target 'ssh-add' failed make: *** [ssh-add] Error 1 * ERROR: net-misc/openssh-6.8_p1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-misc/openssh-6.8_p1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-misc/openssh-6.8_p1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-misc/openssh-6.8_p1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-misc/openssh-6.8_p1/temp/environment'. * Working directory: '/var/tmp/portage/net-misc/openssh-6.8_p1/work/openssh-6.8p1' * S: '/var/tmp/portage/net-misc/openssh-6.8_p1/work/openssh-6.8p1' --- ldconfig -p | grep libssl libssl.so.1.0.0 (libc6,x86-64) => /usr/lib64/libssl.so.1.0.0 libssl.so (libc6,x86-64) => /usr/lib64/libssl.so readelf -W -s /usr/lib/libcrypto.so | grep EVP_CIPHER_CTX 117: 000000000011fbb0 6 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_test_flags 152: 000000000011f760 5 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_set_app_data 195: 0000000000115a30 63 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_rand_key 319: 0000000000115390 93 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_cleanup 1294: 000000000011fb90 8 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_set_flags 1389: 000000000011f960 4 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_key_length 1498: 0000000000115420 38 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_set_padding 1521: 00000000001159b0 122 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_set_key_length 1524: 0000000000115450 160 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_ctrl 1538: 0000000000114b90 44 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_new 1626: 00000000001153f0 33 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_free 1769: 000000000011fab0 6 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_nid 1955: 000000000011fba0 10 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_clear_flags 2506: 000000000011f740 8 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_flags 2634: 0000000000114b80 11 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_init 2705: 0000000000115a70 360 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_copy 2898: 000000000011f700 7 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_block_size 3042: 000000000011f750 5 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_get_app_data 3372: 000000000011f780 7 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_iv_length 4082: 000000000011f720 4 FUNC GLOBAL DEFAULT 10 EVP_CIPHER_CTX_cipher Looks like openssl is compiled OK, but openssh would not emerge at the ld stage. Andrejs
(In reply to Andrejs Eigus from comment #15) your report is unrelated to this one and is already open elsewhere