Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235788 - sys-devel/distcc - relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Summary: sys-devel/distcc - relocation R_X86_64_32S against `a local symbol' can not b...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-26 14:53 UTC by Stribik András
Modified: 2009-03-19 17:42 UTC (History)
3 users (show)

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


Attachments
/etc/make.conf (make.conf,1.89 KB, text/plain)
2008-08-26 14:54 UTC, Stribik András
Details
/etc/conf.d/distccd (distccd,1.24 KB, text/plain)
2008-08-26 14:56 UTC, Stribik András
Details
/var/tmp/portage/dev-python/pygobject-2.14.2/temp/environment (environment,113.68 KB, text/plain)
2008-08-26 14:57 UTC, Stribik András
Details
The real build log (dev-python-pygobject-2.14.2-20080828-153243.log,81.77 KB, text/plain)
2008-08-28 15:40 UTC, Stribik András
Details
dev-python/pygobject-2.14.2 build log without distcc (build.log,41.22 KB, text/plain)
2008-11-14 14:47 UTC, Stribik András
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stribik András 2008-08-26 14:53:56 UTC
Compilation fails with some packages (for example dev-python/pygobject-2.14.2, dev-libs/libIDL-0.8.10) when building with sys-devel/distcc-2.18.3-r10. The same thing happens when I try it on localhost only, or with only one make thread.

I attached /etc/make.conf /etc/conf.d/distccd and /var/tmp/portage/dev-python/pygobject-2.14.2/temp/environment

Reproducible: Always

Steps to Reproduce:
1. emerge sys-devel/distcc
2. Configure portage to use distcc. My relevant make.conf lines:
    DISTCC_HOSTS="localhost"
    DISTCC_SSH="/etc/distcc/distcc-ssh"
    DISTCC_VERBOSE="1"
    FEATURES="distcc"
    MAKEOPTS="-j1"
3. Install dev-python/pygobject-2.14.2 (happens with some other packages too)
   emerge -1 dev-python/pygobject

Actual Results:  
Compilation failed with "compile failure". This part of the output seems important:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/_gobject_la-gobjectmodule.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
.libs/_gobject_la-gobjectmodule.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

I get similar messages with other packages.

Expected Results:  
The package should have been installed without problems.

stribika@strib-laptop ~ $ emerge --info
Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-hardened-r2 x86_64)
=================================================================
System uname: 2.6.25-hardened-r2 x86_64 Intel(R) Celeron(R) M CPU 520 @ 1.60GHz
Timestamp of tree: Fri, 22 Aug 2008 11:45:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
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=" -fomit-frame-pointer -fstack-protector-all -march=x86-64 -mmmx -msse -msse2 -O2 -pipe"
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/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS=" -fomit-frame-pointer -fstack-protector-all -march=x86-64 -mmmx -msse -msse2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.inf.elte.hu/ ftp://ftp.nyx.hu/gentoo "
LANG="hu_HU.UTF-8"
LC_ALL="hu_HU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="hu"
MAKEOPTS="-j1"
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"
SYNC="rsync://strib-desktop/gentoo-portage"
USE="X acl acpi alsa amd64 apm avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox fortran gdbm gif gimp gnutls gpm gstreamer hal hardened iconv ipv6 isdnlog jpeg kde kerberos ldap libnotify lzo mad midi mikmod mmap mmx mp3 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl png posix postgres ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session sharedmem sockets spell spl sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype unicode usb vim-syntax vorbis wifi xattr xine xml xorg xscreensaver xv 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 mmap_emul 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Stribik András 2008-08-26 14:54:56 UTC
Created attachment 163824 [details]
/etc/make.conf

Portage configuration
Comment 2 Stribik András 2008-08-26 14:56:05 UTC
Created attachment 163826 [details]
/etc/conf.d/distccd

Distcc configuration
Comment 3 Stribik András 2008-08-26 14:57:47 UTC
Created attachment 163828 [details]
/var/tmp/portage/dev-python/pygobject-2.14.2/temp/environment

Build log
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-26 18:13:27 UTC
Is there a version of distcc in the tree that you don't see this behaviour with?
Comment 5 Stribik András 2008-08-26 19:42:24 UTC
(In reply to comment #4)
> Is there a version of distcc in the tree that you don't see this behaviour
> with?

No. I can install theese versions: 
2.18.3-r10 (~)2.18.3-r11 (~)2.18.3-r12 (~)2.18.3-r13
but none of them works.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-28 08:12:46 UTC
(In reply to comment #3)
> Created an attachment (id=163828) [edit]
> /var/tmp/portage/dev-python/pygobject-2.14.2/temp/environment
> 
> Build log

That's not your build log. You're very much welcome to attach a build log for the failing package.

This is starting to look like a parallel make issue, assuming that you don't normally have MAKEOPTS="-j1" (as your `emerge --info' suggests).
Comment 7 Stribik András 2008-08-28 15:36:38 UTC
(In reply to comment #6)
> That's not your build log. You're very much welcome to attach a build log for
> the failing package.
Sorry about that, I uploaded the real build log.
 
> This is starting to look like a parallel make issue, assuming that you don't
> normally have MAKEOPTS="-j1" (as your `emerge --info' suggests).
I tried the following combinations with 2.18.3-r10, before reporting the bug:
 - MAKEOPTS="-j1", no distcc: works
 - MAKEOPTS="-j2", no distcc: works
 - MAKEOPTS="-j1", distcc on localhost only: does not work
 - MAKEOPTS="-j2", distcc on localhost only: does not work
 - MAKEOPTS="-j6", distcc on 2 computers: does not work
With the other versions, I only tried MAKEOPTS="-j1" localhost only.
Comment 8 Stribik András 2008-08-28 15:40:25 UTC
Created attachment 164002 [details]
The real build log
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-02 17:13:52 UTC
@betelgeuse/hp-cluster: I don't see what distcc is doing wrong here, so let's ask the experts (that's you!). If need be (when it's all dev-python/pygobject's fault, please CC gnome@.
Comment 10 MATSUU Takuto (RETIRED) gentoo-dev 2008-10-19 15:15:41 UTC
Does remote distcc host have same version of gcc and same CHOST?
Comment 11 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-11 15:24:57 UTC
sorry, I was badly mistaken.

If you still have the issue, could you put the results of these commands?
$ gcc-config -l
$ gcc-config -B
$ gcc-config -E
$ whereis x86_64-pc-linux-gnu-gcc
$ echo $PATH
Comment 12 Stribik András 2008-11-11 21:45:00 UTC
> If you still have the issue, could you put the results of these commands?
I do not know if the problem still exists, and unfortunately I can only try it on this weekend. I have the same versions of the relevant packages, so there is a good chance it is.
Here are the outputs of the commands, on both computers:
stribika@strib-laptop ~ $ gcc-config -l
 [1] x86_64-pc-linux-gnu-4.1.2 *
stribika@strib-laptop ~ $ gcc-config -B
/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2
stribika@strib-laptop ~ $ gcc-config -E
export PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/kde/3.5/bin:/home/stribika/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/qt/3/bin:/usr/games/bin"
stribika@strib-laptop ~ $ whereis x86_64-pc-linux-gnu-gcc
x86_64-pc-linux-gnu-gcc: /usr/bin/x86_64-pc-linux-gnu-gcc /usr/X11R6/bin/x86_64-pc-linux-gnu-gcc
stribika@strib-laptop ~ $ echo $PATH
/usr/kde/3.5/bin:/home/stribika/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/qt/3/bin:/usr/games/bin
stribika@strib-laptop ~ $ ssh strib-desktop
Last login: Tue Nov 11 19:10:36 CET 2008 on :0
Last login: Tue Nov 11 22:35:24 2008 from strib-laptop
stribika@strib-desktop ~ $ gcc-config -l
 [1] x86_64-pc-linux-gnu-3.4.6
 [2] x86_64-pc-linux-gnu-3.4.6-hardened
 [3] x86_64-pc-linux-gnu-3.4.6-hardenednopie
 [4] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
 [5] x86_64-pc-linux-gnu-3.4.6-hardenednossp
 [6] x86_64-pc-linux-gnu-4.1.2 *
stribika@strib-desktop ~ $ gcc-config -B
/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2
stribika@strib-desktop ~ $ gcc-config -E
export PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/home/stribika/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/local/games/bin:/usr/games/bin"
stribika@strib-desktop ~ $ whereis x86_64-pc-linux-gnu-gcc
x86_64-pc-linux-gnu-gcc: /usr/bin/x86_64-pc-linux-gnu-gcc /usr/X11R6/bin/x86_64-pc-linux-gnu-gcc
stribika@strib-desktop ~ $ echo $PATH
/home/stribika/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/local/games/bin:/usr/games/bin


Comment 13 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-13 16:14:45 UTC
I don't know why following are appeared in dev-python-pygobject-2.14.2-20080828-153243.log.

checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC
checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC works... no

in my env:
checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes

Could you put build.log without distcc?

btw, how about distcc-3.0-r4?
Comment 14 Stribik András 2008-11-14 14:47:46 UTC
Created attachment 171720 [details]
dev-python/pygobject-2.14.2 build log without distcc

The first 2 difference between this and the distcc version:

82,84c82,85
< checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC works... yes
< checking if x86_64-pc-linux-gnu-gcc static flag -static works... yes
< checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... yes
---
> checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC works... no
> checking if x86_64-pc-linux-gnu-gcc static flag -static works... no
> checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... no
> checking if we can lock with hard links... yes
87c88,107
< checking dynamic linker characterisics... GNU/Linux ld.so
---
> checking dynamic linker characteristics... distcc[23931] (dcc_trace_version) distcc 3.0 x86_64-pc-linux-gnu; built Nov 14 2008 15:27:58

3.0-r4 does not fix the problem.
Comment 15 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-15 05:43:39 UTC
Could you put results of following?

# distcc-config --get-env
# ls -al /usr/lib*/distcc/bin/
Comment 16 Stribik András 2008-11-15 14:46:53 UTC
> # distcc-config --get-env
# This file is managed by distcc-config; use it to change these settings.
DISTCC_LOG=""
DCCC_PATH="/usr/lib64/distcc/bin"
DISTCC_VERBOSE="1"

> # ls -al /usr/lib*/distcc/bin/
/usr/lib64/distcc/bin:
összesen 0
0 drwxr-xr-x 2 root root 135 nov 14 15.28 .
0 drwxr-xr-x 3 root root  16 aug 25 22.36 ..
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 c++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 cc -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 g++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 gcc -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc

/usr/lib/distcc/bin:
összesen 0
0 drwxr-xr-x 2 root root 135 nov 14 15.28 .
0 drwxr-xr-x 3 root root  16 aug 25 22.36 ..
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 c++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 cc -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 g++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 gcc -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
0 lrwxrwxrwx 1 root root  15 nov 14 15.28 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc
Comment 17 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-16 17:31:03 UTC
I have no idea. I thought that it is gcc issue.
Could you try to remerge gcc in all distccd server?
Comment 18 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-20 03:10:47 UTC
Could you try to remove DISTCC_SSH="/etc/distcc/distcc-ssh" from make.conf?

and what does /etc/distcc/distcc-ssh contain?
Comment 19 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-19 17:42:08 UTC
no response. please reopen if you still have the issue.