zml1206 opened a new issue, #10155:
URL: https://github.com/apache/incubator-gluten/issues/10155

   ### Problem description
   
   There are the following errors:
   1. clang 17 and arrow's built-in zlib are incompatible
   ```
   [34/277] Performing build step for 'zlib_ep'
   FAILED: [code=1] zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build 
zlib_ep/src/zlib_ep-install/lib/libz.a 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build
 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep/src/zlib_ep-install/lib/libz.a
 
   cd 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-build
 && /opt/homebrew/bin/cmake -P 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build-RELEASE.cmake
 && /opt/homebrew/bin/cmake -E touch 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build
   CMake Error at 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build-RELEASE.cmake:37
 (message):
     Command failed: 1
      '/opt/homebrew/bin/cmake' '--build' '.'
     See also
       
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-build-*.log
   -- stdout output is:
   ...skipping to end...
   /src/zlib_ep/gzguts.h:21:
   In file included from 
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
   
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7:
 error: expected ')'
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.h:147:33:
 note: expanded from macro 'fdopen'
     147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
         |                                 ^
   
/Library/Developer/CommandLineTools/usr/lib/clang/17/include/__stddef_null.h:26:16:
 note: expanded from macro 'NULL'
      26 | #define NULL ((void*)0)
         |                ^
   
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7:
 note: to match this '('
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.h:147:33:
 note: expanded from macro 'fdopen'
     147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
         |                                 ^
   
/Library/Developer/CommandLineTools/usr/lib/clang/17/include/__stddef_null.h:26:15:
 note: expanded from macro 'NULL'
      26 | #define NULL ((void*)0)
         |               ^
   In file included from 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.c:10:
   In file included from 
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/gzguts.h:21:
   In file included from 
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/stdio.h:61:
   
/Library/Developer/CommandLineTools/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));
         |          ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.h:147:33:
 note: expanded from macro 'fdopen'
     147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
         |                                 ^
   
/Library/Developer/CommandLineTools/usr/lib/clang/17/include/__stddef_null.h:26:22:
 note: expanded from macro 'NULL'
      26 | #define NULL ((void*)0)
         |                      ^
   
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/_stdio.h:318:7:
 note: to match this '('
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.h:147:33:
 note: expanded from macro 'fdopen'
     147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
         |                                 ^
   
/Library/Developer/CommandLineTools/usr/lib/clang/17/include/__stddef_null.h:26:14:
 note: expanded from macro 'NULL'
      26 | #define NULL ((void*)0)
         |              ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.c:135:22:
 warning: a function definition without a prototype is deprecated in all 
versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
     135 | const char * ZEXPORT zError(err)
         |                      ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.c:307:22:
 warning: a function definition without a prototype is deprecated in all 
versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
     307 | voidpf ZLIB_INTERNAL zcalloc(opaque, items, size)
         |                      ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/_ep/arrow_ep/cpp/_build/zlib_ep-prefix/src/zlib_ep/zutil.c:317:20:
 warning: a function definition without a prototype is deprecated in all 
versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
     317 | void ZLIB_INTERNAL zcfree(opaque, ptr)
         |                    ^
   4 warnings and 3 errors generated.
   ```
   2. Compiling gluten cpp with wrong CMAKE_PREFIX_PATH
   ```
   Velox module final CMAKE_CXX_FLAGS= -Wno-macro-redefined       
-Wno-nullability-completeness       -Wno-pessimizing-move       
-Wno-mismatched-tags       -Wno-implicit-int-float-conversion       
-Wno-nullability-completeness       -Wno-mismatched-tags       
-Wno-error=unused-private-field       -Wno-error=pessimizing-move       -Wall   
     -Wno-sign-compare        -Wno-comment        -Werror        
-Wno-error=parentheses        -Wno-error=unused-function        
-Wno-error=unused-variable        -Wno-strict-aliasing        
-Wno-ignored-qualifiers        -Wno-deprecated-declarations        
-Wno-attributes -mcpu=apple-m1+crc
   CMake Error at velox/CMakeLists.txt:205 (find_package):
     Could not find a package configuration file provided by "Folly" with any of
     the following names:
   
       FollyConfig.cmake
       folly-config.cmake
   
     Add the installation prefix of "Folly" to CMAKE_PREFIX_PATH or set
     "Folly_DIR" to a directory containing one of the above files.  If "Folly"
     provides a separate development package or SDK, be sure it has been
     installed.
   ```
   3. Arrow was reinstalled in setup-macos.sh, causing the patch to be lost
   ```
   [ 21%] Building CXX object 
core/CMakeFiles/gluten.dir/memory/MemoryAllocator.cc.o
   In file included from 
/Users/zml/Desktop/git_hub/incubator-gluten/cpp/core/compute/ResultIterator.cc:18:
   In file included from 
/Users/zml/Desktop/git_hub/incubator-gluten/cpp/core/compute/ResultIterator.h:20:
   In file included from 
/Users/zml/Desktop/git_hub/incubator-gluten/cpp/core/memory/ColumnarBatch.h:23:
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:53:3:
 error: use of undeclared identifier 'assert'
      53 |   assert(dest != src);
         |   ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:54:3:
 error: use of undeclared identifier 'assert'
      54 |   assert(!ArrowSchemaIsReleased(src));
         |   ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:81:3:
 error: use of undeclared identifier 'assert'
      81 |   assert(dest != src);
         |   ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:82:3:
 error: use of undeclared identifier 'assert'
      82 |   assert(!ArrowArrayIsReleased(src));
         |   ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:112:3:
 error: use of undeclared identifier 'assert'
     112 |   assert(dest != src);
         |   ^
   
/Users/zml/Desktop/git_hub/incubator-gluten/ep/build-velox/build/velox_ep/deps-install/include/arrow/c/helpers.h:113:3:
 error: use of undeclared identifier 'assert'
     113 |   assert(!ArrowArrayStreamIsReleased(src));
         |   ^
   6 errors generated.
   ```
   
   ### System information
   
   Gluten Version: 1.5.0-SNAPSHOT
   Commit: 9752348d08d40963e5f9c898d6394274a4cc30ee
   CMake Version: 3.31.6
   System: Darwin-24.3.0
   Arch: arm64
   CPU Name: 
   C++ Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
   C++ Compiler Version: 17.0.0.17000013
   C Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
   C Compiler Version: 17.0.0.17000013
   CMake Prefix Path: 
/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr;/opt/homebrew;/usr/local;/usr;/;/opt/homebrew;/usr/local;/usr/X11R6;/usr/pkg;/opt;/sw;/opt/local
   
   ### CMake log
   
   ```bash
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to