Re: Can't load mod_perl in Solaris 8
Hi, I have just come across this thread and have the exact same problem (http://aspn.activestate.com/ASPN/Mail/Message/modperl/677372) I am trying to build perl 5.6.0, DBD-Oracle-1.12 with DSO Apache 1.3.20 and mod_perl-1.26 on Solaris 7 (uname -r = 5.7?) Everything builds fine, however when starting apache the following error message is printed: Syntax error on line 225 of /opt/www/apache/conf/httpd.conf: Cannot load /opt/www/apache/libexec/libperl.so into server: ld.so.1: /opt/www/apache/bin/httpd: fatal: relocation error: file /opt/www/apache/libexec/libperl.so: symbol PL_markstack_ptr: referenced symbol not found /opt/www/apache/bin/apachectl start: httpd could not be started Perl is not built to be binary compatible to 5005 (-Ubincompat5005) and I have tried using both Perl's & Solaris's malloc. Building as DSO should be possible I have this combination working fine on HPUX. Isn't this PL_markstack_ptr problem likely to be a missing linker flag or something from the Perl build telling it to export the symbols into libperl.so (or something..)? I'd appreciate any ideas/help on this Many thanks Roger Foskett -- ## perl configuration Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos divine 5.7 generic_106541-12 sun4u sparc sunw,ultra-4 ' config_args='-des' hint=previous, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O', gccversion= cppflags='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib -L/opt/SUNWspro/SC5.0/lib' libpth=/usr/local/lib /opt/SUNWspro/SC5.0/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec -lpthread libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /opt/www/perl5/lib/5.6.0/sun4-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/opt/SUNWspro/SC5.0/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Oct 1 2001 13:14:30 @INC: /opt/www/perl5/lib/5.6.0/sun4-solaris /opt/www/perl5/lib/5.6.0 /opt/www/perl5/lib/site_perl/5.6.0/sun4-solaris /opt/www/perl5/lib/site_perl/5.6.0 /opt/www/perl5/lib/site_perl . -- ## mod_perl configuration perl Makefile.PL \ NO_HTTPD=1 \ USE_APXS=1 \ WITH_APXS=/opt/www/apache/bin/apxs \ EVERYTHING=1 -- ## apache configuration LDFLAGS="-lm -lpthread" \ CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \ ./configure \ --prefix=/opt/www/apache \ --enable-shared=max \ --disable-rule=EXPAT \ --enable-module=info \ --enable-rule=SHARED_CORE # also tried with env var LDFLAGS_SHLIB_EXPORT="" _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Can't load mod_perl in Solaris 8
On Fri, 13 Jul 2001, Jie Gao wrote: > On Thu, 12 Jul 2001, Doug MacEachern wrote: > > > pitty perl -V does not report usebincompat5005, if you are trying to build > > modperl as a dso, Makefile.PL should have warned you: > > > > Your current configuration will most likely trigger core dumps, > > suggestions: > >*) Do not configure mod_perl as a DSO > >*) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005) > >*) Configure Perl with -Uusemymalloc (not recommended for performance) > > This is different from what I have been hearing for the past few years: > > Solaris' malloc is better than perl's. fyi.. Message-ID: <[EMAIL PROTECTED]> Date: Wed, 18 Jul 2001 11:40:07 +0100 From: Alan Burlison <[EMAIL PROTECTED]> To: Doug MacEachern <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], Alan Burlison <[EMAIL PROTECTED]> Subject: Re: solaris malloc Doug MacEachern wrote: > seeing mixed reviews with regards to performance, README.solaris says: > =head2 Malloc Issues with Perl on Solaris. > > Starting from Perl 5.7.1 Perl uses the Solaris malloc, since the perl > malloc breaks when dealing with more than 2GB of memory, and the Solaris > malloc also seems to be faster. > > but this message from alan says: > http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg00465.html > "A bit more can be squeezed out if you use the perl malloc" > > putting aside the 2GB limit issue, curious if there are any numbers out > there on solaris malloc vs. perl malloc? An interesting question. The answer as to which is faster is 'it depends'. The answer will depend on: o Which Solaris version are you using (malloc has been changed more or less with every release) o Is perl built MT or not and if so how many CPUs is it using. o What is the allocation profile. And I'm sure I could think of a few other variables as well. Perl *should* be better with its own malloc, as it has been written with knowledge of the likely allocation behaviour of perl. As an aside, a paper was presented at this year's Usenix describing the implementation of the Solaris kernel slab allocator, which is an arena-based object-caching allocator. It stores partially constructed objects, so that a malloc/free/malloc of the same object doesn't have to totally de/reinitialise the object every time. A userland port of this allocator is also described, along with some performance comparisons of other malloc implementations. The abstract is at http://www.usenix.org/event/usenix01/bonwick.html, but you need Usenix membership to download the paper. If anyone is interested, I'll try and get permission to send them a copy. The existing arena allocation in perl5 is quite similar in intent to the slab allocator, so the paper might be useful background reading for the perl6 allocator. Alan Burlison
Re: Can't load mod_perl in Solaris 8
On Fri, 13 Jul 2001, Jie Gao wrote: > This is different from what I have been hearing for the past few years: > > Solaris' malloc is better than perl's. you're right, i just found this in the 5.6.1 announcement: :On some systems (IRIX and Solaris among them) the system malloc is :demonstrably better. While the defaults haven't been changed in order to :retain binary compatibility with earlier releases, you may be better off :building perl with "Configure -Uusemymalloc ..." as discussed in the :INSTALL file. that's good news, to bad it isn't the default, sure would save alot of trouble. i will change the Makefile.PL verbage.
Re: Can't load mod_perl in Solaris 8
On Thu, 12 Jul 2001, Doug MacEachern wrote: > pitty perl -V does not report usebincompat5005, if you are trying to build > modperl as a dso, Makefile.PL should have warned you: > > Your current configuration will most likely trigger core dumps, > suggestions: >*) Do not configure mod_perl as a DSO >*) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005) >*) Configure Perl with -Uusemymalloc (not recommended for performance) This is different from what I have been hearing for the past few years: Solaris' malloc is better than perl's. ?? Jie
Re: Can't load mod_perl in Solaris 8
pitty perl -V does not report usebincompat5005, if you are trying to build modperl as a dso, Makefile.PL should have warned you: Your current configuration will most likely trigger core dumps, suggestions: *) Do not configure mod_perl as a DSO *) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005) *) Configure Perl with -Uusemymalloc (not recommended for performance)
Re: Can't load mod_perl in Solaris 8
On Thu, 12 Jul 2001, Ged Haywood wrote: > Hi again, > > On Thu, 12 Jul 2001, Javier Chicharro wrote: > > > Yes, I compiled my Perl using Solaris cc. > > Is there any reason you don't want to compile static? is there any reason he should? the only issue using dso with solaris (and any other Perls that default to using Perl's malloc) is that perl needs to be built with 'Configure -des -Ubincompat5005'
Re: Can't load mod_perl in Solaris 8
On Thu, 12 Jul 2001, Javier Chicharro wrote: > perl Makefile.PL APACHE_SRC=../apache_1.3.20/src DO_HTTPD=1 USE_APACI=1 your original post had an error trying to load /opt/apache/libexec/libperl.so, but these options are for a static build. do you have an old modperl dso configured?
Re: Can't load mod_perl in Solaris 8
On Thu, 12 Jul 2001, Javier Chicharro wrote: > > I've compiled mod_perl-1.26 (and I tried with 1.25 too) for Apache > 1.3.20 in a Solaris 8. When I start apache I get this error : you forgot to post your perl -V and Makefile.PL options
Re: Can't load mod_perl in Solaris 8
Hi again, On Thu, 12 Jul 2001, Javier Chicharro wrote: > Yes, I compiled my Perl using Solaris cc. Is there any reason you don't want to compile static? 73, Ged.
Re: Can't load mod_perl in Solaris 8
Ged Haywood wrote: > > Hi there, > > On Thu, 12 Jul 2001, Javier Chicharro wrote: > > > I've compiled mod_perl-1.26 (and I tried with 1.25 too) for Apache > > 1.3.20 in a Solaris 8. When I start apache I get this error : > > > > Syntax error on line 222 of /opt/apache/conf/httpd.conf: > > Cannot load /opt/apache/libexec/libperl.so into server: ld.so.1: > > /opt/apache/bin/httpd: fatal: relocation error: file > > /opt/apache/libexec/libperl.so: > > symbol PL_markstack_ptr: referenced symbol not found > > /etc/init.d/apache start: httpd could not be started > > Have a look in mod_perl-1.26/SUPPORT and post the information it suggests. > > Did you compile your Perl? What compiler are you using? > > 73, > Ged. Yes, I compiled my Perl using Solaris cc. This is the output of perl -V : Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=i86pc-solaris uname='sunos srvnoc2 5.8 generic_108529-08 i86pc i386 i86pc ' config_args='-Dprefix=/opt/perl-5.6.1 -Duseshrplib -Doptimize=-O -des -Dlocincpth=/usr/local/BerkeleyDB.3.2/include -Dloclibpth=/usr/local/BerkeleyDB.3.2/lib -Dccdlflags=-R/usr/local/BerkeleyDB.3.2/lib' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-I/usr/local/BerkeleyDB.3.2/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-I/usr/local/BerkeleyDB.3.2/include' ccversion='Sun WorkShop 6 update 1 C 5.2 Patch 109514-03 2001/03/12', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=y, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/BerkeleyDB.3.2/lib -L/opt/SUNWspro/WS6U1/lib ' libpth=/usr/local/BerkeleyDB.3.2/lib /opt/SUNWspro/WS6U1/lib /usr/lib /usr/ccs/lib /usr/local/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R/usr/local/BerkeleyDB.3.2/lib -R /opt/perl-5.6.1/lib/5.6.1/i86pc-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G -L/usr/local/BerkeleyDB.3.2/lib -L/opt/SUNWspro/WS6U1/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Jul 11 2001 16:39:06 @INC: /opt/perl-5.6.1/lib/5.6.1/i86pc-solaris /opt/perl-5.6.1/lib/5.6.1 /opt/perl-5.6.1/lib/site_perl/5.6.1/i86pc-solaris /opt/perl-5.6.1/lib/site_perl/5.6.1 /opt/perl-5.6.1/lib/site_perl . And the configure options of mod_perl (v1.26) are : perl Makefile.PL APACHE_SRC=../apache_1.3.20/src DO_HTTPD=1 USE_APACI=1 The configure of apache is : ./configure --prefix=/opt/apache --enable-rule=SHARED_CORE --enable-shared=max -- SERTRAM NETWORKS, S.L. Edificio Sertram, Acer 30-32 Tlf: 93 289 63 00 08038 - BARCELONA Fax: 93 223 12 66 mailto:[EMAIL PROTECTED] http://www.datagrama.net
Re: Can't load mod_perl in Solaris 8
Hi there, On Thu, 12 Jul 2001, Javier Chicharro wrote: > I've compiled mod_perl-1.26 (and I tried with 1.25 too) for Apache > 1.3.20 in a Solaris 8. When I start apache I get this error : > > Syntax error on line 222 of /opt/apache/conf/httpd.conf: > Cannot load /opt/apache/libexec/libperl.so into server: ld.so.1: > /opt/apache/bin/httpd: fatal: relocation error: file > /opt/apache/libexec/libperl.so: > symbol PL_markstack_ptr: referenced symbol not found > /etc/init.d/apache start: httpd could not be started Have a look in mod_perl-1.26/SUPPORT and post the information it suggests. Did you compile your Perl? What compiler are you using? 73, Ged.
Can't load mod_perl in Solaris 8
I've compiled mod_perl-1.26 (and I tried with 1.25 too) for Apache 1.3.20 in a Solaris 8. When I start apache I get this error : Syntax error on line 222 of /opt/apache/conf/httpd.conf: Cannot load /opt/apache/libexec/libperl.so into server: ld.so.1: /opt/apache/bin/httpd: fatal: relocation error: file /opt/apache/libexec/libperl.so: symbol PL_markstack_ptr: referenced symbol not found /etc/init.d/apache start: httpd could not be started (The line 222 is the LoadModule for mod_perl) When I do ldd of libperl.so and httpd, seems that it finds all dependences. Has somebody any idea about this problem? -- SERTRAM NETWORKS, S.L. Edificio Sertram, Acer 30-32 Tlf: 93 289 63 00 08038 - BARCELONA Fax: 93 223 12 66 mailto:[EMAIL PROTECTED] http://www.datagrama.net