Subject: needing gcc lib (when building openssh)
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/23/2003 12:13:11
When building pkgsrc/security/openssh under Linux using gcc3-c-3.3.1, I
received:

===> Checking for vulnerabilities in openssh-3.7.1.1
===> Building for openssh-3.7.1.1
(cd openbsd-compat && bmake)
ld -o scp scp.o progressmeter.o -L. -Lopenbsd-compat/ -L/usr/lib -L/usr/lib  -L/usr/lib -Wl,-R/usr/lib -lssh -lopenbsd-compat -lutil -lz -lnsl -lcrypto -lcrypt
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08049218
scp.o(.text+0x15ac): In function `bwlimit':
: undefined reference to `__fixunsdfdi'
scp.o(.text+0x15c1): In function `bwlimit':
: undefined reference to `__udivdi3'
scp.o(.text+0x15e0): In function `bwlimit':
: undefined reference to `__umoddi3'
progressmeter.o(.text+0xf0): In function `format_rate':
: undefined reference to `__divdi3'
progressmeter.o(.text+0xfe): In function `format_rate':
: undefined reference to `__moddi3'
progressmeter.o(.text+0x10f): In function `format_rate':
: undefined reference to `__divdi3'
*** Error code 1


From reading some postings on the web, this indicates that the shared
libraries are missing the some gcc lib parts.

I saw a old FreeBSD PR at
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21983

And a openssh related PR at
http://bugzilla.mindrot.org/show_bug.cgi?id=552

Does anyone know about this?

I don't know if it is a gcc, binutils, glibc,or openssh compilation issue.

I am using:
  gcc-3.3.1
  binutils-2.14
  glibc-2.3.2

All built from pkgsrc (other than individual libc-2.3.2 and ld-2.3.2 files
from slackware due to ongoing build problems I have add for over a month).

openssh's scp.o is the only file (as I can see) with __fixunsdfdi.

I think it is provided with:

 $ objdump --dynamic-sym /usr/gcc3/lib/libgcc_s.so.1 | grep __fixunsdfdi
 0000198c g    DF .text  000000b0  GCC_3.0     __fixunsdfdi

On a system that it builds fine (gcc3-3.2.1, binutils-2.13.2.1,
glibc-2.2.5):

 $ objdump --dynamic-sym /usr/gcc3-3.2.1/lib/libgcc_s.so.1 | grep __fixunsdfdi
 000017a8 g    DF .text  000000b2  GCC_3.0     __fixunsdfdi

Any ideas on how to troubleshoot this further?

Thank you,

Jeremy C. Reed

http://www.bsdnewsletter.com/