[collectd] Unable to compile on HP-UX Itanium

Dagobert Michelsen dam at opencsw.org
Tue Feb 4 14:33:39 CET 2020


Hi Volker,

Am 04.02.2020 um 14:21 schrieb Volker Voßkämper <vvo at cenote.de>:
> 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

ok ;-)

> 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

That is a different error. I suggest to go with the AIX definition by adding
  -D_LITTLE_ENDIAN=1234 -D_BIG_ENDIAN=4321 -D_BYTE_ORDER=4321 -D__ENDIAN_DEFINED=1
as can be seen in
  https://github.com/collectd/collectd/blob/master/src/libcollectdclient/collectd/stdendian.h#L119

Also please use „make V=1“ so we can verify the compiler invocations.
I also suggest to not add all this to CC but more like
  CPPFLAGS="-D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -DBIG_ENDIAN“
  LDFLAGS="-lpthread“

Best regards

  — Dago

-- 
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896




More information about the collectd mailing list