Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101686 - -fPIC required for gnome-cups-manager
Summary: -fPIC required for gnome-cups-manager
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-07 16:14 UTC by David Pyke
Modified: 2005-08-08 02:28 UTC (History)
1 user (show)

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


Attachments
Places -fPIC in CFLAGS (gnome-cups-manager-0.30-fpic.patch,335 bytes, patch)
2005-08-07 16:34 UTC, Andy Kissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Pyke 2005-08-07 16:14:14 UTC
x86_64-pc-linux-gnu-g++ -shared -nostdlib
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/crtbeginS.o  .libs/snmpinter.o
.libs/gnome-cups-ui-init.o .libs/gnome-cups-i18n.o .libs/gnome-cups-ui-util.o
.libs/gnome-cups-ui-print.o .libs/gnome-cups-ui-driver.o
.libs/gnome-cups-ui-connection.o .libs/gnome-cups-permission.o
-Wl,--whole-archive snmpkit/.libs/libsnmpkit.a -Wl,--no-whole-archive 
-Wl,--rpath -Wl,//usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3 -Wl,--rpath
-Wl,//usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3 -pthread /usr/lib64/libgnomeui-2.so
-lSM -lICE /usr/lib64/libbonoboui-2.so /usr/lib64/libgnomecanvas-2.so
/usr/lib64/libart_lgpl_2.so /usr/lib64/libpangoft2-1.0.so
/usr/lib64/libgnome-2.so /usr/lib/libpopt.so /usr/lib64/libgnomevfs-2.so
/usr/lib64/libgconf-2.so /usr/lib64/libglade-2.0.so /usr/lib64/libxml2.so
-lpthread -lz /usr/lib64/libbonobo-2.so /usr/lib64/libbonobo-activation.so
/usr/lib64/libORBit-2.so /usr/lib64/libgthread-2.0.so
/usr/lib64/libgnome-keyring.so /usr/lib64/libgtk-x11-2.0.so
/usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so
/usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangoxft-1.0.so
/usr/lib64/libpangox-1.0.so /usr/lib64/libpango-1.0.so
/usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libgnomecups-1.0.so -lcups -lssl
-lcrypto -lnsl /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so
-L/usr/x86_64-pc-linux-gnu/bin -L/usr/x86_64-pc-linux-gnu/lib -lsmbclient
-L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3
-L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../lib64
-L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../.. -L/lib/../lib64
-L/usr/lib/../lib64 //usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libstdc++.so -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/crtendS.o
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../lib64/crtn.o  -march=opteron
-Wl,-O1 -Wl,--export-dynamic -Wl,-soname -Wl,libgnomecupsui-1.0.so.1 -o
.libs/libgnomecupsui-1.0.so.1.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
.libs/snmpinter.o: relocation R_X86_64_PC32 against `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()@@GLIBCXX_3.4'
can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libgnomecupsui-1.0.la] Error 1
make[3]: Leaving directory
`/var/tmp/portage/gnome-cups-manager-0.30/work/gnome-cups-manager-0.30/libgnomecups'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/gnome-cups-manager-0.30/work/gnome-cups-manager-0.30/libgnomecups'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/gnome-cups-manager-0.30/work/gnome-cups-manager-0.30'
make: *** [all] Error 2



Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0,
2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Opteron(tm) Processor 142
Gentoo Base System version 1.6.13
ccache version 2.4 [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=opteron -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=opteron -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/
http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo
http://gentoo.mirrors.pair.com/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 3dnowex X aac alsa apache2 audiofile avi bdf berkdb bidi bitmap-fonts
bmp bonobo bzlib cdparanoia cdr crypt cups curl dvd dvdr dvdread eds encode esd
evo fbcon flac foomaticdb fortran ftp gd gif gnome gpm gstreamer gtk gtk2
gtkhtml guile hal icq imagemagick imlib ipv6 java jpeg libwww lm_sensors lzw
lzw-tiff mad maildir mbox mime mozilla moznoirc mozsvg mp3 mpeg mplayer msn nas
ncurses nls nptl nvidia offensive ogg oggvorbis openal opengl oscar pam pda
pdflib perl php plotutils png ppds python qt quicktime readline samba sdl
sndfile snmp soap sockets sox speex spell ssl tcltk tcpd theora tidy tiff
truetype-fonts type1-fonts usb userlocales v4l videos vorbis wifi wxwindows xine
xml xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2005-08-07 16:27:26 UTC
Works fine here.  I've been using it all day, trying to figure out why my wife's
laptop wouldn't print. 

Your problem is the -fvisibility-inlines-hidden.  Take that out of your CXXFLAGS
and it will build fine.
Comment 2 Daniel Gryniewicz (RETIRED) gentoo-dev 2005-08-07 16:28:01 UTC
(or upgrade to gcc 3.4.4, which built fine with -fvisibility-inlines-hidden)
Comment 3 Andy Kissner 2005-08-07 16:34:39 UTC
Created attachment 65364 [details, diff]
Places -fPIC in CFLAGS
Comment 4 Olivier Crete (RETIRED) gentoo-dev 2005-08-07 16:50:50 UTC
that's very evil... adding -fPIC to the cflags...

did you try recompiling without -fvisibility-inlines-hidden ? Have you compiled
glibc/gcc with it (if so recompile them without)
Comment 5 Andy Kissner 2005-08-07 16:55:36 UTC
(In reply to comment #4)
> that's very evil... adding -fPIC to the cflags...
> 
> did you try recompiling without -fvisibility-inlines-hidden ? Have you compiled
> glibc/gcc with it (if so recompile them without)

It's not like I'm submitting to the mainline portage tree or something. And I
take evil as a compliment ;)
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2005-08-08 02:28:03 UTC
see comment 1 or comment 2 for a solution, adding -fPIC to CFLAGS is NOT a solution