hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

Haxe app build failing on hxcpp_zlib during compilation

Open piotrzarzycki21 opened this issue 10 months ago • 3 comments

I was try to build my Haxe application on Mac OS Sequoia 15.4 and it's failing with following errors. On Mac OS Sequoia 15.1 build is successful.

Compiling group: hxcpp_zlib
xcrun --sdk macosx15.4 clang++ -I/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13 -DSTDC -DHAVE_UNISTD_H -Wno-unknown-warning -Wno-unknown-warning-option -Wno-deprecated-non-prototype -c -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -g -I/usr/local/lib/haxe/lib/hxcpp/git/include -DHX_MACOS -arch x86_64 -Wno-parentheses -Wno-null-dereference -Wno-unused-value -Wno-format-extra-args -Wno-overflow -Wno-bool-conversion -DHXCPP_DEBUG -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_CHECK_POINTER(haxe) -DHXCPP_STACK_TRACE(haxe) -DHXCPP_STACK_LINE(haxe) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=430(haxe) ... tags=[haxe,static]
 - /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.c  []
Error: In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.c:8:
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:170:11: warning: 'OS_CODE' macro redefined [-Wmacro-redefined]
  170 | #  define OS_CODE 19
      |           ^
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:141:11: note: previous definition is here
  141 | #  define OS_CODE  7
      |           ^
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.c:10:
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |                ^
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.c:10:
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: error: expected ')'
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: note: to match this '('
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:15: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |               ^
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.c:10:
In file included from /usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/gzguts.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: error: expected ')'
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:22: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7: note: to match this '('
/usr/local/lib/haxe/lib/hxcpp/git/project/thirdparty/zlib-1.2.13/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |              ^
1 warning and 3 errors generated.

piotrzarzycki21 avatar Apr 15 '25 10:04 piotrzarzycki21

Lime has similar problem and fixed with following commit: https://github.com/openfl/lime/commit/bc8f9df60f926cfa309040f998206fba30abd9cc

barisyild avatar Apr 15 '25 12:04 barisyild

Thanks @barisyild . I have switched my project to Lime develop branch, but it didn't help. I have still the same issue.

piotrzarzycki21 avatar Apr 16 '25 09:04 piotrzarzycki21

Thanks @barisyild . I have switched my project to Lime develop branch, but it didn't help. I have still the same issue.

Yeah just fixes lime side, hxcpp is still needs fixed.

barisyild avatar Apr 16 '25 13:04 barisyild