Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223107 - Dubious curl-config, krb5-config, emerge behavior (portage-2.1.4.4)
Summary: Dubious curl-config, krb5-config, emerge behavior (portage-2.1.4.4)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 18:58 UTC by Ivar Ylvisaker
Modified: 2010-07-18 04:39 UTC (History)
1 user (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 Ivar Ylvisaker 2008-05-21 18:58:33 UTC
I was trying to determine why upgrading to "boinc-5.10.45" failed on both of my two computers.  The problem was similar to that described in gentoo bug 139621 except that now the problem flag is "-fprefetch-loop-arrays" rather than "-funroll-loops."  My meandering investigation eventually suggested that the problem flag is introduced into the boinc emerge by a call to "curl-config --libs" in the "configure" script during the emerge.

The USE variable "kerberos" is significant.  If "curl" is emerged without this variable, then the "curl-config --libs" command generates:

"-lcurl -lssl -lcrypto -lldap -lssl -lcrypto -ldl -lz"

The boinc emerge succeeds in this case.  And, the boinc emerge never calls curl-config.

However, if "curl" is compiled with the kerberos USE variable, then "curl-config --libs" generates:

"-lcurl -lssl -lcrypto -lldap -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -O2 -march=nocona -fprefetch-loop-arrays -pipe -ggdb -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -O2 -march=nocona -fprefetch-loop-arrays -pipe -ggdb -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lssl -lcrypto -ldl -lz"

The boinc emerge then fails.  (Results are shown for my Core 2 computer.  Results for my older Pentium 4 computer are similar.)

Further investigation pointed to the "krb5-config --libs gssapi" call in the "configure" script for curl as the source of the problem.  If I execute this command directly (not as a part of an emerge), I get:

"-L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl"

However, if I print out the product of this command when it is executed during an emerge of curl (using winpdb to allow me to edit the curl configure file part way through the emerge process), I get:

"-L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -O2 -march=nocona -fprefetch-loop-arrays -pipe -ggdb -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl"

CFLAGS compiler flags have been inserted into the middle of the result of the previous "krb5-config" call.

Something is wrong.  It seems unlikely that there is good reason for an "emerge" to deliberately alter the list of curl libraries.  And, CFLAGS don't point at libraries.

I note that emerge operates in a "sandbox."  I have not explored what is going on the sandbox.

Ivar

Reproducible: Always

Steps to Reproduce:
1.See description
2.
3.

Actual Results:  
See description

Expected Results:  
boinc compiles when kerberos is generally "enabled" in /etc/make.conf.

CFLAGS flags not found in "curl-config --libs" output.

First computer:

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r1 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Wed, 21 May 2008 02:35:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -fprefetch-loop-arrays -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -fprefetch-loop-arrays -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer nostrip sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
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/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 acl acpi alsa amd64 berkdb cairo cdr cli cracklib crypt cups dbus doc dri dvb dvd dvdnav dvdr dvdread eds emboss encode esd evo fam firefox foomatic gdbm gif gmedia gpm gstreamer gtk hal iconv ipv6 isdnlog java javascript jpeg kde kerberos ldap live mad midi mikmod mjpeg mmx mmxext mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline realmedia reflection scanner sdl session spell spl sqlite sqlite3 sse sse2 ssl svg tcltk tcpd tiff tk truetype unicode usb v4l v4l2 vorbis wmp x264 xml xorg xprint xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Second computer:

Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.2.0, glibc-2.7-r2, 2.6.24-gentoo i686)
=================================================================
System uname: 2.6.24-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Wed, 21 May 2008 02:35:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fprefetch-loop-arrays -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -fprefetch-loop-arrays -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer nostrip sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://64.50.238.52/ http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo"
PKGDIR="/usr/portage/packages"
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/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 acl acpi alsa berkdb cairo cdr cli cracklib crypt cups dbus doc dri dvb dvd dvdnav dvdr dvdread eds emboss encode esd evo fam firefox foomatic gdbm gif gmedia gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kerberos ldap live mad midi mikmod mjpeg mmx mmxext mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline real realmedia reflection scanner sdl session spell spl sqlite sqlite3 sse sse2 ssl svg tcltk tcpd tiff truetype unicode usb v4l v4l2 vorbis win32codecs wmp x264 x86 xml xorg xprint xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon fglrx vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Daniel Black (RETIRED) gentoo-dev 2008-05-21 22:31:19 UTC
well spotted and well described.
Comment 2 Dan Fandrich 2008-06-13 16:25:44 UTC
curl-config --libs on a glibc Linux system should produce only "-L/path/to/lib -lcurl" (where -L will only show up if it's not /usr/lib{64}). Since it doesn't, something in the configuration is suboptimal. What is the output of "libtool --config | grep link_all_deplibs"? It must be "no" or extra libs will be added. Is the LIBS variable set to anything at build or configure time?  Its contents will also be added to the curl-config output.
Comment 3 Ivar Ylvisaker 2008-06-17 07:11:43 UTC
(In reply to comment #2)

The output of "libtool --config | grep link_all_deplibs" is "unknown," which implies "yes" as I understand it.

However, the original problem did not seem to be "extra" libraries but, rather, the inclusion of non-library items in the list of libraries.
Comment 4 Ivar Ylvisaker 2008-06-17 07:17:12 UTC
The new version of curl (7.18.2) does not have the problem.  "curl-config --libs" now generates "-lcurl".  And I can emerge boinc without getting an error.

However, when I checked to see if the output of "krb5-config --libs gssapi" in the curl configure application also changed, I found that it had not.  This is disturbing because it implies that there is still a problem in the sandbox (or somewhere).  Apparently, the change to curl did not so much solve the original problem as it evaded it.
Comment 5 Bill "vaxbrat" Sharer 2009-05-28 03:25:03 UTC
This is also in net-misc/curl-7.19.4 which is biting me when I try to emerge xen-tools
Comment 6 Daniel Black (RETIRED) gentoo-dev 2010-07-18 04:39:15 UTC
looking at the patches and output I suspect this is fixed. Please reopen if not.