Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-25-2008, 09:44 AM   #1
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 279

Rep: Reputation: 69
ld (binutils) issues when building enigmail on Fedora 7 x86_64

I'm trying to build enigmail from source on F7 x86_64 for SeaMonkey 1.1.6, following instructions given here

All goes well until running make, when it stops with

/usr/bin/ld: nsEnigModule.o: relocation R_X86_64_PC32 against `NS_NewGenericModule2(nsModuleInfo const*, nsIModule**)' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[2]: *** [] Error 1

ld -v gives GNU ld version 20070128

So I built binutils 2.17 from a new source tarball using the following:

CC="gcc -fPIC" ./configure --prefix=/home/sjr/Desktop --enable-shared --enable-64-bit-bfd
CC="gcc -fPIC" make
make install

I installed them to my desktop to avoid actually replacing the default binutils, and then and then prepended my Desktop/bin directory to the PATH.

Now, make stops with

/home/sjr/Desktop/bin/ld: unrecognized option '--hash-style=gnu'
/home/sjr/Desktop/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
gmake[2]: *** [] Error 1

Now what gives? I seem to recall hearing that gcc passes some argument containing --hash-style to ld. So, is there a way to make ld recognize this (because apparently the default ld from the F7 binutils does) and should that solve this? Thanks.
Old 02-03-2008, 02:05 PM   #2
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 219

Rep: Reputation: 33
I am not sure, but why do you have a ld in ~/Desktop/bin/ld?
Should't be the /usr/bin/ld be used? Try to reset the PATH to defaults. You will need the ~/Desktop/bin only after successfully compiling the enigmail package.
Old 02-05-2008, 05:38 PM   #3
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 279

Original Poster
Rep: Reputation: 69
Thanks for your reply. The ld in ~/Desktop/bin is part of the "new" binutils that I was testing (so that the usual one in /usr/bin didn't get overwritten). I prepended this to the path so that during the make process, this ld was used and not that in /usr/bin. Also note that enigmail has no "make install" process and thus won't put anything in ~/Desktop/bin etc. It's built in situ and you have to create an .xpi archive (Mozilla add-on) and then install it through Mozilla/Seamonkey/whatever.

I've experimented with both binutils 2.17 and 2.18 (and even earlier ones to no avail). Using ld from the 2.18 package doesn't stop with the --hash-style error but instead gives the same -fPIC error, even after compiling using this flag. In other words, ld can't tell that it was compiled with -fPIC.

The problem is that Mozilla/Seamonkey and enigmail need to be built with the same compiler and the same compiler flags (so this requires a clean build of Mozilla/Seamonkey if the compiler is changed). I've heard that this ld problem may be caused in part by the Red Hat gcc build (?), but I don't think so. I built gcc 4.2.2 from source the other night and got the exact same errors using it, even in conjunction with 3 different versions of binutils built from _this_ gcc.

Although this error seems to be unique to x86_64, someone somewhere did build the 64 bit enigmail add-on for Thunderbird, and I downloaded it, installed it, and it works (but still none for other e-mail clients). I have got Firefox and Thunderbird pre-installed through FC7, and of course these were built with the same version of Red Hat gcc as can be confirmed through about:buildconfig.

But concluding that this has something to do with the Seamonkey source doesn't really make sense, since each time the errors point to something in the binutils package. Confused.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubles in building cross compiler (error @ binutils) saistain Linux - Software 3 10-15-2007 06:37 AM
Problem on building Binutils bitrux Linux From Scratch 8 10-05-2006 10:04 AM
Thunderbird, Fedora 5, Enigmail true_atlantis Linux - Software 1 07-01-2006 04:13 AM
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM
building Binutils-2.14 pass 1 (LFS 5.1.1) alihamza Linux From Scratch 1 10-10-2005 07:37 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration