Hello, 

I'm trying to get running Apache, mod_perl and embperl, but no success. It
seems like a problem of building a shared mod_perl module on AIX and
exporting apache symbols as well, to enable to build shared emb-perl module.


My steps so far:

gcc 2.95.2. Built myself and installed. 
perl 5.6.0. Built myself with configuration command 

sh Configure -Dcc=gcc -Doptimize='-O2' -Uuselargefiles -Duserperlio \
-Uusesfio -Dcccdlflags='none' -des

Also, applied patch which enables perl to use emulation layer for AIX native
dlopen. I'm grateful to Jens-Uwe Mager, who provided the patch. 

apache 1.3.19. Pached apache/src/os/unix/os.c and os.h so that AIX versions
over 4.3.3 isn't detected to enable apache to use emulation for AIX dlopen.
Also suggested by Jens-Uwe Mager. 

After that I tried to configure mod_perl with following command

perl Makefile.PL DO_HTTPD=1 USE_APACI=1 USE_DSO=1 EVERYTHING=1 DYNAMIC=1 \
APACI_ARGS="--enable-rule=SHARED_CORE --with-layout=GNU --enable-shared=max"

make failed. I had to modify apache/src/modules/perl/Makefile to remove
-Xlinker flags and also to define APACHELIBEXEC=/usr/local/lib. Also in
PERLLDDFLAGS there were 
-bE:$(BASEEXT).exp flag. However, the BASEXT wasn't assigned a value and
compile failed. I changed the flag to -bE:$(BASEEXT)libperl.exp. Is that
correct ? 

After this make succeeded with tons of warnings (Warning: Duplicate symbol
PL_* and Warning: Exported symbol not defined PL_*). make test failed with
message:

Target "all" is up to date.
        cp t/conf/mod_perl_srm.conf t/conf/srm.conf
                ./apaci/load_modules.pl ../apache_1.3.19/src
                        ../apache_1.3.19/src/httpd -f pwd/t/conf/httpd.conf
-X -d pwd/t &
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...Syntax error on line 1 of
/home/aivo/mod_perl-1.25/t/conf/httpd.conf:
Cannot load
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so
into server: dlopen:
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so:
30
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so36
ap_add_cgi_vars 225 httpd36 ap_add_common_vars 226 httpd36 ap_add_file_conf
227 httpd36 ap_add_per_dir_conf 228 httpd36 ap_add_per_url_conf 229 httpd36
ap_add_version_component 230 httpd36 ap_append_arrays 231 httpd36
ap_cfg_getline 232 httpd36 ap_child_terminate 233 httpd36 ap_cpystrn 234
httpd36 ap_create_per_dir_config 235 httpd36 ap_destroy_pool 236 httpd36
ap_error_log2stderr 237 httpd36 ap_find_command_in_modules 238 httpd36
ap_getword 239 httpd36 ap_getword_conf 240 httpd36 ap_handle_command 241
httpd36 ap_ind 242 httpd36 ap_init_virtual_host 243 httpd36 ap_is_fnmatch
244 httpd36 ap_limit_section 245 httpd36 ap_log_error 246 httpd36
ap_log_printf 247 httpd36 ap_make_array 248 httpd36 ap_make_sub_pool 249
httpd36 ap_make_table 250 httpd36 ap_matches_request_vhost 251 httpd36
ap_null_cleanup 252 httpd36 ap_overlay_tables 253 httpd36 ap_palloc 254
httpd36 ap_pcalloc 255 httpd36 ap_pcfg_open_custom 256 httpd36 ap_pregcomp
257 httpd36 ap_pstrcat 258 httpd36 ap_pstrdup 259 httpd36 ap_push_array 260
httpd36 ap_register_cleanup 261 httpd36 ap_server_argv0 262 httpd36
ap_server_root_relative 263 httpd36 ap_set_config_vectors 264 httpd36
ap_snprintf 265 httpd36 ap_srm_command_loop 266 httpd36 ap_table_add 267
httpd36 ap_table_get 268 httpd36 ap_table_set 269 httpd36 ap_table_setn 270
httpd36 core_module 271 httpd36 top_module 272 httpd
done

There are no messages in test error log file. 

Does anyone have some experience regarding the building (dynamic ?) mod_perl
on AIX ? 

If I build the (static ?) mod_perl with configuration command 

perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 \
        APACI_ARGS="--enable-module=most --enable-shared=max \
        --disable-shared=perl --disable-shared=include"

the mod_perl and apache compile and test fine, but compiling embperl files
with message

bash-2.04# make
        LD_RUN_PATH="" ld -o blib/arch/auto/HTML/Embperl/Embperl.so
-bhalt:4 -bM:SRE -bI:/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp
-bE:Embperl.exp -b noentry -lc -L/usr/local/lib Embperl.o epmain.o epio.o
epchar.o epcmd.o eputil.o epeval.o epdbg.o
-bI:/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.exp
ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
ld: 0711-317 ERROR: Undefined symbol: .ap_set_content_length
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: 1254-004 The error code from the last command is 8.

The thread speaking about this problem in [EMAIL PROTECTED]
mailinglist is available from
http://www.ecos.de/~mailarc/embperl/2001-03/msg00090.html. The patches and
actions are described in more detail there. 

Thank you in advance for your time, 

Aivo Kalu, [EMAIL PROTECTED]

Reply via email to