Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Perplexed by Inline::C/MakeMaker LD path

by halfcountplus (Hermit)
on Mar 03, 2014 at 14:02 UTC ( [id://1076777]=note: print w/replies, xml ) Need Help??


in reply to Re: Perplexed by Inline::C/MakeMaker LD path
in thread Perplexed by Inline::C/MakeMaker LD path

As it turns out I don't have modules which access /usr/local/lib without -L. I was presuming "whereis" would give both locations if there were multiple installs but it does not, it just reports the /usr/local one. However, there are distro versions of those libraries in /usr/lib64 (just not libmpg123). This is good, since that was kind of the most baffling part. WRT BUILD_NOISY, all it says about this is:
Starting Build Compile Stage Starting "perl Makefile.PL" Stage Warning (mostly harmless): No library found for -lmpg123

So I ran it through `strace -f` (the dirt is in a child, so just `strace` won't get it). Without `-L`, it stats in order /usr/local/lib64, /lib64, and then /usr/lib64. It's of course my laziness that /usr/local does not follow the convention of dividing 64 and 32 bit libs (since there aren't any of the later).

However, I still don't see why it doesn't use the actual compile time linker path. In the end, the use of `-L /usr/local/lib` is meaningless; it would have been found anyway if `-lmpg123` was used. But it seems if the afforementioned search failed, Inline leaves the "LIBS" command out entirely of its own accord. I'm on the mailing list so I'll ask about this...

Replies are listed 'Best First'.
Re^3: Perplexed by Inline::C/MakeMaker LD path
by syphilis (Archbishop) on Mar 03, 2014 at 14:33 UTC
    Inline leaves the "LIBS" command out entirely of its own accord

    It's looking to me that it's just standard EU::MM behaviour - and not the responsibility of Inline. EU::MM can't find '-lmpg123' because it's not in any of the places it's looking.
    Therefore the '-lmpg123' gets wiped out.

    If your perl was configured to include /usr/local/lib in $Config{libpth}, then LIBS => '-lmpg123' should work fine (because EU::MM would then find it).

    Another option (if you're using gcc compiler) would be to set the LIBRARY_PATH environment variable to /usr/local/lib. I'm not sure if that works with older versions of EU::MM, but I *think* it works with recent ones.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1076777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2024-04-23 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found