Thanks for the detailed explanation.
;)
I did a fresh install of the OS, and re-installed Perl 5.8.1, but this time with the '-Duseshrplib' option. After installation, I confirmed that I had 'libperl.so' in '/usr/local/lib/perl5/5.8.1/i386-freebsd/CORE'.
wow, that was quick!
Then I re-installed SSL/mod_perl/Apache (without the patch), but got the same error:
--- gcc -funsigned-char -DMOD_SSL=208115 -DMOD_PERL -DUSE_PERL_SSI -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -DEAPI -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` -L/usr/lib -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/ssl/libssl.a modules/perl/libperl.a main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -lcrypt -lssl -lcrypto -Wl,-R/usr/local/lib/perl5/5.8.1/i386-freebsd/CORE -Wl,-E /usr/local/lib/perl5/5.8.1/i386-freebsd/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.1/i386-freebsd/CORE -lperl -lm -lcrypt -lutil -lc
modules/perl/libperl.a(mod_perl.o): In function `perl_restart_handler': mod_perl.o(.text+0x23b): undefined reference to `Perl_get_sv' modules/perl/libperl.a(mod_perl.o): In function `perl_restart': mod_perl.o(.text+0x2c7): undefined reference to `Perl_get_sv' mod_perl.o(.text+0x2fe): undefined reference to `Perl_eval_pv' mod_perl.o(.text+0x31a): undefined reference to `Perl_sv_setsv_flags' ---
I assumed that this:
-L/usr/local/lib/perl5/5.8.1/i386-freebsd/CORE -lperl
... would now be OK on my system.
does it work if you remove the -Wl,-E part? it picks it from perl -V:ldflags
Here the problem is as follows. The linker is trying to resolve all symbols in the .a libs. mod_perl's libperl.a references symbols in perl's libperl.so. If we tell linker to not try and resolve symbols now, when httpd starts it'll load libperl.so and all symbols will be resolved. This wasn't a problem with a static perl build, since it has provided all the symbols at once.
If the linker insists on resolving symbols, ideally what should be done is to link perl's libperl.so to mod_perl's libperl.a when the latter is created. In which case the problem won't exist.
Also I'm not sure if order is important. What happens if you move modules/perl/libperl.a after -lperl? Does it make any difference?
I have not tried the patch yet (after reading your explanation, it seemed better to re-build Perl as a shared library, which would give me the benefits of a shared library, and allow me to avoid a patch).
I'd appreciate if you test that patch, so that we can apply it for others to benefit from. You could build several versions of perl-5.8.1 using the -Dprefix=/path/to/ prefix.
Updated 'perl -V' output is at http://www.bigtrouble.com/perl_minus_V_shared_output.html
Thanks.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com