This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld: fatal: file .libs/libglib-2.0.exp: unknown file type


On 12/ 1/10 08:07 PM, Ian Lance Taylor wrote:
Laviticus Stone<laviticus@tptp.cc> writes:

  I'm trying to compile glib-2 from netbsd pkgsrc on solaris and
receive this error. I don't understand why it says unknown file type
when the ld man page says that the file option to
--retain-symbols-file is supposed to just be a flat file. Please help!

-Wl,-retain-symbols-file -Wl,.libs/libglib-2.0.exp -o
.libs/libglib-2.0.so.0.2600.1
ld: fatal: file .libs/libglib-2.0.exp: unknown file type
ld: fatal: file processing errors. No output written to
.libs/libglib-2.0.so.0.2600.1

These errors do not appear to be coming from the GNU linker. I suspect that you are using the Solaris linker, and I suspect that it is interpreting -retain-symbols-file as -r -e etain-symbols-file and then treating .libs/libglib-2.0.exp as an input file.

If you want to use -retain-symbols-file, you need to use the GNU linker,
not the Solaris linker.

Ian

Ah you are correct. I had that issue in the past although at a different point in compilation, it had seemed with the current pkgsrc from netbsd and current Solaris 11 I had bypassed the issue. a type -P ld or which ld shows it as /usr/gnu/bin/ld although the pkgsrc bootstrap must have picked up on /usr/bin/ld somehow. I'll have to debug that.


Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]