Xymon Mailing List Archive search

Can't compile 4.3.28 on Ubuntu 18

3 messages in this thread

list Shawn Heisey · Tue, 29 Jan 2019 12:17:36 -0700 ·
I'm trying to get myself a new server set up.  It's running Ubuntu 18. I downloaded the source for xymon 4.3.28, installed all of the optional dependencies except the LDAP libraries, ran ./configure, 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.

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, 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.

How should I handle this?  Should I open a bug report somewhere?  Since the compilation problem doesn't exist in trunk, does that part need reporting, or just the install problems?  I saw the recent thread about how old the latest Xymon is, and I share the concern about how that affects people's perception of the project.

Thanks,
Shawn
list Axel Beckert · Tue, 29 Jan 2019 20:46:47 +0100 ·
Hi,
▸ quoted from Shawn Heisey

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).
▸ quoted from Shawn Heisey
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.
▸ quoted from Shawn Heisey
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
▸ quoted from Shawn Heisey
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.
▸ quoted from Shawn Heisey
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/
list David · Tue, 29 Jan 2019 12:03:22 -0800 ·
I had been facing the same problem on a device here and finally stumbled on this link:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887633

Short answer is a necessary include statement to get the right libraries involved.

Hopefully it resolves your problem as well.
▸ quoted from Shawn Heisey


On 1/29/19 11:17 AM, Shawn Heisey wrote:
I'm trying to get myself a new server set up.  It's running Ubuntu 18. I downloaded the source for xymon 4.3.28, installed all of the optional dependencies except the LDAP libraries, ran ./configure, 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.

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, 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.

How should I handle this?  Should I open a bug report somewhere?  Since the compilation problem doesn't exist in trunk, does that part need reporting, or just the install problems?  I saw the recent thread about how old the latest Xymon is, and I share the concern about how that affects people's perception of the project.

Thanks,
Shawn