Forum: CFEngine Help Subject: Building Tokyo Cabinet 1.4.47 on HP-UX 11.11 Author: mvpel Link to topic: https://cfengine.com/forum/read.php?3,25817,25817#msg-25817
Hi folks, I'm working on a build of CFengine 3.3.0 on HP-UX, and so far it's not going too badly. I had to deal with a couple of issues in Tokyo Cabinet 1.4.47: *** tcucodec.c.orig Thu May 3 14:28:11 2012 --- tcucodec.c Thu May 3 15:33:42 2012 *************** *** 17,22 **** --- 17,35 ---- #include #include "myconf.h" + #ifdef _SYS_HPUX_ + #ifndef SIZE_MAX + #define SIZE_MAX ((size_t)-1) + #endif + + #if !defined(INTPTR_MAX) || (defined(INTPTR_MAX) && !(INTPTR_MAX+0)) + #ifdef __LP64__ + #define INTPTR_MAX INT64_MAX + #else + #define INTPTR_MAX INT32_MAX + #endif + #endif + #endif /* global variables */ const char *g_progname; // program name You also need the following definitions in the Makefile CFLAGS: -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_XOPEN_SOURCE_EXTENDED -D_INCLUDE_HPUX_SOURCE And I found a typo on line 4045 in tctdb.c, it uses "HUGE_VALL" instead of "HUGE_VAL." And in the Makefile, when building for PA-RISC with GCC, you need to replace the non-SunOS "-soname" option with: "-Wl,+b,$(DESTDIR)$(LIBDIR)/libtokyocabinet.so.$(LIBVER) Finally, the Makefile installs the shared libs as ".so" rather than ".sl" which doesn't work on PA-RISC - I just symlinked the .sl name to the .so name after install, but it would probably be better to fix that within the Makefile. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine