in reply to compile perl module without root and extra library

LIBS is supposed to be
-L/some/path/to/lib -lnameOfYourLib
where nameOfYourLib defines swe_pheno

Also, if nameOfYourLib is a dynamic library, you're supposed to set LD_LOAD_PATH to point to /some/path/to/lib

  • Comment on Re: compile perl module without root and extra library

Replies are listed 'Best First'.
Re^2: compile perl module without root and extra library
by gikotim (Initiate) on Jan 12, 2010 at 09:34 UTC
    ok, here what I did: perl Makefile.PL LIBS=-L/usr/home/rolf/local/lib -lswe INC=-I/usr/home/rolf/local/include INSTALL_BASE=/usr/home/rolf/local make test -> same error msg make sure that the lib is correct:
    file /usr/home/rolf/local/lib/libswe.so /usr/home/rolf/local/lib/libswe.so: ELF 32-bit LSB shared object, Inte +l 80386, version 1 (FreeBSD), dynamically linked, not stripped strings /usr/home/rolf/local/lib/libswe.so|grep swe_pheno swe_pheno swe_pheno_ut
    Any other idea, what I'm doing wrong? Many thanks for your help

      I think that should be LIBS="-L/usr/home/rolf/local/lib -lswe" (note the quotes). Also, the A.M. probably meant LD_LIBRARY_PATH. As an alternative to the latter, try passing the -rpath option to the linker (to compile in the run-time lib search path).

      As a quick fix, simply manually run (from the directory where SwissEph.o resides):

      $ cc -shared -L/usr/local/lib SwissEph.o -o blib/arch/auto/SwissEph/Sw +issEph.so -L/usr/home/rolf/local/lib -lswe -Wl,-rpath,/usr/home/rolf/ +local/lib

      (sorry I don't have the time to write a more complete reply... hope it still helps)

        Thanks this does the trick!