You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Ad...@bankone.com on 2004/03/28 18:24:23 UTC

FW: libapreq mp-1 build problems on aix-5.2 w/ gcc-3.3.3

OK, 

aix-5.3, gcc-3.3.3, perl-5.8.3 (-V far below), gdb-6.0

>From below, can hack out the compile of Apache::Request, and Apache::Cookie, but when I try to do a make test I have nothing good happening. (make test croaks, httpd cores, with nothing interesting in the core file!)

What is the best path to debug this setup? Debugging symbols in (apache, perl, mod_perl, libapreq)? Compiled mod_perl with PERL_DEBUG=1, looked to build an apache with debugging symbols, (can attach to a running instance an issues a bt and get a nice stack_trace like the following)

[snip] gdb of apachectl started instance

test/ext-tools/sources/src/libapreq-1.3$gdb -p 512086
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix5.2.0.0".
Attaching to process 512086
0x10005da4 in child_main (child_num_arg=3) at http_main.c:4399
4399    http_main.c: A file or directory in the path name does not exist..
        in http_main.c
(gdb) bt
#0  0x10005da4 in child_main (child_num_arg=3) at http_main.c:4399
#1  0x10006528 in make_child (s=0x20043e9c, slot=3, now=1080490579) at http_main.c:4803
#2  0x10006648 in startup_children (number_to_start=2) at http_main.c:4830
#3  0x10007018 in standalone_main (argc=1, argv=0x2ff22ab8) at http_main.c:5149
#4  0x10007ac8 in main (argc=1, argv=0x2ff22ab8) at http_main.c:5491
#5  0x100001dc in __start ()
(gdb) q
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: , process 512086


[snip] ./libapreq/make test 
opt/omni/software/external/apache-1.3.29/bin/httpd -d /omnitest/ext-tools/sources/src/libapreq-1.3/t -f /omnitest/ext-tools/sources/src/libapreq-1.3/t/conf/httpd.conf -D APACHE1
using Apache/1.3.29

waiting 60 seconds for server to start: .
waiting 60 seconds for server to start: ok (waited 0 secs)
server loopback:8529 started
t/apreq/big_input....# Failed test 1 in t/apreq/big_input.t at line 40
t/apreq/big_input....NOK 1^C[warning]
halting tests
[warning] server loopback:8529 shutdown
[  error] oh golly, server dumped core
[  error] for stacktrace, run: gdb /opt/omni/software/external/apache-1.3.29/bin/httpd -core /omnitest/ext-tools/sources/src/libapreq-1.3/t/core
make: *** [run_tests] Error 1

[snip]gdb of make test core
<ware/external/apache-1.3.29/bin/httpd -core /omnitest/ext-tools/sources/src/libapreq-1.3/t/core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix5.2.0.0"...
Core was generated by `httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x10004044 in sig_coredump (sig=11) at http_main.c:3116
3116    http_main.c: A file or directory in the path name does not exist..
        in http_main.c
(gdb) bt
#0  0x10004044 in sig_coredump (sig=11) at http_main.c:3116
#1  <signal handler called>
(gdb) where
#0  0x10004044 in sig_coredump (sig=11) at http_main.c:3116
#1  <signal handler called>
(gdb) list
3116    in http_main.c
(gdb)

Seems like the backtrace of the test httpd.conf instance should be more exciting than that! Gonna try to get it captured inside of gdb by hand to see if that provides any info.

--Adrian

-----Original Message-----
From: Terranova, Adrian (Card Services) 
Sent: Thursday, March 25, 2004 12:54 PM
To: Terranova, Adrian (Card Services); modperl@perl.apache.org
Subject: RE: libapreq mp-1 build problems on aix-5.2 w/ gcc-3.3.3


Found the symbols in the ./apache-1.3.29/libexec/httpd.exp.

Looks like something (can't tell if it's something mod_perl should be passing back, or if it's something Makefile.PL should be grabbing), isn't creating the ./Cookie ./Request Makefiles entirely sanely, 

OTHERLDFLAGS = -bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/Apache/mod_perl.exp 

to

OTHERLDFLAGS = -Wl,-bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/Apache/mod_perl.exp -Wl,-bI:/opt/omni/software/external/apache-1.3.29/libexec/httpd.exp

Things compile clean after that.


--Adrian

> -----Original Message-----
> From: Terranova, Adrian (Card Services) 
> Sent: Thursday, March 25, 2004 12:39 PM
> To: modperl@perl.apache.org
> Subject: libapreq mp-1 build problems on aix-5.2 w/ gcc-3.3.3
> 
> 
> 
> Having trouble with getting Apache::Request to build on 
> AIX-5.2, gcc-3.3.3 mod_perl-1.29, looks like the Makemaker is 
> passing the a -b argument without the required -Wl in front 
> of it inside of the Request directory. (Also looks like there 
> are symbols in a library being linked that aren't correct.)
> 
> modperl-1.29, libapreq-1.3, gcc-3.3.3, perl -V below
> [snip]
> -------------------------------------------
> Summary of my perl5 (revision 5.0 version 8 subversion 3) 
> configuration:
>   Platform:
>     osname=aix, osvers=5.2.0.0, archname=aix
>     uname='aix wiletl2-admin 2 5 0020685b4c00 '
>     config_args='-de -Dcc=gcc -Ubincompat5005 
> -Dprefix=/opt/omni/software/external/perl-5.8.3 
> -Dscriptdir=/opt/omni/software/external/perl-5.8.3/bin'
>     hint=previous, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef 
> usemultiplicity=undef
>     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>     usemymalloc=n, bincompat5005=undef
>   Compiler:
>     cc='gcc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE 
> -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -fno-strict-aliasing 
> -I/usr/local/include -D_LARGE_FILES',
>     optimize='-O',
>     cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE 
> -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I/usr/local/include 
> -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE 
> -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I/usr/local/include 
> -D_LARGE_FILES'
>     ccversion='', gccversion='3.3.3', gccosandvers='aix5.2.0.0'
>     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=8
>     alignbytes=8, prototype=define
>   Linker and Libraries:
>     ld='gcc', ldflags =' -Wl,-brtl -L/usr/local/lib -Wl,-b32'
>     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='-Xlinker 
> -bE:/opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE/
> perl.exp'
>     cccdlflags=' ', lddlflags='  -Wl,-bhalt:4 -Wl,-bM:SRE 
> -Wl,-bI:$(PERL_INC)/perl.exp -Wl,-bE:$(BASEEXT).exp 
> -Wl,-bnoentry -lc -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl):
>   Compile-time options: USE_LARGE_FILES
>   Built under aix
>   Compiled at Mar 16 2004 15:45:22
>   @INC:
>     /opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix
>     /opt/omni/software/external/perl-5.8.3/lib/5.8.3
>     /opt/omni/software/external/perl-5.8.3/lib/site_perl/5.8.3/aix
>     /opt/omni/software/external/perl-5.8.3/lib/site_perl/5.8.3
>     /opt/omni/software/external/perl-5.8.3/lib/site_perl
> ---------------------------
> 
> perl Makefile.PL
> make
> 
> all goes well until...
> ...
> (From the ./libapreq-1.3/Request Makefile invocation)
>         gcc -c  -I../c 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/modules/perl 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/include 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/regex 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/os/unix 
> -I/opt/omni/software/external/openssl/include  -D_ALL_SOURCE 
> -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN 
> -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILES -O   
>  -DVERSION=\"1.3\"  -DXS_VERSION=\"1.3\"  
> "-I/opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE" 
>   Request.c
> In file included from 
> /opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE/perl.h:1807,
>                  from 
> /omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/Apa
> che/include/modules/perl/mod_perl.h:80,
>                  from Request.xs:41:
> /opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE/hand
> y.h:259:1: warning: "strEQ" redefined
> In file included from Request.xs:1:
> ../c/apache_request.h:63:1: warning: this is the location of 
> the previous definition
> Running Mkbootstrap for Apache::Request ()
>         chmod 644 Request.bs
>         rm -f ../blib/arch/auto/Apache/Request/Request.so
>         LD_RUN_PATH="" gcc  -Wl,-bhalt:4 -Wl,-bM:SRE 
> -Wl,-bI:/opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/C
> ORE/perl.exp -Wl,-bE:Request.exp -Wl,-bnoentry -lc 
> -L/usr/local/lib Request.o 
> -bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto
> /Apache/mod_perl.exp -o 
> ../blib/arch/auto/Apache/Request/Request.so   
> -L/home/sysaat/.cpan/build/libapreq-1.3/Request/../blib/arch/a
> uto/libapreq -lapreq
> gcc: `-b' must come at the start of the command line
> make: 1254-004 The error code from the last command is 1.
> 
> ----------------------------------------------------
> I deduce the 
> 
> -bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto
> /Apache/mod_perl.exp
> 
> in ./Request/Makefile
> 
> Is really a linker argument, and like a good guesser, changed 
> 
> -bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto
> /Apache/mod_perl.exp
> to
> -Wl,-bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/
> auto/Apache/mod_perl.exp
> 
> now I get in ./Request, and restart my make
> 
> [sysaat@wiletl2-admin]/home/sysaat/.cpan/build/libapreq-1.3/Re
quest$make
>         gcc -c  -I../c 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/modules/perl 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/include 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/regex 
> -I/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/A
> pache/include/os/unix 
> -I/opt/omni/software/external/openssl/include  -D_ALL_SOURCE 
> -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN 
> -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILES -O   
>  -DVERSION=\"1.3\"  -DXS_VERSION=\"1.3\"  
> "-I/opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE" 
>   Request.c
> In file included from 
> /opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE/perl.h:1807,
>                  from 
> /omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/auto/Apa
> che/include/modules/perl/mod_perl.h:80,
>                  from Request.xs:41:
> /opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/CORE/hand
> y.h:259:1: warning: "strEQ" redefined
> In file included from Request.xs:1:
> ../c/apache_request.h:63:1: warning: this is the location of 
> the previous definition
> Running Mkbootstrap for Apache::Request ()
>         chmod 644 Request.bs
>         rm -f ../blib/arch/auto/Apache/Request/Request.so
>         LD_RUN_PATH="" gcc  -Wl,-bhalt:4 -Wl,-bM:SRE 
> -Wl,-bI:/opt/omni/software/external/perl-5.8.3/lib/5.8.3/aix/C
> ORE/perl.exp -Wl,-bE:Request.exp -Wl,-bnoentry -lc 
> -L/usr/local/lib Request.o 
> -Wl,-bI:/omnitest/external/perl-5.8.3/lib/site_perl/5.8.3/aix/
> auto/Apache/mod_perl.exp -o 
> ../blib/arch/auto/Apache/Request/Request.so   
> -L/home/sysaat/.cpan/build/libapreq-1.3/Request/../blib/arch/a
> uto/libapreq -lapreq
> 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_log_rerror
> ld: 0711-317 ERROR: Undefined symbol: .ap_pcalloc
> ld: 0711-317 ERROR: Undefined symbol: .ap_hard_timeout
> ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_kill_timeout
> ld: 0711-317 ERROR: Undefined symbol: .ap_find_path_info
> ld: 0711-317 ERROR: Undefined symbol: .ap_pstrndup
> ld: 0711-317 ERROR: Undefined symbol: .ap_make_dirstr_parent
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_get
> ld: 0711-317 ERROR: Undefined symbol: .ap_push_array
> ld: 0711-317 ERROR: Undefined symbol: .ap_make_array
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_do
> ld: 0711-317 ERROR: Undefined symbol: .ap_pstrcat
> ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
> ld: 0711-317 ERROR: Undefined symbol: .ap_make_table
> ld: 0711-317 ERROR: Undefined symbol: .ap_getword
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
> ld: 0711-317 ERROR: Undefined symbol: .ap_pfclose
> ld: 0711-317 ERROR: Undefined symbol: .ap_popenf
> ld: 0711-317 ERROR: Undefined symbol: .ap_pfdopen
> ld: 0711-317 ERROR: Undefined symbol: ap_null_cleanup
> ld: 0711-317 ERROR: Undefined symbol: .ap_register_cleanup
> ld: 0711-317 ERROR: Undefined symbol: .ap_getword_conf
> ld: 0711-317 ERROR: Undefined symbol: .ap_ind
> ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
> ld: 0711-317 ERROR: Undefined symbol: ap_day_snames
> ld: 0711-317 ERROR: Undefined symbol: ap_month_snames
> ld: 0711-317 ERROR: Undefined symbol: .ap_psprintf
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_unset
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain 
> more information.
> collect2: ld returned 8 exit status
> make: 1254-004 The error code from the last command is 1.
> 
> 
> Stop.
> ---------------------------------------------
> these look like apache symbols, and I'm missing a -L  to an 
> apache library, but I have no clue where. Any ideas? 
> 
> --Adrian 
> 
> 
> **********************************************************************
> This transmission may contain information that is privileged, 
> confidential and/or exempt from disclosure under applicable 
> law. If you are not the intended recipient, you are hereby 
> notified that any disclosure, copying, distribution, or use 
> of the information contained herein (including any reliance 
> thereon) is STRICTLY PROHIBITED. If you received this 
> transmission in error, please immediately contact the sender 
> and destroy the material in its entirety, whether in 
> electronic or hard copy format. Thank you
> **********************************************************************
> 
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
> 
>