Menu

configure: error: arapi is needed (again!)

Help
Scott
2011-02-03
2012-10-23
  • Scott

    Scott - 2011-02-03

    I've tried to follow the suggestions in the other thread about this, but it
    doesn't seem applicable. I have the following files set up on a Linux 2.6
    64-bit box running PHP 5.3.2 (64-bit). The ARAPI is version 7.1 p1 for Linux
    and the RTL version is the latest. I am using the latest PHP ARAPI source
    files.

    /root/php_arapi_build
        arapi
            doc
                [files not shown]
            include
                ardbc.h
                area.h
                arerrno.h
                arextern.h
                arfilterapi.h
                arfree.h
                ar.h
                arplugin.h
                arstruct.h
                artypes.h
            lib
                arapi71.jar
                arcmn71.jar
                ardoc71.jar
                arpluginsvr71.jar
                arrpc71.jar
                arsys_sample.xml
                arutil71.jar
                bcprov-jdk15-133.jar
                commons-beanutils.jar
                commons-codec-1.3.jar
                commons-collections-3.2.jar
                commons-configuration-1.3.jar
                commons-digester-1.7.jar
                commons-lang-2.2.jar
                commons-logging-1.1.jar
                javadriver.jar
                jlicapi71.jar
                libar.a
                libarjni71.so
                libar.so
                libarutiljni71.so
                libarxmlutil.so
                libicudatabmc.so
                libicudatabmc.so.32
                libicudatabmc.so.32.0
                libicui18nbmc.so
                libicui18nbmc.so.32
                libicui18nbmc.so.32.0
                libicuiobmc.so
                libicuiobmc.so.32
                libicuiobmc.so.32.0
                libicuucbmc.so
                libicuucbmc.so.32
                libicuucbmc.so.32.0
                libjlicapi71.so
                libxalan-cbmc.so
                libxalan-cbmc.so.19
                libxalan-cbmc.so.19.0
                libxalanMsgbmc.so
                libxalanMsgbmc.so.19
                libxalanMsgbmc.so.19.0
                libxerces-cbmc.so
                libxerces-cbmc.so.26
                libxerces-cbmc.so.26.0
                libxerces-depdombmc.so
                libxerces-depdombmc.so.26
                libxerces-depdombmc.so.26.0
                log4j-1.2.14.jar
                log4j_pluginsvr.xml
                log4j.xml
                oncrpc.jar
                pluginsvr_config.xml
                spring.jar
            src
                [files not shown]
        php_arapi
            acinclude.m4
            aclocal.m4
            autom4te.cache
                [files not shown]
            build
                [files not shown]
            ChangeLog
            config.guess
            config.h.in
            config.log
            config.m4
            config.nice
            config.sub
            configure
            configure.in
            include
                [files not shown]
            install-sh
            ltmain.sh
            Makefile.fragments
            Makefile.global
            Makefile.objects
            missing
            mkinstalldirs
            php_arapi.cpp
            php_arapi.h
            README
            run-tests.php
        rtl
            ARTypes.h
            AssignableT.h
            Attach.h
            ByteList.h
            Coordinate.h
            Currency.h
            Diary.h
            DisplayInstance.h
            documentation
                [files not shown]
            EntryId.h
            EntryListFieldValue.h
            Exception.h
            Field.h
            FieldLimit.h
            FieldMapping.h
            FieldValue.h
            FuncCurrency.h
            Id.h
            LICENSE.TXT
            ListT.h
            MapT.h
            Name.h
            Permission.h
            Prop.h
            Qualifier.h
            Server.h
            ServerInfo.h
            Sort.h
            Status.h
            StatusHistory.h
            UInt.h
            Util.h
            Value.h
            VectorT.h
    

    This is the result of running configure:

    [root@redtemp php_arapi]# ./configure --enable-arapi=/root/php_arapi_build/arapi/
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking for cc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether cc accepts -g... yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for icc... no
    checking for suncc... no
    checking whether cc understands -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
    checking for PHP extension directory... /usr/lib64/php/modules
    checking for PHP installed headers prefix... /usr/include/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking for gawk... gawk
    checking whether to enable Remedy AR System support... yes, shared
    checking for ARInitialization in -lar... no
    configure: error: arapi is needed
    
     
  • Jens Yllman

    Jens Yllman - 2011-02-03

    Do you have /root/php_arapi_build/arapi/lib in LD_LIBRARY_PATH ??

     
  • Scott

    Scott - 2011-02-03
    [root@redtemp php_arapi]# echo $LD_LIBRARY_PATH
    /root/php_arapi_build/arapi/lib
    [root@redtemp php_arapi]# ./configure --enable-arapi=/root/php_arapi_build/arapi/
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking for cc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether cc accepts -g... yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for icc... no
    checking for suncc... no
    checking whether cc understands -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
    checking for PHP extension directory... /usr/lib64/php/modules
    checking for PHP installed headers prefix... /usr/include/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking for gawk... gawk
    checking whether to enable Remedy AR System support... yes, shared
    checking for ARInitialization in -lar... no
    configure: error: arapi is needed
    
     
  • Jens Yllman

    Jens Yllman - 2011-02-03

    I wonder how the config.log file looks where it tries to verify that -lar is
    working.

    Another thought is that, is this really going to work, compile it as 64-bit
    and linking a 32-bit library. And that maybe resulting in, can you compile
    this as 32-bit and run it on a 64-bit apache/php server. I can not say for
    sure. At the moment ARAPI only available as 64-bit in 7.6.x and later. And so
    far it is not very stable.

     
  • Scott

    Scott - 2011-02-03

    Good point about ARAPI being 32-bit here... I'm quite certain that PHP will
    not be able to load a 32-bit library if it is 64-bit, at least not without
    some additional magic not built in by default. I assumed that the ARAPI I had
    also had 64-bit binaries, but I guess I assumed too much.

    For what's it worth, here is the section of config.log you mentioned:

    configure:4282: checking for ARInitialization in -lar
    configure:4317: cc -o conftest -g -O2  -Wl,-rpath,/root/php_arapi_build/arapi//lib -L/root/php_arapi_build/arapi//lib  -pthread -ldl conftest.c -lar   >&5
    /usr/bin/ld: skipping incompatible /root/php_arapi_build/arapi//lib/libar.so when searching for -lar
    /usr/bin/ld: skipping incompatible /root/php_arapi_build/arapi//lib/libar.a when searching for -lar
    /usr/bin/ld: cannot find -lar
    collect2: ld returned 1 exit status
    configure:4324: $? = 1
    configure: failed program was:
    | /* confdefs.h.  */
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | /* end confdefs.h.  */
    |
    | /* Override any GCC internal prototype to avoid an error.
    |    Use char because int might match the return type of a GCC
    |    builtin and then its argument prototype would still apply.  */
    | #ifdef __cplusplus
    | extern "C"
    | #endif
    | char ARInitialization ();
    | int
    | main ()
    | {
    | return ARInitialization ();
    |   ;
    |   return 0;
    | }
    configure:4345: result: no
    configure:4501: error: arapi is needed
    
     
  • Jens Yllman

    Jens Yllman - 2011-02-03

    I guess that mean it finds files that match -lar but can not use them. And
    this might be the 64/32 -bit problem.

     
  • Scott

    Scott - 2011-02-03

    OK, I really appreciate your quick replies on this! I'll look into running
    32-bit Apache/PHP and try this again. Thanks.

     

Log in to post a comment.