Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Whats up with "recompile with -fPIC"? [Temporary solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
statare
n00b
n00b


Joined: 25 Mar 2005
Posts: 28
Location: Sweden

PostPosted: Mon Oct 03, 2005 6:31 pm    Post subject: Whats up with "recompile with -fPIC"? [Temporary s Reply with quote

Quote:
relocation R_X86_64_32 against `a local symbol` can not be used when making a shared object; recompile with -fPIC
I get this errors on some packets. I switched from syslog-ng to sysklogd becuse of this problem with a dep to syslog-ng. Now I try to emerge curl, same error. Have seen that downgrading binutils might solve it. But why? Is it a amd64 problem only? This is a server, that is, I want it stable as a rock, no fancy anything.
If this is a generally problem with gentoo amd64, is it better to switch to regular X86 32bit system?


Last edited by statare on Tue Oct 04, 2005 2:52 am; edited 1 time in total
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Tue Oct 04, 2005 12:18 am    Post subject: Reply with quote

What packages have you seen it for?

What is the output from emerge --info on your system?

Have you checked to see if there is a bug filed?
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
statare
n00b
n00b


Joined: 25 Mar 2005
Posts: 28
Location: Sweden

PostPosted: Tue Oct 04, 2005 12:58 am    Post subject: Reply with quote

loftwyr wrote:
What packages have you seen it for?

net-misc/curl-7.13.2

loftwyr wrote:
What is the output from emerge --info on your system?

Code:
# emerge --info
Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r10 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
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.6-r1
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="-march=k8 -02 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -02 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo ftp://mirror.pudas.net/gentoo http://distfiles.gentoo.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 alsa avi berkdb bitmap-fonts crypt eds emboss encode foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 imlib jpeg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl nptlonly opengl pam pdflib perl png python qt quicktime readline samba sdl spell ssl tcpd tiff truetype-fonts type1-fonts usb userlocales xpm xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

loftwyr wrote:
Have you checked to see if there is a bug filed?

I can't find any about curl. But I saw one with same error and if I understand it right s/he downgraded binutils so I thought it is a more generic thing. But I would like all defaults and not downgrade binutils.

Everything is default since its a internal file server. No security other than Osiris and Iptabels. I have done a stage 3 install. When I rebuilt the system, a dependency packet for syslog-ng had the same error. This is right after live cd and first --sync. I don't remember the name. I didn't care which syslog I had so I switched to sysklogd. I haven't done anything yet other than getting iptables, osiris and samba upp and running.

Edit:
I had som time to search and test more.. I found that fPIC is not a use flag, its a cflag. :o
When I added fPIC as a cflag to emerge it compiled it without any trouble.
Code:
CFLAGS="-march=k8 -02 -pipe -fPIC" emerge -av curl

Is there a way to add a cflag to a specific package only or is it safe to add -fPIC to make.conf? If curl gets updated I guess it will break again...


Last edited by statare on Tue Oct 04, 2005 3:05 am; edited 1 time in total
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Tue Oct 04, 2005 2:21 pm    Post subject: Reply with quote

statare wrote:

I had som time to search and test more.. I found that fPIC is not a use flag, its a cflag. :o
When I added fPIC as a cflag to emerge it compiled it without any trouble.
Code:
CFLAGS="-march=k8 -02 -pipe -fPIC" emerge -av curl

Is there a way to add a cflag to a specific package only or is it safe to add -fPIC to make.conf? If curl gets updated I guess it will break again...


You should file a bug report with bugzilla and the developers will fix the ebuild. You should never add fPIc to make.conf, it could seriously break other packages. In the mean time, probably downgrading the otehr packages is a better idea.
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
Tshwala
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 86
Location: South Africa

PostPosted: Tue Oct 04, 2005 3:33 pm    Post subject: Reply with quote

I had the same problem when compiling yate. Yate needs to link to gsm which atm doesn't have -fPIC in its CFLAGs.

Check out the following link for more info...
http://dev.gentoo.org/~plasmaroo/devmanual//archs/amd64/

I would suggest filing a bug report rather than changing your CFLAGS.
Back to top
View user's profile Send private message
pacho2
Developer
Developer


Joined: 04 Mar 2005
Posts: 2599
Location: Oviedo, Spain

PostPosted: Tue Oct 04, 2005 6:45 pm    Post subject: Reply with quote

Have you tried to use pic USE Flag? I have all my gentoo system compiled with this USE flag and I hace no problems. I don't use -fPIC cflag because it is no recomended and, if you use it, you will no be able to use prelink.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum