[collectd] Unable to compile on HP-UX Itanium

Volker Voßkämper vvo at cenote.de
Tue Feb 4 14:21:55 CET 2020


Hi Dago,

at the moment I try to circumvent the problem with libgcrypt and others by using

/configure --with-libgcrypt=no --disable-all-plugins

To try just compile the basic daemon.

My attempts are not really random. ;-) They are the result of the few
posts I found with Google and some hints from the manual of pthread:

$ man pthread
(...)
COMPILATION SUMMARY
      A multithreaded application must define the appropriate POSIX revision
      level (199506) at compile time and link against the pthread library
      with -lpthread.  For example:

           cc -D_POSIX_C_SOURCE=199506L -o myapp myapp.c -lpthread
(...)
     Note: When explicitly specifying ANSI compilation (with "-Aa"),
      defining the POSIX revision level restricts the program to using
      interfaces within the POSIX namespaces.  If interfaces in the larger
      X/Open namespace are to be called, either of the compiler options,
      -D_XOPEN_SOURCE_EXTENDED or -D_HPUX_SOURCE, must be specified in
      addition to -D_POSIX_C_SOURCE=199506L.  Alternatively, compiling with
      -Ae (or not specifying "-A") will implicitly specify -D_HPUX_SOURCE.

      Note: Some documentation will recommend the use of -D_REENTRANT for
      compilation.  Although this also functions properly, it is considered
      an obsolescent form.

so now I tried:
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc
-lpthread -DBIG_ENDIAN"
and
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc
-D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -lpthread -DBIG_ENDIAN"
success

both result in

$ make
(...)
config.status: executing depfiles commands
  CC       src/collectd_nagios-collectd-nagios.o
gcc: -lpthread: linker input file unused because linking not done
  CC       src/libcollectdclient/libcollectdclient_la-client.lo
gcc: -lpthread: linker input file unused because linking not done
  CC       src/libcollectdclient/libcollectdclient_la-network.lo
gcc: -lpthread: linker input file unused because linking not done
  CC       src/libcollectdclient/libcollectdclient_la-network_buffer.lo
gcc: -lpthread: linker input file unused because linking not done
  CC       src/libcollectdclient/libcollectdclient_la-network_parse.lo
In file included from src/libcollectdclient/network_parse.c:49:
src/libcollectdclient/collectd/stdendian.h:165:2: error: #error Could
not determine CPU byte order
cc1: warnings being treated as errors
src/libcollectdclient/network_parse.c: In function 'buffer_uint16':
src/libcollectdclient/network_parse.c:125: warning: implicit
declaration of function '__builtin_bswap16'
src/libcollectdclient/network_parse.c: In function 'parse_int':
src/libcollectdclient/network_parse.c:149: warning: implicit
declaration of function '__builtin_bswap64'
*** Error exit code 1
(...)


thanks
Volker



More information about the collectd mailing list