Xymon Mailing List Archive search

Can't compile 4.3.28 on Ubuntu 18

list Axel Beckert
Tue, 29 Jan 2019 20:46:47 +0100
Message-Id: <user-a11d95d381c4@xymon.invalid>

Hi,

On Tue, Jan 29, 2019 at 12:17:36PM -0700, Shawn Heisey wrote:
I'm trying to get myself a new server set up.  It's running Ubuntu
18.
There is no "Ubuntu 18". There's either Ubuntu 18.04 "Bionic" (latest
LTS release) or Ubuntu 18.10 "Cosmic" (latest release).
I downloaded the source for xymon 4.3.28, installed all of the
optional dependencies except the LDAP libraries, ran ./configure,
Why? Ubuntu comes with xymon 4.3.28 pre-packaged (both 18.xx
releases): https://packages.ubuntu.com/search?keywords=xymon

"apt install xymon" as root should suffice.
and got this error from trying to run make:

make[1]: Entering directory '/usr/local/src/xymon-4.3.28/client'
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DLINUX -I/usr/local/src/xymon-4.3.28/include
-o logfetch logfetch.c ../lib/libxymonclient.a
logfetch.c: In function ‘logdata’:
logfetch.c:210:105: error: ‘intmax_t’ undeclared (first use in this
function); did you mean ‘__intmax_t’?
 bytes exceeds max buffer size %u; skipping some data\n", filename,
(intmax_t)bufsz, MAXCHECK);

^~~~~~~~

                                 __intmax_t
logfetch.c:210:105: note: each undeclared identifier is reported
only once for each function it appears in
logfetch.c:210:114: error: expected ‘)’ before ‘bufsz’
 eeds max buffer size %u; skipping some data\n", filename,
(intmax_t)bufsz, MAXCHECK);
                                                                     ^~~~~
Makefile:41: recipe for target 'logfetch' failed
make[1]: *** [logfetch] Error 1
make[1]: Leaving directory '/usr/local/src/xymon-4.3.28/client'
build/Makefile.rules:77: recipe for target 'client' failed
make: *** [client] Error 2

GCC version is 7.3.0.
This seems to happen with glibc ≥ 2.26. Debian ships this patch for
this issue (i.e. adds "#include <stdint.h>"):

--- a/client/logfetch.c
+++ b/client/logfetch.c
@@ -28,6 +28,7 @@
 #include <glob.h>
 #include <pwd.h>
 #include <grp.h>
+#include <stdint.h>
 
 /* Some systems do not have the S_ISSOCK macro for stat() */
 #ifdef SCO_SV

Patch as file:
https://salsa.debian.org/debian/xymon/raw/master/debian/patches/87_fix_logfetch_FTBFS_with_glibc_2.26.patch

See also this mailing list posting:
https://lists.xymon.com/archive/2017-February/044370.html
I pulled down the SVN trunk code and tried that, which required that
I install the sqlite dev library.  Compiling that version appeared
to work,
Oh, good, so this is fixed in SVN — just not released. But then again,
I don't see any such commit on
https://sourceforge.net/p/xymon/code/8023/log/?path=/branches/4.3.29 —
it only seems to be in
https://sourceforge.net/p/xymon/code/8023/log/?path=/branches/4.x-master
so far.

J.C.: Please cherry-pick r8013 into th 4.3.29 branch, too. It's not
only an issue on OpenBSD.
but 'make install' failed.  It took a little bit of hacking
in some of the makefiles, but I finally did get it installed.  The
requirement for the sqlite dependency is not mentioned in
docs/install.html, by the way.
The debian package seems to build without any sqlite support. But then
again, it's based on the release tar balls.

		Kind regards, Axel
-- 
PGP: 2FF9CD59612616B5      /~\  Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: user-bc188e45dae4@xymon.invalid  \ /  Say No to HTML in E-Mail and Usenet
Mail+Jabber: user-0064bde8d49d@xymon.invalid  X
https://axel.beckert.ch/   / \  I love long mails: https://email.is-not-s.ms/