Operating System - HP-UX
1753931 Members
9680 Online
108810 Solutions
New Discussion юеВ

Re: ld: invalid BFD target '-L /usr/local/lib'

 
Lutz_4
Advisor

ld: invalid BFD target '-L /usr/local/lib'

Hello,

I'm triiing to install IPC-Sharelite tool in order to monitor my flexlm server under "cacti".

However at the "make" step of the installation I got the following error :
>LD_RUN_PATH="" ld -b -L/usr/local/lib sharelite.o ShareLite.o -o blib/arch/auto/IPC/ShareLite/ShareLite.sl
>ld: invalid BFD target '-L /usr/local/lib'

I'm under HPUX 11i and the IPC-Sharelite release is 0.09

any idea why ?

thx

Mathieu
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: ld: invalid BFD target '-L /usr/local/lib'

The string "Invalid bfd target" occurs in several foreign devil tools. Which ld are you using? What does "whence ld" show?

Make sure that /usr/bin or /usr/ccs/bin occurs before /usr/local/bin in PATH. Or just remove /usr/local/bin/ld.
Lutz_4
Advisor

Re: ld: invalid BFD target '-L /usr/local/lib'

I have :

whereis ld : /usr/bin/ld /usr/ccs/bin/ld /usr/share/am/man1.Z/ld.1

which ld : /usr/local/pa20_64/bin/ld



PATH :
.../usr/bin:/usr/local/pa20_64/bin: ... :/usr/local/bin: ... :/usr/ccs/bin


Wouter Jagers
Honored Contributor

Re: ld: invalid BFD target '-L /usr/local/lib'

"which ld : /usr/local/pa20_64/bin/ld"

If I'm right, this means that this particular file will be used when "ld" is issued.

(whereis doesn't find that one because it's not in one of the standard locations, I suppose)

This is strange, though, since /usr/bin seems to be before /usr/local/pa20_64/bin in your path.. sure it's not in the path twice ?

Cheers
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Lutz_4
Advisor

Re: ld: invalid BFD target '-L /usr/local/lib'

Sorry I made a mistake :
the real PATH is :
.../usr/sbin:/usr/local/pa20_64/bin: ... :/usr/local/bin:/usr/bin:/usr/ccs/bin
Wouter Jagers
Honored Contributor

Re: ld: invalid BFD target '-L /usr/local/lib'

aha =)

I'd say try putting /usr/bin right before /usr/local/pa20_64/bin and try again.

Good luck !
an engineer's aim in a discussion is not to persuade, but to clarify.
Dennis Handly
Acclaimed Contributor

Re: ld: invalid BFD target '-L /usr/local/lib'

Or change your "ld" string to the absolute path of /usr/ccs/bin/ld.
Sanjeeb_Mohanta
HPE Pro

Re: ld: invalid BFD target '-L /usr/local/lib'

RHEL 8 below option works.

/bin/ld -G -o /usr/lib64/elfutils/*.so /root/libelfutils.sl

Thank You,

Sanjeeb Kumar Mohanta

I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo