[collectd] Unable to compile on HP-UX Itanium
Volker Voßkämper
vvo at cenote.de
Tue Feb 4 12:27:52 CET 2020
Hello,
according to issue #3281 HP-UX is not supported but a Solution
Architect from Elastic just confirmed that all customers of Elastic
still using HP-UX use CollectD as replacement for Beats.
So there must be a solution to compile it.
Environment:
HP-UX B.11.31 U ia64
cc: HP C/aC++ B3910B A.06.27.03 [Nov 30 2012]
gcc (GCC) 4.2.3 (Package from hpux.connect.org.uk)
libgcrypt 1.8.5 (Package from hpux.connect.org.uk)
To make it short, as a summary I can say that most configure options I
used result in
---------snip-----------------------------------------------------------------------------------------------
$ make
make all-am
CC src/collectd_nagios-collectd-nagios.o
CC src/libcollectdclient/libcollectdclient_la-client.lo
CC src/libcollectdclient/libcollectdclient_la-network.lo
In file included from src/libcollectdclient/network.c:29:
./src/daemon/collectd.h:175:2: error: #error "Cannot determine byte order"
*** Error exit code 1
Stop.
*** Error exit code 1
---------snap-----------------------------------------------------------------------------------------------
CC=" ... -mbig-endian ..." does not help
I also had an issue with libgcrypt which I could not solve:
# cat config.log |grep libgcrypt
configure:121291: result: libgcrypt . . . . . . no (symbol
gcry_md_hash_buffer not found)
---------snip-----------------------------------------------------------------------------------------------
$ make
(...)
src/libcollectdclient/network_buffer.c", line 731: error #2020: identifier
"GCRY_STRONG_RANDOM" is undefined
GCRY_STRONG_RANDOM);
^
18 errors detected in the compilation of
"src/libcollectdclient/network_buffer.c".
*** Error exit code 1
---------snap-----------------------------------------------------------------------------------------------
even though
$ nm /usr/local/lib/hpux64/libgcrypt.so | grep gcry_md_hash_buffer
[1476] | 4611686018428675760| 832|FUNC |GLOB |0|
.text|_gcry_md_hash_buffer
[2059] | 4611686018428922848| 1600|FUNC |GLOB |0|
.text|_gcry_md_hash_buffers
[1477] | 4611686018429233792| 192|FUNC |GLOB |0|
.text|gcry_md_hash_buffer
[2103] | 4611686018429313952| 208|FUNC |GLOB |0|
.text|gcry_md_hash_buffers
Because of that I ended up with:
./configure --with-libgcrypt=no --disable-all-plugins ...
to temporary get around this and possible problems with other dependencies.
I tried several combinations of options, here are some as an example:
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="gcc -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="c99 -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="aCC
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="aCC -b -Ae
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="aCC -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="acc -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="acc -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="acc -B -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="acc -b -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="acc -b -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="c99 -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="c99 -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
-lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="c99 -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
-xchar_byte_order=high -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="cc -Ae -D_POSIX_C_SOURCE=199506L
-D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="gcc -std=c99 -D_POSIX_C_SOURCE=199506L
-lpthread"
./configure --with-libgcrypt=no --disable-all-plugins
--with-nan-emulation CC="gcc -std=c99 -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="c99
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="c99 -Ae
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="c99
-D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="c99
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="cc -Ae
-D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506L -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -std=c99
-D_POSIX_C_SOURCE=199506L -D_REENTRANT -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -std=c99
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread
-mbig-endian"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -std=c99
-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE_EXTENDED -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -std=c99
-D_POSIX_C_SOURCE=199506L -lpthread"
./configure --with-libgcrypt=no --disable-all-plugins CC="gcc -std=c99
-lpthread"
I hope someone can help :-)
Best Regards
Volker
More information about the collectd
mailing list