Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48475 - openssl-0.9.7d ebuild fails during link with undefined references to MD2_Init, MD2_Final, MD2_Update
Summary: openssl-0.9.7d ebuild fails during link with undefined references to MD2_Init...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-20 09:36 UTC by mathew
Modified: 2005-03-13 01:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mathew 2004-04-20 09:36:42 UTC
emerge -u world gave me:

speed.o(.text+0x1faa): In function `speed_main':
: undefined reference to `MD2_options'
version.o(.text+0x14b): In function `version_main':
: undefined reference to `MD2_options'
../libcrypto.so: undefined reference to `MD2_Init'
../libcrypto.so: undefined reference to `MD2_Final'
../libcrypto.so: undefined reference to `MD2_Update'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/var/tmp/portage/openssl-0.9.7d/work/openssl-0.9.7d/apps'
make: *** [sub_all] Error 1

!!! ERROR: dev-libs/openssl-0.9.7d failed.
!!! Function src_compile, Line 136, Exitcode 2
!!! (no error message)
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2004-04-25 12:25:33 UTC
Please post emerge info.
Comment 2 mathew 2004-04-27 13:38:06 UTC
Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo i686 Pentium Pro
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=i686 -funroll-loops -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/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="-O3 -march=i686 -funroll-loops -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox usersandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://knacsphere.lotus.com/gentoo-portage"
USE="apm arts avi berkdb crypt curl encode gdbm gif gpm gtk2 jpeg kde libg++ libwww mad mikmod mpeg ncurses nls oggvorbis opengl oss pam perl png python quicktime readline samba sdl slang spell sse ssl svga tcpd truetype x86 xml2 zlib"
Comment 3 Timothy Demarest 2004-05-19 15:33:17 UTC
Same problem with emerge -e world:

  gcc -o openssl -DMONOLITH -I.. -I../include  -fPIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO    -Wall -O2 -march=pentium4 -pipe -fomit-frame-pointer -mmmx -msse -msse2 -mfpmath=sse -DSHA1_ASM -DMD5_ASM -DRMD160_ASM openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o  -L.. -lssl  -L.. -lcrypto -ldl ; \
fi
speed.o(.text+0x2100): In function `speed_main':
: undefined reference to `MD2_options'
version.o(.text+0x146): In function `version_main':
: undefined reference to `MD2_options'
../libcrypto.so: undefined reference to `MD2_Init'
../libcrypto.so: undefined reference to `MD2_Final'
../libcrypto.so: undefined reference to `MD2_Update'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/var/tmp/portage/openssl-0.9.7d/work/openssl-0.9.7d/apps'
make: *** [sub_all] Error 1

!!! ERROR: dev-libs/openssl-0.9.7d failed.
!!! Function src_compile, Line 160, Exitcode 2
!!! (no error message)

# emerge info
Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.3_pre20040420-r0, 2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 i686 Intel(R) Xeon(TM) CPU 2.80GHz
Gentoo Base System version 1.4.12
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer -mmmx -msse -msse2 -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer -mmmx -msse -msse2 -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://gentoo.ccccom.com ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="berkdb crypt directfb encode fbcon foomaticdb gdbm imlib libg++ libwww mad mikmod ncurses nls nptl pam pdflib perl python readline sdl slang spell sse ssl svga tcpd x86 xml2 zlib"
Comment 4 Timothy Demarest 2004-05-19 15:43:12 UTC
I was able to work around this problem by backing off of some of the optimizations in CFLAGS, and changing them to just "O2 -march=pentium4 -pipe -fomit-frame-pointer":

CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" emerge dev-libs/openssl
...

Comment 5 mathew 2004-05-20 05:02:23 UTC
I found out what was causing the problem for me: I didn't have a symlink to the kernel source as /usr/src/linux. It seems the code uses kernel encryption headers but the configure script doesn't adequately check that they exist.
Comment 6 Benjamin Judas (RETIRED) gentoo-dev 2004-06-10 06:05:31 UTC
experiencing this bug while building stage3-files for gentoo-2004.2. Aliz, this needs to be fixed.
Comment 7 Daniel Ahlberg (RETIRED) gentoo-dev 2004-06-15 12:10:18 UTC
I've made the ebuild fall back to single make if parallell fails. Thanks for the reports!
Comment 8 Mike Pieper 2004-06-17 01:03:17 UTC
I had the same problem with 0.9.7d-r1 ebuild.
Changing CFLAGS from -O3 to -O2 solved the problem.

Seems to me like the bug is not really fixed.
Comment 9 Bart Lauwers (RETIRED) gentoo-dev 2004-06-17 19:10:21 UTC
I had the same issue and it was also resolved by backing off some of the optimizations I had in CFLAGS. Orginally I had:
CFLAGS="-march=i686 -O2 -pipe -funroll-loops -ffast-math -fomit-frame-pointer -mmmx"
which I replaced with:
CFLAGS="-march=i686 -O2 -pipe -funroll-loops -fomit-frame-pointer"
further testing "-ffast-math" to be the culprit in my case. Can I suggest flag get filtered in the ebuild? (with gcc 3.3.2)
3
 Bart.
Comment 10 Nicholas Jones (RETIRED) gentoo-dev 2004-06-21 03:28:56 UTC
I'm running across this as well.
Inside of catalyst during a stage3 build.

CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"
And no kernel source installed.
Comment 11 Jeff Smelser 2004-06-23 10:47:23 UTC
I don't understand 3-5 machines failed the first time trying to compile with very simple compiler options. Re-ran then, no changing anything, and they worked the second time. 1 took a third time to move it along..

They all failed in the same spot, however.. Odd
Comment 12 Nicholas Jones (RETIRED) gentoo-dev 2004-07-08 20:13:25 UTC
I just got this again in catalyst... and entering the root and
attempting to build it manually two more times resulted in it
completing without the error on the second attempt.

I really don't understand that.

After that it worked in catalyst.
Comment 13 SpanKY gentoo-dev 2005-03-13 01:48:53 UTC
re-open if 0.9.7e still goes boom