Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 91114

Summary: emerge openssh (3.9_p1-r1, default) fails with compile errors (due to ppc64 hardened)
Product: Gentoo Linux Reporter: Michael Caine <jmcaine>
Component: Current packagesAssignee: The Gentoo Linux Hardened Team <hardened>
Status: VERIFIED LATER    
Severity: normal CC: jni, ppc64
Priority: High    
Version: unspecified   
Hardware: PPC64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge openssh &> log
per request: /var/tmp/portage/openssh-3.9_p1-r2/work/openssh-3.9p1/config.log
output of: readelf -s /usr/lib/libnsl.so
emerge --update --deep --newuse glib
preprocessed source

Description Michael Caine 2005-05-01 23:04:24 UTC
emerge openssh results in:
...
powerpc64-unknown-linux-gnu-gcc -O2 -pipe -Wall -Wpointer-arith -Wno-uninitialized -I. -I.  -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/lib/misc/ssh-rand-helper\" -DHAVE_CONFIG_H -c gss-genr.c
dns.c: In function `dns_result_totext':
dns.c:62: error: `ERRSET_SUCCESS' undeclared (first use in this function)
dns.c:62: error: (Each undeclared identifier is reported only once
dns.c:62: error: for each function it appears in.)
dns.c:64: error: `ERRSET_NOMEMORY' undeclared (first use in this function)
dns.c:66: error: `ERRSET_FAIL' undeclared (first use in this function)
dns.c:68: error: `ERRSET_INVAL' undeclared (first use in this function)
dns.c:70: error: `ERRSET_NONAME' undeclared (first use in this function)
dns.c:72: error: `ERRSET_NODATA' undeclared (first use in this function)
dns.c: In function `verify_host_key_dns':
dns.c:174: warning: implicit declaration of function `getrrsetbyname'
dns.c:181: error: dereferencing pointer to incomplete type
dns.c:181: error: `RRSET_VALIDATED' undeclared (first use in this function)
dns.c:184: error: dereferencing pointer to incomplete type
dns.c:187: error: dereferencing pointer to incomplete type
dns.c:194: warning: implicit declaration of function `freerrset'
dns.c:198: error: dereferencing pointer to incomplete type
dns.c:201: error: dereferencing pointer to incomplete type
dns.c:208: error: dereferencing pointer to incomplete type
dns.c:209: error: dereferencing pointer to incomplete type
make: *** [dns.o] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: net-misc/openssh-3.9_p1-r2 failed.
!!! Function src_compile, Line 99, Exitcode 2
!!! compile problem
!!! If you need support, post the topmost build error, NOT this status message.


Reproducible: Always
Steps to Reproduce:
1. emerge openssh.  (nothing in package.keywords or elsewhere to get anything other than the default blessed version)

Actual Results:  
See the above 'Details'.

Expected Results:  
Clean emerge.

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (default-linux/ppc64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 ppc64)
=================================================================
System uname: 2.6.11-gentoo-r6 ppc64 PPC970FX, altivec supported
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, May  1 2005, 23:22:55)]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.90.0.3-r4
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/
ftp://cs.ubishops.ca/pub/gentoo ftp://gentoo.risq.qc.ca/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/
ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X alsa apache2 arts berkdb bitmap-fonts cdr crypt cups curl dvd encode
ethereal fam fortran gif gpm hardened imap jabber jack java jpeg kde ladcca mad
motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam perl png postgres ppc64
python qt readline samba session sox speex spell ssl tcltk tcpd tiff truetype
truetype-fonts type1-fonts unicode usb vorbis wifi xine xml2 xv zlib
userland_GNU kernel_linux libc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2005-05-02 05:47:17 UTC
post the whole build log ... do `emerge openssh >& log` and attach log to the bug
Comment 2 Michael Caine 2005-05-02 10:56:46 UTC
Created attachment 57858 [details]
emerge openssh &> log
Comment 3 SpanKY gentoo-dev 2005-05-02 11:06:53 UTC
please post the /var/tmp/portage/openssh-3.9_p1-r2/work/openssh-3.9p1/config.log file as an attachment too
Comment 4 SpanKY gentoo-dev 2005-05-02 11:08:43 UTC
the problem is this:
checking for library containing getrrsetbyname... none required

configure detected all the wrong things in libresolv and such
Comment 5 Michael Caine 2005-05-02 11:58:36 UTC
Created attachment 57861 [details]
per request: /var/tmp/portage/openssh-3.9_p1-r2/work/openssh-3.9p1/config.log
Comment 6 Michael Caine 2005-05-02 12:00:43 UTC
"configure detected all the wrong things in libresolv and such" -- ok, so, is there a fix for that?  is that a different bug?
Comment 7 SpanKY gentoo-dev 2005-05-02 14:55:45 UTC
*** Bug 89400 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2005-05-02 14:56:43 UTC
please attach the output of `readelf -s /usr/lib/libnsl.so`
Comment 9 Michael Caine 2005-05-02 19:10:55 UTC
Created attachment 57889 [details]
output of: readelf -s /usr/lib/libnsl.so
Comment 10 SpanKY gentoo-dev 2005-05-02 19:19:36 UTC
try this then:
echo "char getrrsetbyname(); int main() { getrrsetbyname(); return 0; }" > main.c
gcc main.c -o main

if that fails, try this:
gcc main.c -o main -lcrypto -lpam -ldl -lz -lnsl -lcrypt
Comment 11 Michael Caine 2005-05-02 21:58:56 UTC
Here are the results:

# echo "char getrrsetbyname(); int main() { getrrsetbyname(); return 0; }" > main.c
# gcc main.c -o main
# ./main
./main: symbol lookup error: ./main: undefined symbol: getrrsetbyname

# gcc main.c -o main -lcrypto -lpam -ldl -lz -lnsl -lcrypt
# ./main
./main: symbol lookup error: ./main: undefined symbol: getrrsetbyname

Thanks very much for your attention to this.
Comment 12 SpanKY gentoo-dev 2005-05-02 22:06:29 UTC
the mere fact that it compiled is the problem, it should have done something like this:
$ gcc main.c -o main
/tmp/cciWo0vk.o(.text+0xa): In function `main':
: undefined reference to `getrrsetbyname'
collect2: ld returned 1 exit status

can you post more readelf logs ?  run `ldd main` and see what libraries main linked against, and then run `readelf -s` on them

anyone from the ppc64 team care to look at this ?  only two people have reported this issue so far and they were both on ppc64 ...
Comment 13 Michael Caine 2005-05-02 22:38:57 UTC
Well, this seems interesting:

# ldd main
        libc.so.6 => /lib/libc.so.6 (0x0000008000033000)
        /lib64/ld64.so.1 (0x0000008000000000)
# readelf -s /usr/lib/libc.so
readelf: Error: Unable to read in 0x2074 bytes of section headers
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
# ls -l /usr/lib/libc.so
-rwxr-xr-x  1 root root 211 May  2 21:42 /usr/lib/libc.so
(sanity check)

and, lo and behold, there is no ld64.so on my system at all!

That's not enough to explain it all to me, but perhaps it's enough for somebody else to know what's up?  It might be worth mentioning another bug I opened, that didn't seem to bear similarity until now: http://bugs.gentoo.org/show_bug.cgi?id=91130
Comment 14 Yuta SATOH (RETIRED) gentoo-dev 2005-05-02 23:03:13 UTC
I think that this bug is related to Hardened gcc. 
It is because this problem occurred when gcc which enabled hardened flag in my environment was used. 

Please disable hardened flag and re-install gcc. 
And, would you `emerge openssh` after that and teach a result? 
Comment 15 Michael Caine 2005-05-02 23:55:46 UTC
Created attachment 57899 [details]
emerge --update --deep --newuse glib

That might be!	However, I just removed 'hardened' from my USE flag and emerged
glib, with sad results (entire output is attached):

...
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib     -O2 -pipe
-Wall  -D_REENTRANT -c testgdate.c
testglib.c:920: internal compiler error: Segmentation fault
Please submit a full bug report,
...

I'll attach the preprocessed source in the next message...
Comment 16 Michael Caine 2005-05-02 23:57:39 UTC
Created attachment 57900 [details]
preprocessed source

... and here's the preprocessed source.
Comment 17 Michael Caine 2005-05-03 15:32:10 UTC
I believe this and a couple of other problems I've been having are related to my 'hardened' USE flag -- I've now removed that flag and am trying to rebuild gcc/glibc/etc., but am getting segfaults upon compilations.  And I just rebooted for the first time since I started this effort and the kernel crashed.  So I'm in a bit of a hosed state that I'll be trying to work my way out of and then I'll report back, hopefully with something useful for closing this bug out one way or another.
Comment 18 SpanKY gentoo-dev 2005-05-03 17:13:05 UTC
ok, well the problem seems unrelated to openssh so i'll let the ppc64 team take it from here ;)
Comment 19 Michael Caine 2005-05-04 11:30:54 UTC
I've resolved this bug by un-hardening my machine.  Shall we mark it resolved and/or completely pass on to the hardened team?
Comment 20 Markus Rothe (RETIRED) gentoo-dev 2005-05-22 11:06:13 UTC
passing to hardened team
Comment 21 solar (RETIRED) gentoo-dev 2005-05-22 12:42:20 UTC
Hardened PPC64 is not really complete. We lack of hardware for proper
testing/debugging and q/a at this point in time. This is supposed to
change sometime in the future. When that changes I'm happy to help
resolve any bugs that is within my power to help resolve. Till then you
will have to take the userland on a case by case basis and build what
you can. If something does not build properly with +hardened features
then sadly your probably better off switching to vanilla gcc specs via 
gcc-config for the package in question.

Sorry all I can do at this point is resolve this bug as LATER
Comment 22 Tom Gall (RETIRED) gentoo-dev 2005-09-09 20:49:05 UTC
solar,  perhaps it's time for a partition on the box in oregon (least if you're
still sans hardware)


sticking a fork in this one.