Xymon Mailing List Archive search

Building the client on Mac OS X 10.6 -> success

list Elmar Heeb
Mon, 13 Dec 2010 16:10:48 +0100
Message-Id: <user-a915590de4f7@xymon.invalid>

Hi

I tried to compile the xymon client on Mac OS X 10.6 and ran into the same problem that was reported about a year ago[1].  The problem comes from a namespace collision because the system include files on the Mac now have a file called Availability.h which is meant to be included by /usr/include/stdlib.h .  However, xymon has a file lib/availability.h which gets included instead.

Unfortunately, the default behaviour for the Mac HFS+ file system is to ignore case so the two files get mixed up.  The solution to this is fairly simple.  Just drop the -I. from the CFLAGS options.  Having -I. should not be necessary anyway because the preprocessor differentiates between #include <file.h> and #include "file.h" precisely to separate system includes from project includes.

Once this problem is solved, there are two more problems that will arise.  The first one would be the same on all platforms whenever xymon is built without SSL support (not needed on the client).  In lib/sendmsg.c TALK_SSLWRITE_RECEIVE will be referenced even though the enum only goes up to TALK_RECEIVE when HAVE_OPENSSL is not defined.

The second problem ist with the zlib where the dynamic library for Mac OS X is in /usr/lib/libz.dylib which does not get search.

The attached patch fixes all three problems and the Mac OS X client builds successfully.

Hope this helps.

Regards,     -- Elmar


[1] http://www.xymon.com/archive/2009/11/msg00311.html

-- 
Dr. Elmar S. Heeb <user-49eb29db847d@xymon.invalid>   support: +41 44 633 26 68
IT Services Group, HPT D 19               voice: +41 44 633 25 91
Department of Physics, ETH Zurich        mobile: +XX XX XXX XX XX
CH-8093 Zurich, Switzerland              http://nic.phys.ethz.ch/
Please consider the environment before printing this e-mail