Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power


#Servers
#Opensource
 View Only
  • 1.  Cannot compile mod_perl on AIX 7.1

    Posted 10/27/17 01:07 PM

    Originally posted by: Brian G


    On AIX 7.1 with IBM XL C/C++ version 13.1.3 I am unable to compile mod_perl version 2.0.10.  Here is my compile environment:

     

    export AR="/usr/bin/ar"
    export LD="/usr/bin/ld"
    export OBJECT_MODE=64
    export CC='xlc -q64'
    export LDFLAGS="-s -L/opt/freeware/lib64 -L/usr/lib64 -L/opt/freeware/lib"

     

    This is successful:

    /usr/opt/perl5_64/bin/perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs

     

    Here is the make error:

     

    cc_r -q64 -c -I/home/downloads/mod_perl-2.0.10/src/modules/perl -I/home/downloads/mod_perl-2.0.10/xs -I/usr/local/apache2/include -I/usr/local/apache2/include  -I/usr/local/apache2/include -I/home/downloads/mod_perl-2.0.10/src/modules/perl -I/home/downloads/mod_perl-2.0.10/xs -I/usr/local/apache2/include -I/usr/local/apache2/include  -I/usr/local/apache2/include -I/home/downloads/mod_perl-2.0.10/src/modules/perl -I/home/downloads/mod_perl-2.0.10/xs -I/usr/local/apache2/include -I/usr/local/apache2/include  -I/usr/local/apache2/include  -I/home/downloads/mod_perl-2.0.10/src/modules/perl -I/home/downloads/mod_perl-2.0.10/xs -I/usr/local/apache2/include -I/usr/local/apache2/include  -I/usr/local/apache2/include  -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/usr/local/include -q64 -DUSE_64_BIT_ALL -q64 -I/usr/opt/perl5_64/lib/5.26.1/aix-thread-multi-64all/CORE -DMOD_PERL -DMP_COMPAT_1X -U__STR__ -D_THREAD_SAFE -DMP_IN_XS -O    -DVERSION=\"0.009000\"  -DXS_VERSION=\"0.009000\"  "-I/usr/opt/perl5_64/lib/5.26.1/aix-thread-multi-64all/CORE" -DMP_HAVE_APR_LIBS -DMP_HAVE_APR_LIBS -DMP_HAVE_APR_LIBS  -DMP_HAVE_APR_LIBS modperl_common_log.c
            rm -f ../../../blib/arch/auto/APR/APR.so
            ld  -b64 -bhalt:4 -G  -bE:APR.exp -bnoentry -lpthreads -lc -lm -L/usr/local/lib -berok APR.o modperl_error.o modperl_bucket.o modperl_common_util.o modperl_common_log.o -brtl -bdynamic -L/usr/local/lib -b64 -o ../../../blib/arch/auto/APR/APR.so    -L/usr/local/apache2/lib -laprutil-1 -lexpat -liconv -L/usr/local/apache2/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
            ld:open(): A file or directory in the path name does not exist.
    make: 1254-004 The error code from the last command is 255.

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 2.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 02:47 AM

    Originally posted by: sangameshm


    Looks like you have your own copy of perl-5.26.1.

    So the build will be using the options set while building perl-5.26.1.

    The error here is due to the option "-Wl,-brtl", replace this with just -brtl.

     

    Thanks,

    Sangamesh


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 3.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 07:14 AM

    Originally posted by: Brian G


    Yes, I have built my own perl 5.26.1.

    Where is the mod_perl make getting "-Wl,-brtl"? Or, where or how do I replace "-Wl,-brtl" with -brtl?

    Thanks


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 4.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 07:22 AM

    Originally posted by: sangameshm


    Check the Config_heavy.pl file which will have most of the configuration settings.

     

    Thanks,

    Sangamesh


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 5.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 07:34 AM

    Originally posted by: Brian G


    I have two Config_heavy.pl

     

    /usr/local/lib/perl5/5.26.1/aix-thread-multi-64all/Config_heavy.pl

    /usr/opt/perl5_64/lib/5.26.1/aix-thread-multi-64all/Config_heavy.pl

     

    Neither have "-Wl,-brtl".

     

    However,/usr/opt/perl5_64/lib/5.26.1/aix-thread-multi-64all/Config_heavy.pl has this:

    ccdlflags='-brtl -bdynamic -bE:/usr/local/lib/perl5/5.26.1/aix-thread-multi-64all/CORE/perl.exp'

     

    /usr/opt/perl5_64/lib/5.26.1/aix-thread-multi-64all/Config_heavy.pl has this:

    ldflags='-brtl -bdynamic -L/usr/local/lib -b64'

     

    Any suggestions?


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 6.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 10:32 AM

    Originally posted by: sangameshm


    Please also check the apr-1-config file.

     

    Thanks,

    Sangamesh


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 7.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/30/17 11:27 AM

    Originally posted by: Brian G


    LDFLAGS=" -Wl,-brtl"

     

    is in the apr-1-config.  Do you suggest I change it?


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 8.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/31/17 08:18 AM

    Originally posted by: sangameshm


    Since ld is invoked separately to create a shared library it isn't able to recognize -W option.

    If it is passed through the compiler then we don't see this error.

    You can change this apr-1-config file, but it would kind of workaround.

    It would be better if we see how apr was built and correct.

     

    Thanks,

    Sangamesh


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 9.  Re: Cannot compile mod_perl on AIX 7.1

    Posted 10/31/17 09:15 AM

    Originally posted by: Brian G


    I have Apache httpd version 2.2.34 installed.  I built apr using this compile environment:

     

    export CC="xlc"
    export CFLAGS="-qmaxmem=-1 -DSYSV -D_AIX -D_AIX61 -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -D_LARGE_FILES -O -I/opt/freeware/include -I/usr/local/include"
    export CXX="xlC"
    export CXXFLAGS=$CFLAGS
    CPPFLAGS="-I/opt/freeware/include -I/usr/local/include"
    export CPPFLAGS
    export LD=ld
    export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/local/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/local/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000"
    export OBJECT_MODE=64

     

    Thanks for your help,

    Brian


    #AIXOpenSource
    #AIX-Open-Source-Software