develooper Front page | perl.perl5.porters | Postings from February 2000

perl5.5.650 configure problems

Thread Next
Tom Christiansen
February 8, 2000 04:23
perl5.5.650 configure problems
Message ID:
Here's what's going on.  Consider, please, this code:

     1	if $test -f "$xxx"; then
     2	    case "$libstyle" in
     3	    shared) echo "Found -l$libname (shared)." ;;
     4	    static) echo "Found -l$libname." ;;
     5	    *)      echo "Found -l$libname ($libstyle)." ;;
     6	    esac
     7	    case " $dflt " in
     8	    *"-l$thislib "*);;
     9	    *) dflt="$dflt -l$libname"
    10		       libsfound="$libsfound $xxx"
    11		       yyy=`basename $xxx`
    12		       libsfiles="$libsfiles $yyy"
    13		       yyy=`echo $xxx|sed "s@/$yyy\\$@@"`
    14		       case " $libsdirs " in
    15		       *" $yyy "*) ;;
    16		       *) libsdirs="$libsdirs $yyy" ;;
    17		       esac
    18	       ;;
    19	    esac
    20	else
    21	    echo "No -l$thislib."
    22	fi

Line 3 is executed, and we see 

    Found -lm (shared).

Then the case in line 7 is run, and the case matched here is line
8, *not* line 9.  But only if the line 9 situation matches do we
have a way for $libsfound to be set.

This leads inevitably to this code (note my additional DEBUG)

    case "$libsfound" in
    *libm*) ;;
    *) cat <<EOM >&4   

    I could not find -lm, the mathematics library.
    This means that something went awfully wrong.
    DEBUG Check libsfound=$libsfound dflt=$dflt

Which prints out

    I could not find -lm, the mathematics library.
    This means that something went awfully wrong.
    DEBUG Check libsfound= dflt=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt

So, we're only looking for "libm" in $libsfound, but this variable
is never set.  I looked at the code in _63, and it's quite different
in this area.  Did this really just change massively?

System details follow.


redhat% cat /etc/redhat-release 
Red Hat Linux release 6.0 (Hedwig)

redhat% ls -l /usr/lib/
   0 lrwxrwxrwx   1 root     root           19 Sep 21 17:13 /usr/lib/ -> ../../lib/*

redhat% ls -lL /usr/lib/
-rwxr-xr-x   1 root     root       539008 Jun 24  1999 /usr/lib/*

redhat% perl -V
Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration:
    osname=linux, osvers=2.2.7-1.23, archname=i686-linux
    uname='linux doriath 2.2.7-1.23 #1 thu jul 8 15:28:56 pdt 1999 i686 unknown '
    config_args='-ds -e -Dprefix=/opt/perl/5.005_63'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -fno-strict-aliasing -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl): 
  Compile-time options:
  Built under linux
  Compiled at Dec 28 1999 06:45:45

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