develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #60614] Error during compiling Perl

From:
James E Keenan via RT
Date:
July 8, 2013 00:31
Subject:
[perl #60614] Error during compiling Perl
Message ID:
rt-3.6.HEAD-2552-1373243452-1755.60614-15-0@perl.org
On Mon Nov 14 08:13:54 2011, doughera wrote:
> On Mon, 14 Nov 2011, H.Merijn Brand wrote:
> 
> > On Sat, 12 Nov 2011 07:25:42 -0800, "James E Keenan via RT"
> > <perlbug-followup@perl.org> wrote:
> >
> > > Boiling down the original poster's report of failure during
> confirmation:
> >
> > Missing -lm (math library)
> 
> More specifically, the original attempt to build failed here:
> 
> > In order to compile perl5 on your machine, a number of libraries
> > are usually needed.  Include any other special libraries here as
> well.
> > Say "none" for none.  The default list is almost always right.
> >
> > What libraries to use? [-lnsl -ldb -ldl -lm -lcrypt -lutil -lc]
> 
> [ . . . ]
> 
> > Checking your choice of C compiler and flags for coherency...
> > I've tried to compile and run the following simple program:
> >
> > #include <stdio.h>
> > int main() { printf("Ok\n"); return(0); }
> >
> > I used the command:
> >
> >             cc -o try -O2 -fno-strict-aliasing -pipe try.c -lnsl
> -ldb
> > -ldl -lm -lcrypt -lutil -lc
> >              ./try
> >
> > and I got the following output:
> >
> > /lib/libdb.so: undefined reference to `pthread_condattr_setpshared'
> > /lib/libdb.so: undefined reference to `pthread_mutexattr_destroy'
> > /lib/libdb.so: undefined reference to `pthread_mutexattr_setpshared'
> > /lib/libdb.so: undefined reference to `pthread_mutexattr_init'
> > /lib/libdb.so: undefined reference to `pthread_mutex_trylock'
> > collect2: ld returned 1 exit status
> > I can't compile the test program.
> > (The supplied flags or libraries might be incorrect.)
> >
> > You have a BIG problem.  Shall I abort Configure [y]
> > Ok.  Stopping Configure.
> 
> The subsequent failures resulted from eliminating *all* the libraries,
> which won't work.  See the section
> 
>     =item Missing functions and Undefined symbols
> 
> in the INSTALL file for some more details.
> 
> You need to solve this problem before proceeding further.  You need
> to find the correct set of libraries to include.  There are several
> possibilities, but only you can figure out which works in your
> specific
> set-up.  Here are a few things you might try:
> 
>     1.  You could include a threading library, perhaps something like
>     -lpthread, in your list of libraries.
> 
>     2.  You could try running Configure with -Dusethreads to enable
>     threading.  That might automatically add the right flags.
> 
>     3.  You could remove just -ldb from the list of libraries, since
> it
>     seems to be the one that is causing the linking error.
> 
> Please let us know how it goes.  If it still doesn't work, please
> follow the instructions for reporting problems in the section of the
> INSTALL file labeled
> 
>     =head1 Reporting Problems
> 

We've had no response from the OP since Merijn's and Andy D's posts in
2011.  In fact, we haven't heard from the OP since the original posting
in 2008.

At khw's suggestion, I'm taking this ticket for the purpose of closing
it within 7 days unless we get a response.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=60614



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About