You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John Marquart <jo...@indiana.edu> on 2000/07/07 02:08:03 UTC
AIX, dlopen problem?
Hallo all,
I am having the most frustrating time getting a home brew module to work.
Environment:
AIX 4.3.3
xlc
apache 1.3.12
mod_perl 1.22
perl 5.00503 (compiled w/ INSTALL patch, details below)
I have had various difficulties trying to get mod_perl to compile
successfully using perl 5.6.0, also w/ mod_perl 1.24. However, with the
above configuration I have had no compilation problems. When I try to
include a module in httpd.conf w/ a "PerlModule
Apache::IU::AuthenKerberos" statement & then run apachectl start I get the
following error message:
bash-2.01# ./apachectl start
Syntax error on line 191 of /usr/local/apache_perl.4/conf/httpd.conf:
Can't load
'/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so'
for module Apache::IU::AuthenKerberos: dlopen:
/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so:
30
/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so36
ap_add_module 20 httpd36 ap_null_cleanup 21 httpd36 ap_palloc 22 httpd36
ap_register_cleanup 23 httpd at
/usr/local/lib/perl5/5.00503/aix/DynaLoader.pm line 169.
at (eval 3) line 3
./apachectl start: httpd could not be started
I suspect that this has something to to w/ dynamically loaded libs due to
the dlopen() portion of the message - however I have no idea where to look
next to resolve the problem.
a more detailed look at my environment:
compile mod_perl + apache as follows:
perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
APACHE_PREFIX=/usr/local/apache_perl
make
make test
make install
Perl (w/ the patched dl_aix.xs file):
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix hautbois 3 4 0073556b4c00 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192
-I/us
r/local/include'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192
-I/us
r/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
libc=, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp
-bE:$(B
ASEEXT).exp -b noentry -lc -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under aix
Compiled at Jul 4 2000 18:34:39
@INC:
/usr/local/lib/perl5/5.00503/aix
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/aix
/usr/local/lib/perl5/site_perl/5.005
.
Many thanks,
-jamie
John "Jamie" Marquart | This message posted 100% MS free.
Digital Library SysAdmin | Work: 812-856-5174 Pager: 812-334-6018
Indiana University Libraries | ICQ: 1131494 D'net Team: 6265
Re: AIX, dlopen problem?
Posted by Jens-Uwe Mager <ju...@helios.de>.
On Mon, Jul 10, 2000 at 06:21:37PM -0500, John Marquart wrote:
> Starting off w/ a fresh compliation of apache 1.3.12 & mod_perl 1.24, I
> ended up with the same errors as before. I then added the flags that you
> suggested to link my module. The httpd.exp file it expects for some
> reason is /httpd.exp. I copied the httpd.exp from src/support to /. At
> this point, the module compiled/linked correctly. I added the PerlModule
> line to the httpd.conf to include it, and achieved the same broken
> httpd. (See attached or below for details.)
>
> Attached is a (long) listing of both the compilation & linking as well as
> the 'dump -nv AuthenKerberos.so' that you suggested would be helpful. I
> tried to read the dump - however I just don't quite understand it.
>
> A few other notes: The module demands some mod_perl functions ->
> perl_cmd_perl_FLAG, perl_cmd_perl_TAKE1... (in attached file) which I was
> previously told were not usually exported by mod_perl, but I could put the
> symbol names in my mod_perl.exp file to help with linking. I added those
> symbol names before compiling mod_perl.
As the complaints of the linker show the Kerberos module still
references symbols not exported by default by mod_perl, for example it
still talks about perl_cmd_perl_TAKE2, did you add this and also
installed it so the Kerberos compilation picks up the new .exp file?
> (I also had some odd problems at the "perl Makefile.PL" stage -> If I
> left the arguments in a certain order it would work, another order would
> cause segfaults :( -> the make test worked fine when run by hand. Since
> the problem I am having was the exact same under this new configuration
> and the other - I am assuming this is something random and
> circumstantial.)
I use the following for configuring mod_perl:
perl Makefile.PL USE_APXS=1 EVERYTHING=1 WITH_APXS=/usr/local/apache/bin/apxs
--
Jens-Uwe Mager
HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany
Phone: +49 5131 709320
FAX: +49 5131 709325
Internet: jum@helios.de
Re: AIX, dlopen problem?
Posted by John Marquart <jo...@indiana.edu>.
Jens-Uwe, Listees:
Sorry that it has taken me about a week to get back to you. It has been
busy, and this problem had backgrounded itself.
Starting off w/ a fresh compliation of apache 1.3.12 & mod_perl 1.24, I
ended up with the same errors as before. I then added the flags that you
suggested to link my module. The httpd.exp file it expects for some
reason is /httpd.exp. I copied the httpd.exp from src/support to /. At
this point, the module compiled/linked correctly. I added the PerlModule
line to the httpd.conf to include it, and achieved the same broken
httpd. (See attached or below for details.)
Attached is a (long) listing of both the compilation & linking as well as
the 'dump -nv AuthenKerberos.so' that you suggested would be helpful. I
tried to read the dump - however I just don't quite understand it.
A few other notes: The module demands some mod_perl functions ->
perl_cmd_perl_FLAG, perl_cmd_perl_TAKE1... (in attached file) which I was
previously told were not usually exported by mod_perl, but I could put the
symbol names in my mod_perl.exp file to help with linking. I added those
symbol names before compiling mod_perl.
(I also had some odd problems at the "perl Makefile.PL" stage -> If I
left the arguments in a certain order it would work, another order would
cause segfaults :( -> the make test worked fine when run by hand. Since
the problem I am having was the exact same under this new configuration
and the other - I am assuming this is something random and
circumstantial.)
thanks,
jamie
On Fri, 7 Jul 2000, Jens-Uwe Mager wrote:
> On Thu, Jul 06, 2000 at 07:08:03PM -0500, John Marquart wrote:
>
> > Environment:
> > AIX 4.3.3
> > xlc
> > apache 1.3.12
> > mod_perl 1.22
> > perl 5.00503 (compiled w/ INSTALL patch, details below)
> >
> > I have had various difficulties trying to get mod_perl to compile
> > successfully using perl 5.6.0, also w/ mod_perl 1.24. However, with the
> > above configuration I have had no compilation problems. When I try to
> > include a module in httpd.conf w/ a "PerlModule
> > Apache::IU::AuthenKerberos" statement & then run apachectl start I get the
> > following error message:
> >
> > bash-2.01# ./apachectl start
> > Syntax error on line 191 of /usr/local/apache_perl.4/conf/httpd.conf:
> > Can't load
> > '/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so'
> > for module Apache::IU::AuthenKerberos: dlopen:
> > /usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so:
> > 30
> > /usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so36
> > ap_add_module 20 httpd36 ap_null_cleanup 21 httpd36 ap_palloc 22 httpd36
> > ap_register_cleanup 23 httpd at
> > /usr/local/lib/perl5/5.00503/aix/DynaLoader.pm line 169.
>
> This suspicially looks like you have some imports in the AuthenKerberos
> wrong. Modules that are plug-ins to Perl but at the same time need to
> reference Apache symbols need some more ld flags to compile. The
> Apache::src modules knows which:
>
> $ perl -MApache::src -le 'print Apache::src->new->otherldflags;'
> -bI:/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/mod_perl.exp -bI:/usr/local/apache/libexec/httpd.exp
>
> Add these to the link line of the AuthenKerberos module. If that still
> does not work, I would need to examine the exact link command line and
> the output of "dump -nv AuthenKerberos.so".
>
> --
> Jens-Uwe Mager
>
> HELIOS Software GmbH
> Steinriede 3
> 30827 Garbsen
> Germany
>
> Phone: +49 5131 709320
> FAX: +49 5131 709325
> Internet: jum@helios.de
>
John "Jamie" Marquart | This message posted 100% MS free.
Digital Library SysAdmin | Work: 812-856-5174 Pager: 812-334-6018
Indiana University Libraries | ICQ: 1131494 D'net Team: 6265
Re: AIX, dlopen problem?
Posted by Jens-Uwe Mager <ju...@helios.de>.
On Thu, Jul 06, 2000 at 07:08:03PM -0500, John Marquart wrote:
> Environment:
> AIX 4.3.3
> xlc
> apache 1.3.12
> mod_perl 1.22
> perl 5.00503 (compiled w/ INSTALL patch, details below)
>
> I have had various difficulties trying to get mod_perl to compile
> successfully using perl 5.6.0, also w/ mod_perl 1.24. However, with the
> above configuration I have had no compilation problems. When I try to
> include a module in httpd.conf w/ a "PerlModule
> Apache::IU::AuthenKerberos" statement & then run apachectl start I get the
> following error message:
>
> bash-2.01# ./apachectl start
> Syntax error on line 191 of /usr/local/apache_perl.4/conf/httpd.conf:
> Can't load
> '/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so'
> for module Apache::IU::AuthenKerberos: dlopen:
> /usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so:
> 30
> /usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/IU/AuthenKerberos/AuthenKerberos.so36
> ap_add_module 20 httpd36 ap_null_cleanup 21 httpd36 ap_palloc 22 httpd36
> ap_register_cleanup 23 httpd at
> /usr/local/lib/perl5/5.00503/aix/DynaLoader.pm line 169.
This suspicially looks like you have some imports in the AuthenKerberos
wrong. Modules that are plug-ins to Perl but at the same time need to
reference Apache symbols need some more ld flags to compile. The
Apache::src modules knows which:
$ perl -MApache::src -le 'print Apache::src->new->otherldflags;'
-bI:/usr/local/lib/perl5/site_perl/5.005/aix/auto/Apache/mod_perl.exp -bI:/usr/local/apache/libexec/httpd.exp
Add these to the link line of the AuthenKerberos module. If that still
does not work, I would need to examine the exact link command line and
the output of "dump -nv AuthenKerberos.so".
--
Jens-Uwe Mager
HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany
Phone: +49 5131 709320
FAX: +49 5131 709325
Internet: jum@helios.de