in reply to Perl modules not linking to libperl.so

... So, how do we go about fixing this issue to everyones satisfaction?
From what I can tell, you could modify lddlflags in Config.pm and append a path to libperl.

Probably the best way to do it would be by editing Makefile.SH (or whatever is ultimately responsible for setting lddlflags in Config for your platform), so that the core modules are also linked to libperl.so.

update: You could also set the env variable LDLOADLIBS.

On Win32, this is already done through ExtUtils::MakeMaker by setting PERL_ARCHIVE (PERL_ARCHIVE = $(PERL_INC)\perl58.lib), which you could also set by editing ExtUtils::MM_Unix (sub init_linker).

It might be a good idea for ExtUtils::MM_Unix to do this by default, so you might want to contact the perl5-porters and inquire about it.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Perl modules not linking to libperl.so

Replies are listed 'Best First'.
Re^2: Perl modules not linking to libperl.so
by buckrogers1965 (Initiate) on Oct 07, 2005 at 22:14 UTC
    I modified the line in config.sh

    lddlflags='-shared -L/user/local/lib'

    to look like this:

    lddlflags='-shared -L/user/local/lib -L/user/local/lib/perl5/5.9.2/i686-linux-thread-multi/CORE -Wl,-rpath,/usr/local/lib/perl5/5.9.2/i686-linux-thread-multi/CORE/ -lperl'

    And this does work. Except that I have to do the `make;make install` of Perl first, then modify the line and do `make;make install` a second time to get everything properly installed.

    But then once I do that I can build the DBI module and it just works under our framework.

    So I think I am very close to a possible small fix to get this working correctly. :D

    If anyone has any hints about what I am doing wrong with the lddflags that I have to do the install twice with different settings, please share your thoughts.

    I am going to keep looking into this and check out the update about LDLOADLIBS early next week.

    Thanks so much!