Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296832 - net-misc/ntp-4.2.6: undefined reference with USE="ssl" and static/--as-needed
Summary: net-misc/ntp-4.2.6: undefined reference with USE="ssl" and static/--as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://support.ntp.org/bugs/show_bug...
Whiteboard:
Keywords:
: 296999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-14 09:03 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2009-12-15 07:33 UTC (History)
9 users (show)

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


Attachments
build.log (build.log,157.99 KB, text/plain)
2009-12-14 09:09 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
Change library order (gentoo296832a.patch,3.90 KB, patch)
2009-12-14 12:23 UTC, Martin von Gagern
Details | Diff
build.log (build.log,170.92 KB, text/plain)
2009-12-14 21:49 UTC, Steffen 'j0inty' Stollfuß
Details
emerge --info =net-misc/ntp-4.2.6 (emerge-ntp.info,13.17 KB, text/plain)
2009-12-14 22:36 UTC, Steffen 'j0inty' Stollfuß
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-12-14 09:03:35 UTC
i686-pc-linux-gnu-gcc -std=gnu99 -march=pentium3 -mtune=pentium3 -O2 -pipe -fomit-frame-pointer -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wstrict-overflow -Wno-strict-prototypes -Wl,--as-needed -o ntpdc ntpdc.o ntpdc_ops.o ntpdc-opts.o version.o  -L/usr/lib -lcrypto ../libopts/.libs/libopts.a ../libntp/libntp.a -lrt -lcap                                          
../libntp/libntp.a(ssl_init.o): In function `ssl_init':                         
ssl_init.c:(.text+0xe): undefined reference to `ERR_load_crypto_strings'        
ssl_init.c:(.text+0x13): undefined reference to `OPENSSL_add_all_algorithms_noconf'                                                                             
../libntp/libntp.a(ssl_init.o): In function `keytype_name':                     
ssl_init.c:(.text+0x45): undefined reference to `OBJ_nid2sn'                    
../libntp/libntp.a(ssl_init.o): In function `keytype_from_text':                
ssl_init.c:(.text+0x126): undefined reference to `OBJ_sn2nid'                   
ssl_init.c:(.text+0x143): undefined reference to `OBJ_nid2sn'                   
ssl_init.c:(.text+0x14b): undefined reference to `EVP_get_digestbyname'         
ssl_init.c:(.text+0x157): undefined reference to `EVP_DigestInit'               
ssl_init.c:(.text+0x16f): undefined reference to `EVP_DigestFinal'              
../libntp/libntp.a(ssl_init.o): In function `ssl_check_version':                
ssl_init.c:(.text+0x264): undefined reference to `SSLeay'                       
ssl_init.c:(.text+0x291): undefined reference to `SSLeay'                       
ssl_init.c:(.text+0x2b8): undefined reference to `SSLeay'                       
../libntp/libntp.a(a_md5encrypt.o): In function `MD5authdecrypt':               
a_md5encrypt.c:(.text+0x4e): undefined reference to `OBJ_nid2sn'                
a_md5encrypt.c:(.text+0x56): undefined reference to `EVP_get_digestbyname'      
a_md5encrypt.c:(.text+0x62): undefined reference to `EVP_DigestInit'            
a_md5encrypt.c:(.text+0x7e): undefined reference to `EVP_DigestUpdate'          
a_md5encrypt.c:(.text+0x8e): undefined reference to `EVP_DigestUpdate'          
a_md5encrypt.c:(.text+0xa2): undefined reference to `EVP_DigestFinal'           
../libntp/libntp.a(a_md5encrypt.o): In function `MD5authencrypt':               
a_md5encrypt.c:(.text+0x153): undefined reference to `OBJ_nid2sn'               
a_md5encrypt.c:(.text+0x15b): undefined reference to `EVP_get_digestbyname'     
a_md5encrypt.c:(.text+0x167): undefined reference to `EVP_DigestInit'           
a_md5encrypt.c:(.text+0x183): undefined reference to `EVP_DigestUpdate'         
a_md5encrypt.c:(.text+0x193): undefined reference to `EVP_DigestUpdate'         
a_md5encrypt.c:(.text+0x1a7): undefined reference to `EVP_DigestFinal'          
../libntp/libntp.a(a_md5encrypt.o): In function `addr2refid':                   
a_md5encrypt.c:(.text+0x208): undefined reference to `OBJ_nid2sn'               
a_md5encrypt.c:(.text+0x210): undefined reference to `EVP_get_digestbyname'     
a_md5encrypt.c:(.text+0x21c): undefined reference to `EVP_DigestInit'           
a_md5encrypt.c:(.text+0x234): undefined reference to `EVP_DigestUpdate'         
a_md5encrypt.c:(.text+0x24c): undefined reference to `EVP_DigestFinal'          
collect2: ld returned 1 exit status                                             
make[3]: *** [ntpdc] Error 1                                                    
make[3]: Leaving directory `/var/tmp/portage/net-misc/ntp-4.2.6/work/ntp-4.2.6/ntpdc'                                                                           
make[2]: *** [all] Error 2                                                      
make[2]: Leaving directory `/var/tmp/portage/net-misc/ntp-4.2.6/work/ntp-4.2.6/ntpdc'                                                                           
make[1]: *** [all-recursive] Error 1                                            
make[1]: Leaving directory `/var/tmp/portage/net-misc/ntp-4.2.6/work/ntp-4.2.6' 
make: *** [all] Error 2                                                         
 * ERROR: net-misc/ntp-4.2.6 failed:                                            
 *   emake failed                                                               
 *                                                                              
 * Call stack:                                                                  
 *     ebuild.sh, line   61:  Called src_compile                                
 *   environment, line 2614:  Called _eapi2_src_compile                         
 *     ebuild.sh, line  653:  Called die                                        
 * The specific snippet of code:                                                
 *              emake || die "emake failed"                                     
 *                                                                              
 * If you need support, post the output of 'emerge --info =net-misc/ntp-4.2.6', 
 * the complete build log and the output of 'emerge -pqv =net-misc/ntp-4.2.6'.  
 * The complete build log is located at '/var/tmp/portage/net-misc/ntp-4.2.6/temp/build.log'.                                                                   
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/ntp-4.2.6/temp/environment'.
 * S: '/var/tmp/portage/net-misc/ntp-4.2.6/work/ntp-4.2.6'

>>> Failed to emerge net-misc/ntp-4.2.6, Log file:

>>>  '/var/tmp/portage/net-misc/ntp-4.2.6/temp/build.log'

 * Messages for package net-misc/ntp-4.2.6:

 * ERROR: net-misc/ntp-4.2.6 failed:
 *   emake failed

Reproducible: Always

Steps to Reproduce:




# emerge --info                                                        
Portage 2.1.7.14 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.27.39 i686)                                                                    
=================================================================               
System uname: Linux-2.6.27.39-i686-Pentium_III_-Coppermine-with-gentoo-2.0.1    
Timestamp of tree: Mon, 14 Dec 2009 07:00:01 +0000                              
app-shells/bash:     4.0_p35                                                    
dev-lang/python:     2.6.4                                                      
sys-apps/baselayout: 2.0.1                                                      
sys-apps/openrc:     0.5.3                                                      
sys-apps/sandbox:    2.2                                                        
sys-devel/autoconf:  2.64                                                       
sys-devel/automake:  1.10.3, 1.11.1                                             
sys-devel/binutils:  2.18-r3                                                    
sys-devel/gcc-config: 1.4.1                                                     
sys-devel/libtool:   2.2.6b                                                     
virtual/os-headers:  2.6.27-r2                                                  
ACCEPT_KEYWORDS="x86 ~x86"                                                      
ACCEPT_LICENSE="* -@EULA"                                                       
CBUILD="i686-pc-linux-gnu"                                                      
CFLAGS="-march=pentium3 -mtune=pentium3 -O2 -pipe -fomit-frame-pointer"         
CHOST="i686-pc-linux-gnu"                                                       
CONFIG_PROTECT="/etc /usr/share/opennap-ng"                                     
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/ssl /etc/terminfo /etc/udev/rules.d"                                                               
CXXFLAGS="-march=pentium3 -mtune=pentium3 -O2 -pipe -fomit-frame-pointer"       
DISTDIR="/usr/portage/distfiles"                                                
EMERGE_DEFAULT_OPTS="--alphabetical --jobs=1"                                   
FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/layman/poly-c"
SYNC="rsync://192.168.0.254/gentoo-portage"
USE="acl acpi apache2 berkdb bzip2 cli cracklib crypt cxx dri fam fastcgi gdbm gnutls iconv innodb ipv6 libwww maildir mmx modules mudflap ncurses nls nptl nptlonly pam pcre pppd readline reflection session slang snmp spl sse ssl sysfs unicode x86 xml xml2 xorg zlib" ELIBC="glibc" INPUT_DEVICES="keyboard" KERNEL="linux" RUBY_TARGETS="ruby18" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

# emerge -qpv ntp
[ebuild     U ] net-misc/ntp-4.2.6 [4.2.4_p7-r1] USE="caps debug ipv6 -openntpd -parse-clocks (-selinux) ssl -vim-syntax -zeroconf"
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-12-14 09:09:29 UTC
Created attachment 212968 [details]
build.log
Comment 2 Steffen Hau 2009-12-14 11:47:24 UTC
I have the same issue here as well.
Comment 3 Ondřej Súkup 2009-12-14 12:02:07 UTC
i have too
Comment 4 Martin von Gagern 2009-12-14 12:23:44 UTC
Created attachment 212993 [details, diff]
Change library order

This patch changes the order of libraries. It works on both Makefile.am and Makefile.in, so it should work with or without eautoreconf.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-14 18:32:43 UTC
Patch looks good (albeit maybe a bit short-sighted in the sense of caution, but that's fine).
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2009-12-14 18:42:42 UTC
thanks for the patch, I applied it (little bit adjusted) to main tree (After discussion with Diego).
Please forward your patch upstream, so for next release we dont need to patch it again :]

Cheers
Comment 7 SpanKY gentoo-dev 2009-12-14 18:46:13 UTC
Tomáš: please fix your patching habits, especially if you're going to touch base-system packages.  patches need ${P} naming, not ${PV}.  further:
http://dev.gentoo.org/~vapier/clean-patches

ive renamed and cleaned up the patch and dropped the autotools.  no real point or need in running autotools here.

QA doesnt give you carte blanche to go committing as-needed changes
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-14 18:48:12 UTC
QA would like for proper autotools to be executed unless there are good reasons not to (given the risk of maintainer-mode rebuilds).

And if the package is base-system I can give a go to it, can't I? Only reason why I didn't commit it myself is that I'm too busy to sync today.
Comment 9 SpanKY gentoo-dev 2009-12-14 19:17:51 UTC
if QA were maintainers, then they could make that choice.  but they dont have to watch over ntp, i do.  patching the Makefile.in here is fine.

i wouldnt be upset if the commit didnt need cleaning up.
Comment 10 Steffen 'j0inty' Stollfuß 2009-12-14 21:46:07 UTC
Hi,

I ran into the same problem and was waiting for the patch in the portage tree.

I tested the patch on my amd64 laptop (desktop) box and on my amd64 server. The server compiles the package fine now, but my laptop box failed with another error.

The build.log and emerge --info will attach asap ;).

regards
j0inty
Comment 11 Steffen 'j0inty' Stollfuß 2009-12-14 21:49:50 UTC
Created attachment 213036 [details]
build.log
Comment 12 Martin von Gagern 2009-12-14 22:01:54 UTC
(In reply to comment #10)
> but my laptop box failed with another error.
> The build.log and emerge --info will attach asap ;).

Still waiting for the emerge --info. Looks like you have quite a number of additional flags in your LDFLAGS there. Would advise disabling them and reenabling them one at a time, to see which one is causing this. And I guess it's a different issue, not --as-needed by itself, but I'm not sure yet.
Comment 13 Steffen 'j0inty' Stollfuß 2009-12-14 22:36:01 UTC
Created attachment 213044 [details]
emerge --info =net-misc/ntp-4.2.6

Hi,

sry I fogot to post this after the build.log.

My LDFALGS are "-Wl,-O1 -Wl,-z,now -Wl,--as-needed -Wl,--sort-common".

regards
j0inty
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2009-12-15 07:33:04 UTC
*** Bug 296999 has been marked as a duplicate of this bug. ***