Menu

compiling on HPUX with aCC

Help
2001-02-20
2001-06-14
  • Simon Kitching

    Simon Kitching - 2001-02-20

    Is there someone here who can help me get log4cpp compiled on HPUX11.0 with aCC?

    I'm not very familiar with automake/configure/libtool, etc.

    So far:
    (a) export CXX=aCC; export CC=cc
    (b) ./configure
    (c) make
    --> HPUX make reports
    No suffix list.
    Making all in config
    No suffix list.
    Making all in src
    Make: line 277: syntax error.  Stop.

    where line 277 of src/Makefile is somewhere around:
    DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)

    -include $(DEP_FILES)

    I guess that this is some gmake-specific stuff.

    (d) I do have gmake installed (but not gcc), but:
    Making all in config
    gmake[1]: Entering directory `/home/skitchin/log4cppsrc/log4cpp/config'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `/home/skitchin/log4cppsrc/log4cpp/config'
    Making all in src
    gmake[1]: Entering directory `/home/skitchin/log4cppsrc/log4cpp/src'
    /bin/sh ../libtool --mode=compile aCC -DHAVE_CONFIG_H -I. -I. -I. -I../include    -g -c Hints.cpp
    rm -f .libs/Hints.lo
    aCC -DHAVE_CONFIG_H -I. -I. -I. -I../include -g -Wp,-MD,.deps/Hints.pp -c Hints.cpp  +Z -DPIC -o .libs/Hints.lo
    aCC: error 1918: unknown subprocess specification: `p'
    gmake[1]: *** [Hints.lo] Error 1
    gmake[1]: Leaving directory `/home/skitchin/log4cppsrc/log4cpp/src'
    gmake: *** [all-recursive] Error 1

    It seems that the "-Wp..." option is a gcc option not recognised by aCC. However, this -Wp option appears to be somehow magically generated from within the depths of the automake system.

    --So:
    any suggestion how one or other of these problems
    can be fixed?

    Thanks,

    Simon

     
    • Cedric Le Goater

      Hi simon,

      First, make sure you're using GNU make !!

      Second, if you want to uses another compiler, you will have to port autoconf/automake/libtool for this new compiler. These tools were designed to work with gcc, not even g++.

      The solution to your problem is to get gcc and give it a try :-)

      If you want to insist on using HP-UX aCC, I'll be happy to help you.

      Cedric.

       
    • Carl Lawrence-Slater

      Just made it using aCC on HP-UX 11. Had a number of issues:

          1) HP doesn't like "std::" ... replaced std:: with STDNS (mapped to just ::) then on compile line it looked like
      aCC -DHAVE_CONFIG_H -I. -I. -I../include -I../include +DAportable -Aa -g -v -V +p -DSTDNS=:: -DHPACC -DNOSTDNS -c Log4cppCleanup.cpp  +Z -DPIC -o Log4cppCleanup.o

          2) the autoconfig stuff doesn't yet have a clue the config.h looks like:

      #ifndef _INCLUDE_LOG4CPP_CONFIG_H
      #define _INCLUDE_LOG4CPP_CONFIG_H 1

      /* include/log4cpp/config.h. Generated automatically at end of configure. */
      /* include/config.h.  Generated automatically by configure.  */
      /* include/config.h.in.  Generated automatically from configure.in by autoheader.  */

      /* Define if you have the <dlfcn.h> header file. */
      #ifndef LOG4CPP_HAVE_DLFCN_H
      #define LOG4CPP_HAVE_DLFCN_H  1
      #endif

      /* Define if you have the <io.h> header file. */
      /* #undef LOG4CPP_HAVE_IO_H */

      /* Define if you have the `idsa' library (-lidsa). */
      /* #undef LOG4CPP_HAVE_LIBIDSA */

      /* define if the compiler implements namespaces */
      #ifndef LOG4CPP_HAVE_NAMESPACES
      #define LOG4CPP_HAVE_NAMESPACES  
      #endif

      /* define if the C library has snprintf */
      #ifndef LOG4CPP_HAVE_SNPRINTF
      #define LOG4CPP_HAVE_SNPRINTF  
      #endif

      /* define if the compiler has stringstream */
      /* #undef LOG4CPP_HAVE_SSTREAM */

      /* Define if you have the `syslog' function. */
      /* #undef LOG4CPP_HAVE_SYSLOG */

      /* Define if you have the <unistd.h> header file. */
      #ifndef LOG4CPP_HAVE_UNISTD_H
      #define LOG4CPP_HAVE_UNISTD_H  1
      #endif

      /* Name of package */
      #ifndef LOG4CPP_PACKAGE
      #define LOG4CPP_PACKAGE  "log4cpp"
      #endif

      /* Version number of package */
      #ifndef LOG4CPP_VERSION
      #define LOG4CPP_VERSION  "0.2.5"
      #endif

      /* _INCLUDE_LOG4CPP_CONFIG_H */
      #endif

            3) all of the includes must have the .h .ie <iostream.h> not just <iostream>

            4) the freeze method is unavailable on HP

      Well that is most of it for now
      Regards
      Carl

       
      • Cedric Le Goater

        Hi carl,

        For point 1 and 3, check out HP's aCC options about strict ansi compliance. If you have one, everything should compile smoothly. If you don't have one or if it doesn't compile, aCC is broken or out of date and I can't think of any simple solutions. for the moment.

        I guess point 4 is a problem with a non-standard libstdc++  method. It should be easy to get around it.

        I don't understand point 2.

        C.

         
        • Carl Lawrence-Slater

          As far as "Strict ANSI C++" that is as goof as it gets..... from the man page:
          The following options are recognized by aCC:

                -Aa         Turns on newly supported ANSI C++ Standard features
                               like Koenig lookup and correct scoping for variables
                               declared in conditional statements like for-loops.
                               Additional features may be enabled by this option in
                               the future.

          checking version yields:
          $aCC -V

          More coming
          aCC: HP ANSI C++ B3910B A.03.25

           
          • Carl Lawrence-Slater

            Regarding the config.h

            The autoconf failed to detect a number of things the HP supports...

            namespaces
            UNISTD
            SNPRINTF
            and
            SSTREAM ("supported" in a slightly bastarized why)

            Regards
            Carl

             

Log in to post a comment.

MongoDB Logo MongoDB