develooper Front page | perl.perl5.porters | Postings from March 2011

Re: [perl #86854] libs empty on Ubuntu 11.04 alpha (linux 2.6.38-7-generic#38-Ubuntu)

Thread Previous | Thread Next
Andy Dougherty
March 24, 2011 09:37
Re: [perl #86854] libs empty on Ubuntu 11.04 alpha (linux 2.6.38-7-generic#38-Ubuntu)
Message ID:
On Wed, 23 Mar 2011, Ilmari Vacklin wrote:

> # New Ticket Created by  Ilmari Vacklin 
> # Please include the string:  [perl #86854]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> Hi,
> I'm trying to compile perl-5.12.3 on Ubuntu 11.04 alpha 3, 32-bit
> variant. Configure fails to find any libs to link against, which
> causes make to fail because e.g. pow() isn't found (-lm is not used).

By default, Configure looks in the following directories for libraries:

    /usr/local/lib /lib /usr/lib /usr/lib64

It looks like Ubuntu has moved the math library (and presumably other 
libraries as well) out of /lib/ and /usr/lib into /lib/i386-linux-gnu. (I 
presume other names are used for other architectures, but I don't know 
what those other names actually are.) 

The quick workaround is to tell Configure about the new directory:

    sh Configure -Dplibpth=/lib/i386-linux-gnu -de

I don't know how Ubuntu is managing to compile perl for itself without 
such a workaround (or its equivalent).

Assuming this is a deliberate change in Ubuntu, the fix for 5.14 will be 
to detect this situation in the hints/ hint file and add the 
appropriate plibpth values automatically.  In order to do that, I could 
use some help:

Does anyone understand this new organization enough to suggest how to coax 
the necessary directory name (e.g. /lib/i386-linux-gnu) out of the build 
tools?  (For example, what should it be on an amd64 system?  How about 
PPC?  SPARC? Are there trailing 32s or 64s on any of those names?  etc.)

Clearly, however, the compiler on the system has been taught to look in 
the appropriate directories.  In the long term, perhaps Configure ought to 
consider looking for a library by trying to use it
	cc -o try try.c -lm
rather than trying to find the file libm.*.

    Andy Dougherty

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About