Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170439 - [fPIC] sys-libs/libixp-0.2-r1 fails to compile
Summary: [fPIC] sys-libs/libixp-0.2-r1 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-11 16:48 UTC by ebfe
Modified: 2007-06-24 18:56 UTC (History)
7 users (show)

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


Attachments
Update patch to use SOFLAGS for the library only. (libixp-0.2-shared-object.patch,2.45 KB, patch)
2007-04-25 16:24 UTC, Luke Renn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ebfe 2007-03-11 16:48:11 UTC
CC socket.c
CC util.c
CC ixpc.c
AR libixp.a
CC libixp.so
LD ixpc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: client.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
client.o: could not read symbols: Bad value


has to be compiled with -fPIC, which it currently does not :-\

Reproducible: Always

Steps to Reproduce:
1.emerge libixp on amd64
2.
3.
Comment 1 Santiago M. Mola (RETIRED) gentoo-dev 2007-03-13 20:41:16 UTC
The same file fails in x86.
---------------------------------------------------------------------
>> Compiling source in /var/tmp/portage/sys-libs/libixp-0.2-r1/work/libixp-0.2 ...
libixp build options:
CFLAGS   = -march=pentium4 -O2 -pipe -I. -I/usr/include -DVERSION="0.2"
LDFLAGS  = -L/usr/lib -lc -L.
CC client.c
CC       = i686-pc-linux-gnu-gcc
SOFLAGS  = -fPIC -shared
LD       = i686-pc-linux-gnu-gcc
CC convert.c
CC intmap.c
CC message.c
CC request.c
CC server.c
CC socket.c
CC transport.c
CC util.c
CC ixpc.c
AR libixp.a
LD ixpc
CC libixp.so
ixpc.o: En la función `write_data':
ixpc.c:(.text+0x30): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x5f): referencia a `ixp_client_write' sin definir
ixpc.c:(.text+0xfb): referencia a `ixp_client_write' sin definir
ixpc.o: En la función `main':
ixpc.c:(.text+0x3a3): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x3b1): referencia a `ixp_client_hangup' sin definir
ixpc.c:(.text+0x3fe): referencia a `ixp_client_dial' sin definir
ixpc.c:(.text+0x486): referencia a `ixp_client_walkopen' sin definir
ixpc.c:(.text+0x4de): referencia a `ixp_client_read' sin definir
ixpc.c:(.text+0x500): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x53c): referencia a `ixp_client_remove' sin definir
ixpc.c:(.text+0x5b5): referencia a `ixp_client_walk' sin definir
ixpc.c:(.text+0x5e5): referencia a `ixp_client_create' sin definir
ixpc.c:(.text+0x605): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x621): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x664): referencia a `ixp_client_walkopen' sin definir
ixpc.c:(.text+0x684): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x697): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x6b4): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x6d0): referencia a `ixp_client_stat' sin definir
ixpc.c:(.text+0x6f8): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x769): referencia a `ixp_client_open' sin definir
ixpc.c:(.text+0x79e): referencia a `ixp_erealloc' sin definir
ixpc.c:(.text+0x7f1): referencia a `ixp_client_read' sin definir
ixpc.c:(.text+0x839): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x855): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x879): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x8f1): referencia a `ixp_client_close' sin definir
collect2: ld devolvió el estado de salida 1
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a
DT_TEXTREL in object.
make: *** [ixpc] Error 1
>> Compiling source in /var/tmp/portage/sys-libs/libixp-0.2-r1/work/libixp-0.2 ...
libixp build options:
CFLAGS   = -march=pentium4 -O2 -pipe -I. -I/usr/include -DVERSION="0.2"
LDFLAGS  = -L/usr/lib -lc -L.
CC client.c
CC       = i686-pc-linux-gnu-gcc
SOFLAGS  = -fPIC -shared
LD       = i686-pc-linux-gnu-gcc
CC convert.c
CC intmap.c
CC message.c
CC request.c
CC server.c
CC socket.c
CC transport.c
CC util.c
CC ixpc.c
AR libixp.a
LD ixpc
CC libixp.so
ixpc.o: En la función `write_data':
ixpc.c:(.text+0x30): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x5f): referencia a `ixp_client_write' sin definir
ixpc.c:(.text+0xfb): referencia a `ixp_client_write' sin definir
ixpc.o: En la función `main':
ixpc.c:(.text+0x3a3): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x3b1): referencia a `ixp_client_hangup' sin definir
ixpc.c:(.text+0x3fe): referencia a `ixp_client_dial' sin definir
ixpc.c:(.text+0x486): referencia a `ixp_client_walkopen' sin definir
ixpc.c:(.text+0x4de): referencia a `ixp_client_read' sin definir
ixpc.c:(.text+0x500): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x53c): referencia a `ixp_client_remove' sin definir
ixpc.c:(.text+0x5b5): referencia a `ixp_client_walk' sin definir
ixpc.c:(.text+0x5e5): referencia a `ixp_client_create' sin definir
ixpc.c:(.text+0x605): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x621): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x664): referencia a `ixp_client_walkopen' sin definir
ixpc.c:(.text+0x684): referencia a `ixp_client_close' sin definir
ixpc.c:(.text+0x697): referencia a `ixp_eprint' sin definir
ixpc.c:(.text+0x6b4): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x6d0): referencia a `ixp_client_stat' sin definir
ixpc.c:(.text+0x6f8): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x769): referencia a `ixp_client_open' sin definir
ixpc.c:(.text+0x79e): referencia a `ixp_erealloc' sin definir
ixpc.c:(.text+0x7f1): referencia a `ixp_client_read' sin definir
ixpc.c:(.text+0x839): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x855): referencia a `ixp_emallocz' sin definir
ixpc.c:(.text+0x879): referencia a `ixp_unpack_stat' sin definir
ixpc.c:(.text+0x8f1): referencia a `ixp_client_close' sin definir
collect2: ld devolvió el estado de salida 1
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a
DT_TEXTREL in object.
make: *** [ixpc] Error 1
Comment 2 ifreecarve 2007-03-20 03:52:53 UTC
if it helps, i get a slightly different error message

>>> Unpacking source...
>>> Unpacking libixp-0.2.tar.gz to /var/tmp/portage/sys-libs/libixp-0.2-r1/work
 * Applying libixp-0.2-shared-object.patch ...                                        [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-libs/libixp-0.2-r1/work/libixp-0.2 ...
libixp build options:
CC client.c
CFLAGS   = -march=k8 -O3 -pipe -mmmx -msse -msse2 -m3dnow -ftracer -funit-at-a-time -funswitch-loops  -I. -I/usr/include -DVERSION="0.2"
LDFLAGS  = -Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common  -L/usr/lib -lc -L.
CC       = x86_64-pc-linux-gnu-gcc
SOFLAGS  = -fPIC -shared
LD       = x86_64-pc-linux-gnu-gcc
CC convert.c
CC intmap.c
CC message.c
CC request.c
CC server.c
CC socket.c
CC transport.c
CC util.c
CC ixpc.c
LD ixpc
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lixp
collect2: ld returned 1 exit status
make: *** [ixpc] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: sys-libs/libixp-0.2-r1 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 3123:   Called src_compile
  ebuild.sh, line 645:   Called die




# emerge --info
Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-3.4.5, glibc-2.4-r4, 2.6.16-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Timestamp of tree: Sun, 18 Mar 2007 21:20:01 +0000
ccache version 2.3 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.5-r2, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O3 -pipe -mmmx -msse -msse2 -m3dnow -ftracer -funit-at-a-time -funswitch-loops "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O3 -pipe -mmmx -msse -msse2 -m3dnow -ftracer -funit-at-a-time -funswitch-loops "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.acm.cs.rpi.edu/gentoo/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X aalib acpi amd64 apache2 bash-completion berkdb bitmap-fonts cdr cli cracklib crypt cups curl curlwrappers dga directfb divx4linux dri dts dvd dvdr dvdread emacs emacs-w3 esd exif flac fortran ftp gd gdbm glut gpm iconv imagemagick ipv6 isdnlog jpeg2k libg++ lm_sensors mad matroska midi mysql mysqli mythtv ncurses nls nptl nptlonly ocaml offensive ogg pam pcre pdf pear-db perl php ppds pppd python readline reflection samba session shorten spl ssl svg tcpd theora truetype truetype-fonts type1-fonts unicode voodoo1 voodoo2 vorbis xml xorg xvid 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Bodo Graumann 2007-03-30 17:24:15 UTC
I have exactly the same bug as the original
(being amd64 too)
removing the patch (libixp-0.2-shared-object.patch) from the ebuild solved the problem
and wmii started successfully too
but I bet, the 9P part doesn't function
I actualy don't know how to test it, or why I even need it...
(should there be a USE-flag introduced?)
maybe someone could just try to adjust the patch
so that compilation and the 9P thing work
Comment 4 Bodo Graumann 2007-04-03 12:16:04 UTC
I don't get it...
just tried to find the problem
here: http://forums.gentoo.org/viewtopic.php?t=20859
someone said how one can use ebuild instead of emerge to install something
seemed especially useful for tracing down compilebugs
so I tried it and -> it just worked
no errors anymore!!!
so what's the difference between
a) emerge libixp-0.2-r1
b) ebuild /usr/portage/sys-libs/libixp/libixp-0.2-r1.ebuild fetch
   ebuild /usr/portage/sys-libs/libixp/libixp-0.2-r1.ebuild unpack
   ebuild /usr/portage/sys-libs/libixp/libixp-0.2-r1.ebuild compile
   ebuild /usr/portage/sys-libs/libixp/libixp-0.2-r1.ebuild install
   ebuild /usr/portage/sys-libs/libixp/libixp-0.2-r1.ebuild qmerge

and I wonder if the 9P-features of wmii work correctly now
Comment 5 Bodo Graumann 2007-04-03 12:24:09 UTC
ok, well
I've got to correct myself
the 'cure' I found is for the x86-part
like the errors reported by Santiago

sorry, that I messed that up a bit

the amd64-thing is still a problem
it seems that there are two different bugs

suggestion: split this bugreport
Comment 6 Christoph Mende (RETIRED) gentoo-dev 2007-04-15 13:05:46 UTC
The patch cannot simply be removed as that'd mean that libixp.so won't be installed, it needs to be fixed though, after compiling it with -fPIC in my CFLAGS (which works, but shouldn't be done since there's an executable), I also noticed that the ebuild installs into /usr/lib.
PS: I'm unable to reproduce the error in comment #2 on x86 and comment #3 is unrelated ;>
Comment 7 Luke Renn 2007-04-25 16:24:23 UTC
Created attachment 117236 [details, diff]
Update patch to use SOFLAGS for the library only.

I'm by no means a make expert, but this should fix the bug, and make sure that ixpc doesn't get compiled with the SOFLAGS.  This replaces the patch in libixp/files.
Comment 8 John 2007-05-20 00:24:40 UTC
The patch above seems to work fine and should probably be committed.
(In reply to comment #7)
> Created an attachment (id=117236) [edit]
> Update patch to use SOFLAGS for the library only.
> 
> I'm by no means a make expert, but this should fix the bug, and make sure that
> ixpc doesn't get compiled with the SOFLAGS.  This replaces the patch in
> libixp/files. 
> 

(In reply to comment #7)
> Created an attachment (id=117236) [edit]
> Update patch to use SOFLAGS for the library only.
> 
> I'm by no means a make expert, but this should fix the bug, and make sure that
> ixpc doesn't get compiled with the SOFLAGS.  This replaces the patch in
> libixp/files. 
> 

Comment 9 Christoph Mende (RETIRED) gentoo-dev 2007-06-24 14:52:50 UTC
CCing maintainer, please see comment #7 for a fix
Comment 10 Bodo Graumann 2007-06-24 15:38:17 UTC
Looks good, works for me (amd64).
Maybe there should be a new version created: "libixp-0.2-r2"

hope it will be committed soon
Comment 11 David Shakaryan (RETIRED) gentoo-dev 2007-06-24 18:56:42 UTC
This should be fixed in CVS, or so I hope. I did not bump the revision as this bug  is related to the compilation process and should not really affect people who already have it installed.