Hello,
I'm trying to get running Apache, mod_perl and embperl, but no success. This
night I got segmentation faults, and I thought that maybe the mailing list
could help me. I'm sorry for the long message, I hope that there are some
simple errors, you could point me to, therefore the long description of my
actions.
To start with, AIX version is 4.3.3.0. I downloaded gnu make and gnu bison
from www-frec.bull.com and also gnu gcc. After that I downloaded gcc 2.95.2
and compiled and installed it. After that I removed the Bull compiled gcc. I
think the gcc is running fine and there are no conflicts.
After that I downloaded perl 5.6.0 and compiled it with gcc. The configure
command, I used, was
sh Configure -Dcc=gcc -Doptimize='-O2' -Uuselargefiles -Duserperlio \
-Uusesfio -Dcccdlflags='none' -des
The perl -V says
bash-2.04# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix spunk 3 4 0040fb5a4c00 '
config_args='-Dcc=gcc -Doptimize=-O2 -Uuselargefiles -Duserperlio
-Uusesfio -Dcccdlflags=none -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O2', gccversion=2.95.2 19991024 (release)
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-fno-strict-aliasing -I/usr/local/include'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-fno-strict-aliasing -I/usr/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
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
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=-lbind -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW -liconv
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Xlinker
-bE:/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp
-bE:$(BASEEXT).exp -b noentry -lc -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options:
Built under aix
Compiled at Mar 10 2001 22:31:02
@INC:
/usr/local/lib/perl5/5.6.0/aix
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/aix
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
After that I installed several modules from CPAN, all successfully compiled
and tested. So, I guess the perl is also fine.
Next, I downloaded Apache 1.3.19, mod_perl 1.25, HTML-Embperl-1.3.1 and
tried to install them. Apache and mod_perl install and test fine (I think
using DSO modules). However, adding embperl to this always failed either on
linking time or on running time with message that .ap* symbols couldn't be
resolved.
After searching net for solution, it seemed that this has something to do
with dynamic loading and I decided to try with static Apache today.
I untarred fresh apache and mod_perl and did
perl Makefile.PL APACHE_SRC=../apache-1.3.19/src DO_HTTP=1 USE_APACHI=1
EVERYTHING=1 APACI_ARGS="--with-layout=GNU"
after that make && make test && make install suceeds
/usr/local/sbin/httpd -V says
bash-2.04# /usr/local/sbin/httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_setenvif.c
mod_perl.c
suexec: disabled; invalid wrapper /usr/local/sbin/suexec
Also, mod_perl tested successfully itself, I think everything is fine.
Now, I took embperl FAQ and trid to build statically-linked copy of Embperl
with mod_perl support. I modified src/modules/perl/Makefile with a line
STATIC_EXTS = Apache Apache::Constants HTML::Embperl
I think that on the webpage, there is a typo and actually a # doesn't need
to be at the beginning of that line ? Also, I added EPDIR definition and
modified OBJS definition to include embperl objectfiles. I went to mod_perl
directory and ran
perl Makefile.PL APACHE_SRC=../apache-1.3.19/src DO_HTTP=1 USE_APACHI=1
EVERYTHING=1 APACI_ARGS="--with-layout=GNU"
after that I ran make clean && perl Makefile.PL && make in Embperl
directory, which failed with message that it cannot resolve several .ap*
symbols.
After searching net for solution, I found out that I would need to copy
apache/src/support/httpd.exp to /usr/local/lib. Also I modified embperl
Makefile to include that file for linker arguments.
After that make succeeded. I went back to mod_perl and apache directories
and made make and make install. After that I did a trick with embperl
config.pl file as quided and finally ran the tests. Offline mode and Execute
mode tests ran all OK, but http first test failed:
......
Just ASCII ...
And once again ...
ERR:unexpected EOF before status line seen, <ERR> line 1.
Input: test/html/ascii
Output: test/tmp/out.htm
Log: test/tmp/test.log
ERRORS detected! NOT all test have been passed successfully
make: 1254-004 The error code from the last command is 1.
test/tmp/test.log file:
[13664]MEM: Load /home/aivo/HTML-Embperl-1.3.1/test/html/ascii in
HTML::Embperl::DOC::_1
[13664]CACHE: New File for '/home/aivo/HTML-Embperl-1.3.1/test/html/ascii'
(2024db58) in 'HTML::Embperl::DOC::_1'
hash cache-key '/home/aivo/HTML-Embperl-1.3.1/test/html/ascii'
[13664]REQ: Embperl 1.3.1 starting... Wed Mar 21 00:56:28 2001
[13664]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[13664]REQ: Package = HTML::Embperl::DOC::_1
[13664]Open STDOUT for output...
[13664]Reading /home/aivo/HTML-Embperl-1.3.1/test/html/ascii as input using
PerlIO ...
[13664]PERF: input = /home/aivo/HTML-Embperl-1.3.1/test/html/ascii
[13664]PERF: Time: 0 ms Evals: 0 No Evals to cache
[13664]Request finished. Wed Mar 21 00:56:28 2001
. Entry-SVs: 12850 -OBJs: 10 Exit-SVs: 12945 -OBJs: 12
When I tried to do make install and tried to use Embperl on a webserver,
apache just logs segmentation faults to error log. Static web pages work
fine.
I'm not very sure, if the problem is with embperl, but I would hope that
someone could see my mistake or some other problem to point to.
Should I try to rebuild everything using dynamic linking ? Does anyone has
experience doing this with AIX ? I found some letter from comp.os.aix that
there some problems with using AIX native loader with modules such as
mod_perl and embperl ?
I would like to thank you in advance for you time.
Aivo Kalu,
[EMAIL PROTECTED], phone +372 6317339, fax +372 6317123
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]