perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Grimm <edgr...@dsblade00.wat.us.ray.com>
Subject Re: Problems with Embperl and AIX 5.2
Date Sun, 11 Jul 2004 14:08:14 GMT
/appl/web/compile/HTML-Embperl-1.3.6/blib/arch/auto/HTML/Embperl/Embperl.so

is being built with a format that perl does not understand and so cannot
dynamically load.  Either the Embperl compile configuration is wrong,
perl is compiled with the wrong dynamic loader, or there's a problem in
the system's compiler setup.

What you have is not a C problem, but rather an object file format
problem.  Some C programmers would be more familiar with it than you
are, and many would at least understand the situation a bit better
(although not necessarily what to do about it), but I do know quite a
few that would be as clueless as you were upon seeing it the first time.

Systems administrators, on the other hand, should be more likely to able
to recognize that situation and deal with it.  However, it is still an
unusual problem[1], so finding someone even within that skillset could
be a challenge.  Probably your best bet would be an AIX-specific perl
list, or, failing that, a general perl list.

Note that the only AIX I've used was 4.1.2, and I only went so far as to
work with some ksh scripts there, so I cannot help you more than this.
I wish I could be more helpful, but that's all I'm able to offer.

Ed

[1] Normally, all of the compilation tools on a system are consistent in
their file formats, such that the error described below only happens on
attempts to use a binary compiled on a different OS or OS version.  For
example, one could get that same error when trying to use an Embperl.so
compiled for Linux on a Solaris system.  It is possible to get it on a
correctly configured system by specifying an incorrect target system,
but most of the time one doesn't specify a target system at all.

On Thu, 8 Jul 2004, John P. Gibbons wrote:

> Recently we've been upgrading our servers from AIX 4.3.3 to AIX 5.2 and
> one of the casualties has been Embperl. I've been wrestling with trying
> to make this work for some time now, and not being a C programmer I
> think I might have hit a wall.
>
> Here's what I'm using:
>
> AIX 5.2
> IBM HTTPServer 1.3.28
> mod_perl 1.29
> Embperl 1.3.6 (and I've tried 2.0 with the same result, although I had
> to fix some syntax issues with // comments)
> IBM's Visual Age compiler 6.0
>
> First things first, I have only been able to make mod_perl work when
> using Perl 5.8.4. Any other version, including 5.8.1 will cause a
> segfault in Apache. This happens both with IBM HTTPServer (which is what
> we want to use) and a compiled Apache. We're using APXS to configure
> mod_perl because we don't want to have to roll our own Apache (so we can
> get support from IBM) so even if a statically compiled version did work,
> we couldn't use.
>
> Anyhow, once Apache and mod_perl are happy I am now stuck with Embperl
> not working. It compiles flawlessly with no errors but running a make
> test returns:
>
>  make test
>         PERL_DL_NONLAZY=0 /appl/web/perl/bin/perl "-Iblib/lib"
> "-Iblib/arch" test.pl
>
> loading...                    Can't load
> '/appl/web/compile/HTML-Embperl-1.3.6/blib/arch/auto/HTML/Embperl/Embperl.so'
> for module HTML::Embperl: Cannot run a file that does not have a valid
> format. at /appl/web/perl/lib/5.8.4/aix/DynaLoader.pm line 230.
>  at test.pl line 1525
> Compilation failed in require at test.pl line 1525.
> BEGIN failed--compilation aborted at test.pl line 1525.
>
> Test terminated with fatal error
> Use of uninitialized value in string ne at test.pl line 966.
> make: 1254-004 The error code from the last command is 1.
>
>
> Stop.
>
> ------------
>
> I've tried this with 2.0 as well and it has the same problem.
>
> I think it might have something to do with missing libraries as ldd on
> Embperl.so returns:
>
>
> ./blib/arch/auto/HTML/Embperl/Embperl.so needs:
>          /usr/lib/libc.a(shr.o)
> Cannot findCannot find   /unix
>          /usr/lib/libcrypt.a(shr.o)
>
>
> I think it's saying that it can't find two libraries, but it isn't
> telling me which ones these are.Curiously, ldd on libperl.so has these
> errors as well.
>
> libperl-584works-mp129.so needs:
>          /usr/lib/libc.a(shr.o)
>          /usr/lib/libbsd.a(shr.o)
>          /usr/lib/librtl.a(shr.o)
> Cannot findCannot find   /unix
>          /usr/lib/libcrypt.a(shr.o)
>
>
> Again, I'm not a C programmer so I might be way off here, but after
> reading through the mailing list archives ldd output is often requested
> when diagnosing problems so I'm including it. Here are the ldd outputs
> for httpd and the perl binary, in case they are of any use.
>
> httpd:
> ../bin/httpd needs:
>          /usr/lib/libc_r.a(shr.o)
>          /usr/lib/libC.a(shr.o)
>          /usr/lib/libpthread.a(shr_comm.o)
>          /usr/lib/libpthread.a(shr_xpg5.o)
>          /usr/lib/libdl.a(shr.o)
>          /unix
>          /usr/lib/libcrypt.a(shr.o)
>          /usr/lib/libC.a(ansicore_32.o)
>          /usr/lib/libC.a(shrcore.o)
>          /usr/lib/libc.a(shr.o)
>          /usr/lib/libpthreads.a(shr_comm.o)
>          /usr/lib/libC.a(shr2.o)
>          /usr/lib/libC.a(shr3.o)
>
> perl:
> /appl/web/perl/bin/perl needs:
>          /usr/lib/libbind.a(shr.o)
>          /usr/lib/libnsl.a(shr.o)
>          /usr/lib/libdl.a(shr.o)
>          /usr/lib/libcrypt.a(shr.o)
>          /usr/lib/libc.a(shr.o)
>          /usr/lib/libbsd.a(shr.o)
>          /usr/lib/librtl.a(shr.o)
>          /usr/lib/libpthreads_compat.a(shr.o)
>          /usr/lib/libtli.a(shr.o)
>          /unix
>          /usr/lib/libpthreads.a(shr.o)
>          /usr/lib/libc.a(pse.o)
>          /usr/lib/libpthreads.a(shr_comm.o)
>
>
> And here's the output of perl -V:
> Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
>   Platform:
>     osname=aix, osvers=5.2.0.0, archname=aix
>     uname='aix intranet1 2 5 000121674c00 '
>     config_args='-Uuselargefiles -Dprefix=/appl/web/perl'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
>     useperlio=define d_sfio=undef uselargefiles=undef usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>     usemymalloc=n, bincompat5005=undef
>   Compiler:
>     cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
> -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -I/usr/local/include',
>     optimize='-O',
>     cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1
> -qnoansialias -DUSE_NATIVE_DLOPEN -I/usr/local/include'
>     ccversion='6.0.0.4', gccversion='', gccosandvers=''
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
>     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=4
>     alignbytes=8, prototype=define
>   Linker and Libraries:
>     ld='ld', ldflags =' -brtl -L/usr/local/lib'
>     libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
>     libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd
>     perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd
>     libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
>     gnulibc_version=''
>   Dynamic Linking:
>     dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='
> -bE:/appl/web/perl/lib/5.8.4/aix/CORE/perl.exp'
>     cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE
> -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lc -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options:
>   Built under aix
>   Compiled at Apr 28 2004 13:20:00
>   @INC:
>     /appl/web/perl/lib/5.8.4/aix
>     /appl/web/perl/lib/5.8.4
>     /appl/web/perl/lib/site_perl/5.8.4/aix
>     /appl/web/perl/lib/site_perl/5.8.4
>     /appl/web/perl/lib/site_perl
>     .
>
>
>
> Does anyone have any idea what's going on and what I can do to fix it?
>
> Thanks in advance!
>
> Cheers,
> John

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message