in reply to Re^2: MakeMaker failing to locate libs for shared objects
in thread MakeMaker failing to locate libs for shared objects

Unfortunately that didn't help.

How? If -lssl -lcrypto were being removed from the LIBS argument, adding :nosearch would ensure that they aren't removed. I just tested this

Crypt-OpenSSL-Random-0.04$ perl Makefile.PL Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lssl Note (probably harmless): No library found for -lcrypto Note (probably harmless): No library found for -lmoldname Note (probably harmless): No library found for -lkernel32 Note (probably harmless): No library found for -luser32 Note (probably harmless): No library found for -lgdi32 Note (probably harmless): No library found for -lwinspool Note (probably harmless): No library found for -lcomdlg32 Note (probably harmless): No library found for -ladvapi32 Note (probably harmless): No library found for -lshell32 Note (probably harmless): No library found for -lole32 Note (probably harmless): No library found for -loleaut32 Note (probably harmless): No library found for -lnetapi32 Note (probably harmless): No library found for -luuid Note (probably harmless): No library found for -lws2_32 Note (probably harmless): No library found for -lmpr Note (probably harmless): No library found for -lwinmm Note (probably harmless): No library found for -lversion Note (probably harmless): No library found for -lodbc32 Note (probably harmless): No library found for -lodbccp32 Writing Makefile for Crypt::OpenSSL::Random Crypt-OpenSSL-Random-0.04$ grep lcrypto Makefile # LIBS => [q[-lssl -lcrypto]] Crypt-OpenSSL-Random-0.04$ perl Makefile.PL LIBS=":nosearch -lssl -lcr +ypto" Writing Makefile for Crypt::OpenSSL::Random $ grep lcrypto Makefile # MakeMaker ARGV: (q[LIBS=:nosearch -lssl -lcrypto]) # LIBS => [q[-lssl -lcrypto]] EXTRALIBS = -lssl -lcrypto -lmoldname -lkernel32 -luser32 -lgdi32 -lwi +nspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -lo leaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -l +odbccp32 LDLOADLIBS = -lssl -lcrypto -lmoldname -lkernel32 -luser32 -lgdi32 -lw +inspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -l oleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 - +lodbccp32 cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL "LIBS=:nosearch - +lssl -lcrypto" $(PERLRUN) Makefile.PL "LIBS=:nosearch -lssl -lcrypto" LIBS=':nosearch -lssl -lcrypto' Crypt-OpenSSL-Random-0.04$

Replies are listed 'Best First'.
Re^4: MakeMaker failing to locate libs for shared objects
by houst0n (Novice) on Aug 02, 2010 at 18:06 UTC
    Weird one huh?

    This isn't a case of my misusing MakeMaker, I can only assume something is apparently borked with my perl build.

    Even with :nosearch in my LIBS var, linking is still missing some options:

    /opt/csw/gcc4/bin/gcc -c -D_REENTRANT -fno-strict-aliasing -pipe -I/opt/bw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -march=pentium4 -msse -msse2 -mtune=opteron -I/opt/bw/include -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/opt/bw/lib/perl/5.12.1/distro/i386/CORE" Random.c

    Running Mkbootstrap for Crypt::OpenSSL::Random ()
    chmod 644 Random.bs
    rm -f blib/arch/auto/Crypt/OpenSSL/Random/Random.so


    gcc -G -L/opt/bw/lib/i386 -L/opt/bw/lib Random.o -o blib/arch/auto/Crypt/OpenSSL/Random/Random.so \
    \

    ^^^ Here

    When you run the testsuite, we get the relocation error:

    PERL_DL_NONLAZY=1 /opt/bw/bin/i386/perl "-Iblib/lib" "-Iblib/arch" test.pl
    1..5 Can't load 'blib/arch/auto/Crypt/OpenSSL/Random/Random.so' for module Crypt::OpenSSL::Random:

    ld.so.1: perl: fatal: relocation error:
    file blib/arch/auto/Crypt/OpenSSL/Random/Random.so: symbol RAND_bytes: referenced symbol not found at /opt/bw/lib/perl/5.12.1/distro/i386/DynaLoader.pm line 200. at test.pl line 11
    :'(
      Weird one huh?

      See how I showed how I modified libs? And then I use grep to show the change being made? How about you show how you did that?

        Okay,

        If I do this in the same way as you:

        houston@thebe:Crypt-OpenSSL-Random-0.04 > perl Makefile.PL LIBS=":nosearch -lssl -lcrypto"

        Unrecognized argument in LIBS ignored: ':nosearch'
        Note (probably harmless): No library found for -lssl
        Note (probably harmless): No library found for -lcrypto
        Writing Makefile for Crypt::OpenSSL::Random

        houston@thebe:Crypt-OpenSSL-Random-0.04 > grep lssl Makefile
        # MakeMaker ARGV: (qLIBS=:nosearch -lssl -lcrypto)
        # LIBS => [q-lssl -lcrypto]
        cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL "LIBS=:nosearch -lssl -lcrypto"
        $(PERLRUN) Makefile.PL "LIBS=:nosearch -lssl -lcrypto"
        LIBS=':nosearch -lssl -lcrypto'

        houston@thebe:Crypt-OpenSSL-Random-0.04 > gmake

        ...
        gcc -G -R/opt/bw/lib/i386 -L/opt/bw/lib/i386 -L/opt/bw/lib Random.o -o blib/arch/auto/Crypt/OpenSSL/Random/Random.so
        \
        \

        ...

        And during install:

        PERL_DL_NONLAZY=1 /opt/bw/bin/i386/perl "-Iblib/lib" "-Iblib/arch" test.pl
        1..5
        Can't load 'blib/arch/auto/Crypt/OpenSSL/Random/Random.so' for module Crypt::OpenSSL::Random: ld.so.1: perl: fatal: relocation error: file blib/arch/auto/Crypt/OpenSSL/Random/Random.so: symbol RAND_bytes: referenced symbol not found at /opt/bw/lib/perl/5.12.1/distro/i386/DynaLoader.pm line 200.

        This had worked previously with the exact same 'build recipe' however we have changed the prefix.

        Is there any binary that the build process of perl itself depends on during 'make install' that I might have missed?

        Thanks for the help so far mate!