Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47907 - net-misc/curl-7.11.0 ebuild broken on amd64: -fPIC is missing
Summary: net-misc/curl-7.11.0 ebuild broken on amd64: -fPIC is missing
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Lisa Seelye (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-15 04:22 UTC by Evgeny Stambulchik
Modified: 2005-09-11 17:57 UTC (History)
0 users

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 Evgeny Stambulchik 2004-04-15 04:22:31 UTC
gcc -shared  .libs/file.o .libs/timeval.o .libs/base64.o .libs/hostip.o .libs/progress.o .libs/formdata.o .libs/cookie.o .libs/http.o .libs/sendf.o .libs/ftp.o .libs/url.o .libs/dict.o .libs/if2ip.o .libs/speedcheck.o .libs/getdate.o .libs/ldap.o .libs/ssluse.o .libs/version.o .libs/getenv.o .libs/escape.o .libs/mprintf.o .libs/telnet.o .libs/netrc.o .libs/getinfo.o .libs/transfer.o .libs/strequal.o .libs/easy.o .libs/security.o .libs/krb4.o .libs/memdebug.o .libs/http_chunks.o .libs/strtok.o .libs/connect.o .libs/llist.o .libs/hash.o .libs/multi.o .libs/content_encoding.o .libs/share.o .libs/http_digest.o .libs/md5.o .libs/http_negotiate.o .libs/http_ntlm.o .libs/inet_pton.o .libs/strtoofft.o  -lz -lssl -lcrypto -ldl  -Wl,-soname -Wl,libcurl.so.2 -o .libs/libcurl.so.2.0.2
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/file.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
.libs/file.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
distcc[31441] ERROR: compile on localhost failed
make[2]: *** [libcurl.la] Error 1


Reproducible: Always
Steps to Reproduce:
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-04-15 04:54:18 UTC
this version of curl installs here without problem, even with all USE-dependant settings enabled. (ipv6, ldap, ssl)

ayanami curl # md5sum ./curl-7.11.0.ebuild
e0d2b9b477d976abe1247ff953d97d88  ./curl-7.11.0.ebuild

if your ebuild doesnt match the md5sum of the one i have here, try doing an emerge sync and compiling again. the bug might have been noticed and fixed already in the current version of the portage tree. if you continue to have problems, feel free to re-open this bug.
Comment 2 Evgeny Stambulchik 2004-04-15 05:25:33 UTC
Same ebuild here:

$ md5sum /usr/portage/net-misc/curl/curl-7.11.0.ebuild
e0d2b9b477d976abe1247ff953d97d88  /usr/portage/net-misc/curl/curl-7.11.0.ebuild

I think I found the culprit: the distcc FEATURE. When disabled, curl compiles fine (because -fPIC (and -pipe, BTW) indeed is there then). Turns out distccd crashed on the compile server and somehow this tricked configure/libtool into choosing wrong flags. The problem is easily reproducible:
/etc/init.d/distccd stop on the compile server -> curl ebuild fails
/etc/init.d/distccd start on the compile server -> curl ebuild succeeds

Here is a relevant part of the config.log diff:

@@ -628,16 +656,21 @@
 configure:8121: result: -fPIC
 configure:8128: checking if gcc PIC flag -fPIC works
 configure:8149: gcc -c -O2  -fPIC -DPIC conftest.c >&5
+distcc[24399] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
 configure:8153: $? = 0
-configure:8161: result: yes
+configure:8161: result: no
 configure:8185: checking if gcc supports -c -o file.o
 configure:8216: gcc -c -O2  -o out/conftest2.o conftest.c >&5

Probably this is a distcc or portage bug then...
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2004-04-15 14:20:11 UTC
You are not mixing amd64 and x86 boxes in your distcc network, are you ?
Comment 4 Evgeny Stambulchik 2004-04-16 07:46:16 UTC
Surely, I am not. Both boxes are gentoo/amd64. Further, as I wrote earlier, it's when the remote distccd is _down_, configure fails.
Comment 5 Travis Tilley (RETIRED) gentoo-dev 2004-04-16 22:26:44 UTC
this is an odd distcc issue... asking for more expert help here
Comment 6 Travis Tilley (RETIRED) gentoo-dev 2004-07-13 16:22:07 UTC
i dont know what to do with this bug.
Comment 7 Lisa Seelye (RETIRED) gentoo-dev 2004-07-13 18:14:51 UTC
Can the original poster please provide the output from /tmp/curl_log.txt after these commands:

  distcc-config --set-verbose 1
  DISTCC_LOG=/tmp/curl_log.txt emerge =net-misc/curl-7.11.0

Also include output from:
  emerge info

Please also include the corresponding log segment from the volunteer host.

And please for the love of tux make sure your clocks are synced. ;)

Is this reproducable on every other amd64 cluster?
Comment 8 Evgeny Stambulchik 2004-07-20 05:37:13 UTC
Well, feeling like getting crazy...
distcc-config --set-verbose 1 && DISTCC_LOG=/tmp/curl_log.txt emerge =net-misc/curl-7.11.0

results in curl correctly compiled & installed (and /tmp/curl_log.txt full of debugging info). Any further invocation of `DISTCC_LOG=/tmp/curl_log.txt emerge =net-misc/curl-7.11.0' fail AND NO /tmp/curl_log.txt created! Until I invoke distcc-config again (--set-verbose 0 is ok, too) at which point the first compilation of curl succeeds and all next attempts fail....

OK, edited /etc/env.d/02distcc, put DISTCC_LOG=/tmp/curl_log.txt (was empty). sourced it, ran `emerge =net-misc/curl-7.11.0' -> success, all further invocations - as well! Changed /etc/env.d/02distcc back, sourced it (echo $DISTCC_LOG gave nothing), ran emerge -> success AND the log is full! All further invocation of `emerge curl' failed.

What gives? Apparently, distcc keeps its settings in a cache and updates it according to a bizzare logic. Plus, it works differently whether the log file is opened or not.
Comment 9 Evgeny Stambulchik 2004-07-20 05:38:34 UTC
Oops, and here's emerge info:

Portage 2.0.50-r9 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.4.20040605-r0, 2.6
.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 x86_64 5
Gentoo Base System version 1.4.16
distcc[10365] (dcc_trace_version) distcc 2.13 x86_64-pc-linux-gnu; built Apr 13 
2004 13:57:36 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1
/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla
/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/tex
mf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/plate
x/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/.n/distfiles"
FEATURES="autoaddcvs ccache distcc"
GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/local/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d alsa amd64 arts autofs avi berkdb bidi bonobo cdr crypt cups doc dv
d encode esd fftw foomaticdb gd gdbm gif gnome gphoto2 gsl gstreamer gtk gtk2 gt
khtml idea imagemagick imlib imlib2 jpeg kde lcms ldap libg++ libwww lzw-tiff ma
d mbox mikmod motif mozilla moznoirc mozp3p mozsvg mozxmlterm mpeg mpeg4 ncurses
 netcdf nogcj oggvorbis opengl openmotif pam pdflib perl plotutils png postgres 
ppds python qt quicktime radeon readline scanner sdl slang spell ssl svg t1lib t
cltk tcpd tetex tiff transcode transparent-proxy truetype type1 unicode wmf xml2
 xmms xv xvid zlib"

Comment 10 nobody 2004-12-23 13:31:53 UTC
Please mark it dup of http://bugs.gentoo.org/show_bug.cgi?id=71582 see robert moss comment #7 (working on it)
This bug is also related to missing -fPIC 
And it's not against distcc, it's against the ebuild and building share libs.


Happen when you are trying to build a shared library that include another library that was build using -fPIC... file.o in your case.

Comment 11 Evgeny Stambulchik 2004-12-23 13:43:13 UTC
It has nothing to do with #71582. The package compiles fine without distcc. Please read the previous comments.
Comment 12 Lisa Seelye (RETIRED) gentoo-dev 2005-09-11 17:57:13 UTC
try again with newer version of distcc and try logging with the rewrite of 
distcc-config if this is still an issue.

If not, please reopen with the relevant logs asked for in comment #7.