dmz8080 has asked for the wisdom of the Perl Monks concerning the following question:

Goal: Install the HTTP :: GHTTP module for perl running on AIX

Problem Statement: The Perl Makefile.pl command fails, it cannot find the "ghttp" library

What have I tried: I installed the libghttp rpm from the AIX for Linux tool kit. The module would not install. I then downladed the libraries directly and installed them, the module still cannot find the library. I have included some details below. Any help is very much appreciated

Moot point(s): I am working in a closed network with no CPAN shell access, so all my module installs require an excessive amount of manual effort.

Supporting details:

--------------------------------------------------------------- Perl Makefile.PL # /admin/perl5_64/bin/perl Makefile.PL LIBS='-L/usr/local/lib -lghttp' + INC='-I/usr/local/include' running gnome-config... ok checking for main() in -lghttp... no libghttp not found Try setting LIBS and INC values on the command line Or get libghttp from ftp://ftp.gnome.org/pub/GNOME/stable/sources/libghttp/ HTTP:GHTTP (HTTP-GHTTP-1.07) ------------------------------------------------------------------ Perl Version Summary of my perl5 (revision 5 version 22 subversion 0) configuration +: Platform: osname=aix, osvers=7.1.0.0, archname=aix-thread-multi-64all uname='aix SERVER 1 7 00f698224c00 ' config_args='-d -Dcc=cc_r -Duseshrplib -Dusethreads -Dusepthreads -Dus +e64bitall -Dprefix=/admin/perl5_64' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc_r -q64', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOUR +CE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DN +EED_PTHREAD_INIT -q64 -DUSE_64_BIT_ALL -q64', optimize='-O', cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 - +qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT +' ccversion='11.1.0.10', gccversion='', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321, do +ublekind=4 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8, lo +ngdblkind=0 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lse +eksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld', ldflags ='-brtl -bdynamic -b64' libpth=/lib /usr/lib /usr/ccs/lib libs=-lpthread -lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lpthread +s -lc perllibs=-lpthread -lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc libc=, so=a, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/admin/per +l5_64/lib/5.22.0/aix-thread-multi-64all/CORE/perl.exp' cccdlflags=' ', lddlflags='-b64 -bhalt:4 -G -bI:$(PERL_INC)/perl.exp - +bE:$(BASEEXT).exp -bnoentry -lpthreads -lc -lm' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under aix Compiled at Aug 9 2015 13:44:35 @INC: /admin/perl5_64/lib/site_perl/5.22.0/aix-thread-multi-64all /admin/perl5_64/lib/site_perl/5.22.0 /admin/perl5_64/lib/5.22.0/aix-thread-multi-64all /admin/perl5_64/lib/5.22.0 . ---------------------------------------------------------------------- GHTTP LIBRARY: # ls -al /usr/local/lib total 744 drwxr-xr-x 2 root system 256 Aug 10 18:08 . drwxr-xr-x 12 root system 4096 Aug 10 18:08 .. -rw-r--r-- 1 root system 199 Aug 10 18:08 ghttpConf.sh -rw-r--r-- 1 root system 365647 Aug 10 18:08 libghttp.a -rwxr-xr-x 1 root system 605 Aug 10 18:08 libghttp.la # ls -al /usr/local/include total 32 drwxr-xr-x 2 root system 256 Aug 10 18:08 . drwxr-xr-x 12 root system 4096 Aug 10 18:08 .. -rw-r--r-- 1 root system 5578 Aug 10 18:08 ghttp.h -rw-r--r-- 1 root system 3492 Aug 10 18:08 ghttp_constants.h (installed from libghttp-1.0.9.tar.gz)

Replies are listed 'Best First'.
Re: Help with HTTP::GHTTP
by syphilis (Archbishop) on Aug 11, 2015 at 07:00 UTC
    # /admin/perl5_64/bin/perl Makefile.PL LIBS='-L/usr/local/lib -lghttp' INC='-I/usr/local/include'

    Looking at the Makefile.PL, it seems you might get additional information about the failure if you run:
    # /admin/perl5_64/bin/perl Makefile.PL LIBS='-L/usr/local/lib -lghttp' INC='-I/usr/local/include' DEBUG=1

    Cheers,
    Rob

      Okay - I added the debug. Now this is interesting. The arguments passed to ld are not valid with the current AIX linker installed on my system.

      ... any thoughts on how to fix? Do I need to manually build an ld command and replace it in the Makfile.PL? (that feels wrong)

      # /admin/perl5_64/bin/perl Makefile.PL LIBS='-L/usr/lib -L/usr/local/l +ib -lghttp' INC='-I/usr/include -I/usr/local/include' DEBUG=1 running gnome-config... ok checking for main() in -lghttp... ld -o conftest -D_ALL_SOURCE -D_ANSI +_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 +-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q64 -DUSE_64_BIT_ALL -q64 -I + -I/usr/include -I/usr/local/include -brtl -bdynamic -b64 conftest.c +-lpthread -lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lpthreads -l +c -L/usr/lib -L/usr/local/lib -lghttp -lghttp ld: 0706-029 Use a number with the -D flag. ld: 0706-029 Use a number with the -D flag. ld: 0706-029 Use a number with the -D flag. ld: 0706-012 The -q flag is not recognized. ld: 0706-012 The -a flag is not recognized. ld: 0706-027 The -x flag is ignored. ld: 0706-012 The -q flag is not recognized. ld: 0706-027 The -n flag is ignored. ld: 0706-012 The -q flag is not recognized. ld: 0706-029 Use a number with the -D flag. ld: 0706-029 Use a number with the -D flag. ld: 0706-012 The -q flag is not recognized. ld: 0706-012 The -6 flag is not recognized. ld: 0706-012 The -4 flag is not recognized. ld: 0706-029 Use a number with the -D flag. ld: 0706-012 The -q flag is not recognized. ld: 0706-012 The -6 flag is not recognized. ld: 0706-012 The -4 flag is not recognized. ld: 0706-012 The -I flag is not recognized. ld: 0706-012 The -I flag is not recognized. ld: 0706-012 The -/ flag is not recognized. ld: 0706-012 The -I flag is not recognized. ld: 0706-012 The -/ flag is not recognized. ld: 0706-006 Cannot find or open library file: -l anglvl=extc99 ld:open(): No such file or directory system call to 'ld -o conftest -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX +_SOURCE -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPE +N -DNEED_PTHREAD_INIT -q64 -DUSE_64_BIT_ALL -q64 -I -I/usr/include -I +/usr/local/include -brtl -bdynamic -b64 conftest.c -lpthread -lbind - +lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lpthreads -lc -L/usr/lib -L/us +r/local/lib -lghttp -lghttp' failed at Makefile.PL line 92. no libghttp not found Try setting LIBS and INC values on the command line Or get libghttp from ftp://ftp.gnome.org/pub/GNOME/stable/sources/libghttp/
        For the The *** flag is not recognized errors, try to minimize the optimization flags you are using, so one more problem is if you are using the -shared flag, this flag is not need if you use the -G flag to make the shared library.
Re: Help with HTTP::GHTTP
by anonymized user 468275 (Curate) on Aug 11, 2015 at 12:17 UTC
    AIX for Linux already sounds dubious, and I have no reason to believe that a .rpm (redhat package manager) file has any legitimate business to do on AIX. So instead of commenting out a crucial part of the makefile just to make it produce, how about building the prerequisite from the source package instead...http://ftp.gnome.org/pub/gnome/sources/libghttp/1.0/

    One world, one people

      :) - Which is the second (and current) method of implementation troubleshooting - "I then downloaded the libraries directly and installed them, the module still cannot find the library." The only difference between the two is where the libraries deploy to. The AIX toolset puts them in /usr/lib, whereas the standalone install drops them in /usr/local/lib - but I digress.

      So to level set, I have installed the libraries straight from the gnome site, and those are the libraries that I am currently using

Re: Help with HTTP::GHTTP
by Anonymous Monk on Aug 11, 2015 at 03:02 UTC
    What happens when you run "make"?
      I don't get that far. The "perl Make file.PL" command bails out. No MAKEFILE is ever generated. There is a function in the Makefile.PL script that checks for ghttp and fails causing the script to die.
        Ok, you'll have to edit Makefile.PL and get rid of everything that isn't WriteMakefile