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

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
:'(
  • Comment on Re^4: MakeMaker failing to locate libs for shared objects

Replies are listed 'Best First'.
Re^5: MakeMaker failing to locate libs for shared objects
by Anonymous Monk on Aug 03, 2010 at 06:33 UTC
    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!