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. |
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. |
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. |
All times are GMT -5. The time now is 10:46 PM. |