gcc or openssh's fault? this installation's less than a week old. ninja-squirrel ~ # /etc/init.d/sshd restart * Caching service dependencies ... [ ok ] * Generating Hostkey... Generating public/private rsa1 key pair. Your identification has been saved in /etc/ssh/ssh_host_key. Your public key has been saved in /etc/ssh/ssh_host_key.pub. The key fingerprint is: 3c:c1:20:74:fb:32:9c:4c:14:08:b9:37:6e:74:7c:c9 root@ninja-squirrel * Generating DSA-Hostkey... Generating public/private dsa key pair. /etc/init.d/sshd: line 33: 6003 Illegal instruction /usr/bin/ssh-keygen -d -f "${SSHD_CONFDIR}"/ssh_host_dsa_key -N '' then the next tries: ninja-squirrel ~ # /etc/init.d/sshd restart * Generating RSA-Hostkey... Generating public/private rsa key pair. /etc/init.d/sshd: line 33: 6052 Illegal instruction /usr/bin/ssh-keygen -t rsa -f "${SSHD_CONFDIR}"/ssh_host_rsa_key -N '' ninja-squirrel ~ # /etc/init.d/sshd restart Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key Disabling protocol version 2. Could not load host key sshd: no hostkeys available -- exiting. here's my emerge --info. i get the same results when disabling -Wl,--as-needed. Portage 2.1.2.11 (default-linux/amd64/2007.0/desktop, gcc-4.2.0, glibc-2.5-r4, 2.6.22-gentoo-r2 x86_64) ================================================================= System uname: 2.6.22-gentoo-r2 x86_64 Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz Gentoo Base System release 1.12.9 Timestamp of tree: Mon, 06 Aug 2007 16:00:01 +0000 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -march=nocona -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-Os -march=nocona -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildsyspkg distlocks metadata-transfer sandbox sfperms splitdebug strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/" LDFLAGS="-Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY=" " SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac aalib acl acpi alsa amd64 audiofile bash-completion bitmap-fonts bonobo bzip2 cairo cdr cli cracklib crypt cscope cups curl dbus djvu doc dri dvd dvdr dvdread emacs emboss encode evo expat fam ffmpeg firefox flac fontconfig foomaticdb ftp gd gdbm gif gnome gnutls gpm gstreamer gtk hal iconv imagemagick ipod ipv6 isdnlog jbig jpeg kerberos lcd lcms ldap libcaca libg++ libnotify lm_sensors mad midi mikmod mmap mmx mng mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf png pppd python qt3support quicktime readline reflection samba sdl session spell spl sqlite sqlite3 sse sse2 ssl ssse2 ssse3 startup-notification svg symlink tcpd threads tiff tk truetype truetype-fonts type1-fonts unicode v4l2 vorbis wmf wxwindows xcb xcomposite xinerama xml xorg xprint xscreensaver xv xvid xvmc zlib" ALSA_CARDS="dummy hda-intel intel8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810 vesa fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
rebuild openssh with just CFLAGS=-O1 and see if that helps
i rebuilt openssh and openssl with CFLAGS="01" and without -Wl,--as-needed. it still doesn't work: ninja-squirrel ~ # rm /etc/ssh/*host* ninja-squirrel ~ # gdb --args /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r Starting program: /usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' Generating public/private dsa key pair. Program received signal SIGILL, Illegal instruction. 0x00002acb24c09b88 in PEM_write_DSAPrivateKey () from /usr/lib64/libcrypto.so.0.9.8 (gdb) bt #0 0x00002acb24c09b88 in PEM_write_DSAPrivateKey () from /usr/lib64/libcrypto.so.0.9.8 #1 0x0000000000408b2f in key_save_private () #2 0x00000000004076f8 in main () #3 0x00002acb2557c323 in __libc_start_main () from /lib/libc.so.6 #4 0x00000000004047d9 in _start () (gdb) quit The program is running. Exit anyway? (y or n) y ninja-squirrel ~ # equery b /usr/lib64/libcrypto.so.0.9.8 [ Searching for file(s) /usr/lib64/libcrypto.so.0.9.8 in *... ] dev-libs/openssl-0.9.8d (/usr/lib64/libcrypto.so.0.9.8) ninja-squirrel ~ #
i built openssh-4.6_p1-r3 and the latest openssl in testing (dev-libs/openssl-0.9.8e-r1) with CFLAGS="-Os -march=nocona -ggdb -pipe" and LDFLAGS="-Wl,--as-needed". it works now.
dont mix gcc-4.2.0 and stable and file bugs ... you are going to hit issues we've already fixed in unstable and just waste our time trying to debug old problems