LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 01-25-2008, 09:44 AM   #1
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Debian recompiled without systemd, Ubuntu Hardy
Posts: 107

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


Hi,
I'm trying to build enigmail from source on F7 x86_64 for SeaMonkey 1.1.6, following instructions given here http://enigmail.mozdev.org/download/source.php

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]: *** [libenigmime.so] Error 1

ld -v gives GNU ld version 2.17.50.0.12-4 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]: *** [libenigmime.so] 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
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, grml
Posts: 210

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
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Debian recompiled without systemd, Ubuntu Hardy
Posts: 107

Original Poster
Rep: Reputation: 21
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.
 
  


Reply


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


All times are GMT -5. The time now is 12:42 AM.

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