[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Compilation on AIX With mod_perl 2.0.10, Perl 5.26.1, and Apache 2.4.29
From:       Daniell Freed <wintermte () gmail ! com>
Date:       2017-11-15 19:47:21
Message-ID: E33FDB9A-8730-4315-AB23-8F86504FD27E () gmail ! com
[Download RAW message or body]

I'm attempting to build mod_perl 2.0.10 using Perl 5.26.1 and Apache 2.4.29 on AIX \
6.1.  I'm using IBM's xlc compiler.  I have been successfully building Perl 5.24.0, \
mod_perl 2.0.9, and Apache 2.2.31 prior to this on the same machine using xlc, but \
this upgrade is giving me some grief.

For the record, I have this stack compiled and functional on both RHEL and HP-UX \
already, but I'm struggling to get the mod_perl part functioning on AIX.

I'm not using anything too unusual when configuring.  My Perl path is pointing to the \
custom Perl I created in /usr/local/epic/Epic2018/bin/perl, and this is also where \
the Apache httpd server was built and installed to, including the APR/APR-util parts.

I'm running into several issues, some of which I've worked around, and some not.  The \
final symbol related issues, are quit possibly due to my workarounds.

Any help would be very much appreciated.

I run the Makefile.pl:

/usr/local/epic/Epic2018/bin/perl ./Makefile.PL \
MP_APXS=/usr/local/epic/Epic2018/bin/apxs Reading Makefile.PL args from @ARGV
   MP_APXS = /usr/local/epic/Epic2018/bin/apxs
no conflicting prior mod_perl version found - good.
Using APXS => /usr/local/epic/Epic2018/bin/apxs
Configuring Apache/2.4.29 mod_perl/2.0.10 Perl/v5.26.1
Checking if your kit is complete...
Looks good
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
Subroutine set_version redefined at ./Makefile.PL line 137.
[   info] generating script t/TEST
[   info] generating script ./t/cgi-bin/cookies.pl
[   info] generating script ./t/cgi-bin/next_available_port.pl
Writing MYMETA.yml and MYMETA.json
Checking for Cwd...ok
Checking for File::Spec...ok
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
…<bunch more lines like this>…
Generating a Unix-style Makefile
Writing Makefile for mod_perl2
Writing MYMETA.yml and MYMETA.json
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning]   LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

[warning] Check the results of
[warning]
[warning]   $ /usr/local/epic/Epic2018/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.

Then I run make, which chugs along until it triggers this error:
        rm -f ../../../blib/arch/auto/APR/APR.so
        LD_RUN_PATH="/usr/local/epic/Epic2018/lib" ld  -b64 -bhalt:4 -G  -bE:APR.exp \
-bnoentry -lc128 -lpthreads -lc -lm -L/usr/lib64 -berok APR.o modperl_error.o \
modperl_bucket.o modperl_common_util.o modperl_common_log.o -brtl -bdynamic \
-L/usr/lib64 -b64 -o ../../../blib/arch/auto/APR/APR.so    \
-L/usr/local/epic/Epic2018/lib -laprutil-1 -lexpat -L/usr/local/epic/Epic2018/lib \
                -L/usr/local/epic/Epic2018/lib -lapr-1 -lpthread -Wl,-brtl
ld: 0706-012 The -W flag is not recognized.
ld: 0706-006 Cannot find or open library file: -l ,-brtl

This happens because there is an issue with the Makefile in xs/APR/APR/Makefile, that \
incorrectly add  "-Wl,-brtl" to EXTRALIBS and LDLOADLIBS.  If I remove "-Wl," in this \
Makefile it will proceed, until it gets to xs/APR/aprext/, at which point it will \
fail again:

                cc -q64 -c -I/epic/perl_build/source/mod_perl-2.0.10/src/modules/perl \
-I/epic/perl_build/source/mod_perl-2.0.10/xs -I/usr/local/epic/Epic2018/include/apr-1 \
-I/usr/local/epic/Epic2018/include/apr-1 -I/usr/local/epic/Epic2018/include \
-I/usr/local/epic/Epic2018/include \
-I/epic/perl_build/source/mod_perl-2.0.10/src/modules/perl \
-I/epic/perl_build/source/mod_perl-2.0.10/xs -I/usr/local/epic/Epic2018/include/apr-1 \
-I/usr/local/epic/Epic2018/include/apr-1 -I/usr/local/epic/Epic2018/include \
-I/usr/local/epic/Epic2018/include \
-I/epic/perl_build/source/mod_perl-2.0.10/src/modules/perl \
-I/epic/perl_build/source/mod_perl-2.0.10/xs -I/usr/local/epic/Epic2018/include/apr-1 \
-I/usr/local/epic/Epic2018/include/apr-1 -I/usr/local/epic/Epic2018/include \
-I/usr/local/epic/Epic2018/include  \
-I/epic/perl_build/source/mod_perl-2.0.10/src/modules/perl \
-I/epic/perl_build/source/mod_perl-2.0.10/xs -I/usr/local/epic/Epic2018/include/apr-1 \
-I/usr/local/epic/Epic2018/include/apr-1 -I/usr/local/epic/Epic2018/include \
-I/usr/local/epic/Epic2018/include  -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE \
-qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -qlongdouble -DUSE_NATIVE_DLOPEN \
-DNEED_PTHREAD_INIT -q64 -DUSE_64_BIT_ALL -q64 \
-I/usr/local/epic/Epic2018/lib/perl/arch/CORE -DMOD_PERL -DMP_COMPAT_1X -U__STR__ \
-D_THREAD_SAFE -DMP_IN_XS -g    -DVERSION=\"0.009000\"  -DXS_VERSION=\"0.009000\"  \
"-I/usr/local/epic/Epic2018/lib/perl/arch/CORE" -DMP_HAVE_APR_LIBS -DMP_HAVE_APR_LIBS \
-DMP_HAVE_APR_LIBS  -DMP_HAVE_APR_LIBS modperl_apr_perlio.c  rm -f \
../../../blib/arch/auto/APR/PerlIO/PerlIO.so  ld  -b64 -bhalt:4 -G  -bE:PerlIO.exp \
-bnoentry -lc128 -lpthreads -lc -lm -L/usr/lib64 -berok PerlIO.o modperl_apr_perlio.o \
-brtl -bdynamic -L/usr/lib64 -b64 -o ../../../blib/arch/auto/APR/PerlIO/PerlIO.so  \
                chmod 755 ../../../blib/arch/auto/APR/PerlIO/PerlIO.so
make: 1254-002 Cannot find a rule to create target static from dependencies.
Stop.
make: 1254-004 The error code from the last command is 2.

As far as I can tell this occurs because the LINKTYPE and the linkext directive are \
set to static for some reason.  If I update both in the xs/APR/aprext/Makefile it \
will finish building.  There is no static target in the makefile, which if resolved \
may be a better solution instead of changing the LINKTYPE.

At this point the build will complete, but unfortunately it isn't useable.

If, for example, I attempt to run make test it will error with symbol issues:

APACHE_TEST_APXS= APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= \
APACHE_TEST_USER=  "/usr/local/epic/Epic2018/bin/perl" -Iblib/arch -Iblib/lib  t/TEST \
-bugreport -verbose=0 Can't load \
'/epic/perl_build/source/mod_perl-2.0.10/blib/arch/auto/Apache2/Const/Const.so' for \
                module Apache2::Const: rtld: 0712-001 Symbol perl_module was \
                referenced
      from module /epic/perl_build/source/mod_perl-2.0.10/blib/arch/auto/Apache2/Const/Const.so(), \
but a runtime definition  of the symbol was not found.
rtld: 0712-002 fatal error: exiting. at \
/usr/local/epic/Epic2018/lib/perl/arch/DynaLoader.pm line 193.  at \
/epic/perl_build/source/mod_perl-2.0.10/t/response/TestApache/subprocess.pm line 14.

There are several modules that refuse to load for similar reasons.  For example:

$ perl -e 'use Apache2::Const'
Can't load '/usr/local/epic/Epic2018/lib/perl/arch/auto/Apache2/Const/Const.so' for \
                module Apache2::Const: rtld: 0712-001 Symbol perl_module was \
                referenced
      from module /usr/local/epic/Epic2018/lib/perl/arch/auto/Apache2/Const/Const.so(), \
but a runtime definition  of the symbol was not found.
rtld: 0712-002 fatal error: exiting. at /usr/local/epic/Epic2018/lib/perl/XSLoader.pm \
line 96.  at -e line 1.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Similar when I try to use ModPerl::PerlRun as a handler in Apache it will generate:

[Wed Nov 15 12:22:40.505216 2017] [perl:error] [pid 10748330:tid 4370] [client \
10.142.51.206:46780] failed to resolve handler `ModPerl::PerlRun': Can't load \
'/usr/local/epic/Epic2018/lib/perl/arch/auto/Apache2/ServerUtil/ServerUtil.so' for \
module Apache2::ServerUtil: rtld: 0712-001 Symbol ap_get_server_version was \
referenced\n      from module \
/usr/local/epic/Epic2018/lib/perl/arch/auto/Apache2/ServerUtil/ServerUtil.so(), but a \
runtime definition\n\t    of the symbol was not found. at \
/usr/local/epic/Epic2018/lib/perl/XSLoader.pm line 96.\n

Can anyone help me figure this out?  I've tried forcing some library search paths by \
using LIBDIR and/or LD_LIBRARY_PATH.  My thinking was that most (or all) of these \
symbols must be in the mod_perl.so (nm seems to confirm that, but I didn't checked \
everything).  Unfortunately setting LIBDIR to the mod_perl.so directory didn't help.

-Dan Freed


["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEYLJ+1wdXdzgoZ3QIJqGIk4P5rf4FAloMmckACgkQJqGIk4P5
rf77BAf8DZvGz4bEkxSaVRehwYWs+VhDkmc76fGpeGXlFK7CSQgThkH1jpQfcn9t
6i1EF2pWO1tOP/9yKmoRB03amF/VGPHUEGrogS8wGqFCM95ALXBDeV1SLOzIa+tV
SxyMuQ98HCveDAhUkxIqKc4R2QzgpdLHJ6XK4nfEWCk6MNA0FxinwPOgKOTvBOhi
A1uKaPh6EN4+r2eaIaMOwjaMEuxYMVH9chwnh1fD9ixx7p4T5NqvHLl7qssQG83j
slVjKRDaRDw5SHWfUkkqdIgMD+foondi/vm5sB1LLaunax5P1uq2aCOOnUg2TP1S
XYBKaSHqTtc7E2BUO/Z4fJ54CYa55Q==
=oBzN
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic