{"issue":{"title":"Compilation fails on zcrypt phase","user":{"login":"lyarbean","id":352324,"url":"https://api.github.com/users/lyarbean","avatar_url":"https://secure.gravatar.com/avatar/5a4bab12fc5d64e6b8410eb8694ccc56?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5a4bab12fc5d64e6b8410eb8694ccc56"},"created_at":"2011-12-19T16:37:22Z","milestone":null,"state":"open","updated_at":"2011-12-29T03:38:12Z","labels":[],"id":2602537,"closed_at":null,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/issues/1160","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Compilation fails on Gentoo Linux:\r\nIn file included from /mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:14:0:                                                          \r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:38:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:39:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:40:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:41:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:42:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:43:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:44:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:48:5: error: expected specifier-qualifier-list before 'open_file_func'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.h:60:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:32:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:37:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:43:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:49:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:53:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:59:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:63:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c: In function 'fill_fopen_filefunc':\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:169:23: error: 'zlib_filefunc_def' has no member named 'zopen_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:170:23: error: 'zlib_filefunc_def' has no member named 'zread_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:171:23: error: 'zlib_filefunc_def' has no member named 'zwrite_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:172:23: error: 'zlib_filefunc_def' has no member named 'ztell_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:173:23: error: 'zlib_filefunc_def' has no member named 'zseek_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:174:23: error: 'zlib_filefunc_def' has no member named 'zclose_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:175:23: error: 'zlib_filefunc_def' has no member named 'zerror_file'\r\n/mnt/data/Git_Repo/HPCC-Platform/system/security/zcrypt/ioapi.c:176:23: error: 'zlib_filefunc_def' has no member named 'opaque'\r\nmake[2]: *** [system/security/zcrypt/CMakeFiles/zcrypt.dir/ioapi.c.o] Error 1","number":1160,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/1160","comments":2,"assignee":null},"comment":{"user":{"login":"lyarbean","id":352324,"url":"https://api.github.com/users/lyarbean","avatar_url":"https://secure.gravatar.com/avatar/5a4bab12fc5d64e6b8410eb8694ccc56?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5a4bab12fc5d64e6b8410eb8694ccc56"},"created_at":"2011-12-29T03:38:11Z","updated_at":"2011-12-29T03:38:11Z","id":3297822,"body":"I think it a issue on zlib header on Gentoo Linux, there is no OF defined in those header. Beside this issue,  two errors break compilation, one is a conflicting declaration of USE_JLIB_ALLOC_HOOK, and the other is also a Gentoo issueI guess. As Gentoo  doesn't enable ICU for XANLAN-C, there is no libxalanMsg available. I have made a patch to resolve these issues.\r\n\r\n\r\ndiff --git a/cmake_modules/FindXALAN.cmake b/cmake_modules/FindXALAN.cmake\r\nindex aa34432..eaaaddb 100644\r\n--- a/cmake_modules/FindXALAN.cmake\r\n+++ b/cmake_modules/FindXALAN.cmake\r\n@@ -65,7 +65,7 @@ IF (NOT XALAN_FOUND)\r\n       STRING(REPLACE \"Xalan-C_1\" \"Xalan-C_1D\" XALAN_DEBUG_LIBRARIES \"${XALAN_LIBRARIES}\")\r\n       set (XALAN_LIBRARIES optimized ${XALAN_LIBRARIES} debug ${XALAN_DEBUG_LIBRARIES})\r\n     ELSE()\r\n-      STRING(REPLACE \"xalan-c\" \"xalanMsg\" XALAN_EXTRA_LIBRARIES \"${XALAN_LIBRARIES}\")\r\n+      STRING(REPLACE \"xalan-c\" \"xalan-c\" XALAN_EXTRA_LIBRARIES \"${XALAN_LIBRARIES}\")\r\n       set (XALAN_LIBRARIES ${XALAN_LIBRARIES} ${XALAN_EXTRA_LIBRARIES})\r\n     ENDIF()\r\n   ENDIF()\r\ndiff --git a/system/jlib/jdebug.hpp b/system/jlib/jdebug.hpp\r\nindex 3e33906..bd9d3b9 100644\r\n--- a/system/jlib/jdebug.hpp\r\n+++ b/system/jlib/jdebug.hpp\r\n@@ -244,7 +244,7 @@ __int64 jlib_decl getTotalMem();\r\n unsigned jlib_decl setAllocHook(bool on);  // bwd compat returns unsigned\r\n \r\n #ifdef __linux__\r\n-#define USE_JLIB_ALLOC_HOOK extern void jlib_decl jlib_init_hook(); void (*__malloc_initialize_hook) (void) = jlib_init_hook;       \r\n+#define USE_JLIB_ALLOC_HOOK extern void jlib_decl jlib_init_hook(); void (*volatile __malloc_initialize_hook) (void) = jlib_init_hook;       \r\n #else\r\n #define USE_JLIB_ALLOC_HOOK\r\n #endif\r\ndiff --git a/system/security/zcrypt/ioapi.h b/system/security/zcrypt/ioapi.h\r\nindex 7d457ba..76b9102 100644\r\n--- a/system/security/zcrypt/ioapi.h\r\n+++ b/system/security/zcrypt/ioapi.h\r\n@@ -14,6 +14,10 @@\r\n #define ZLIB_FILEFUNC_SEEK_END (2)\r\n #define ZLIB_FILEFUNC_SEEK_SET (0)\r\n \r\n+#ifndef OF\r\n+#define OF(x) x\r\n+#endif\r\n+\r\n #define ZLIB_FILEFUNC_MODE_READ      (1)\r\n #define ZLIB_FILEFUNC_MODE_WRITE     (2)\r\n #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)\r\n","url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments/3297822"},"action":"created"}