kou commented on issue #45032:
URL: https://github.com/apache/arrow/issues/45032#issuecomment-2556093994

   Thanks.
   
   I also tried cross-compiling on Debian GNU/Linux sid with:
   * Meson: 1.5.0
   * MinGW-w64: `x86_64-w64-mingw32-gcc (GCC) 13-win32`
   * Zstandard: dev
   
   `target_x86_64-w64-mingw32.meson`:
   
   <details>
   
   ```text
   [binaries]
   c = '/bin/x86_64-w64-mingw32-gcc'
   cpp = '/bin/x86_64-w64-mingw32-g++'
   fortran = '/bin/x86_64-w64-mingw32-gfortran'
   objc = '/bin/x86_64-w64-mingw32-cc'
   ar = '/bin/x86_64-w64-mingw32-ar'
   ld = 'bfd'
   cpp_ld = 'bfd'
   c_ld = 'bfd'
   nm = '/bin/x86_64-w64-mingw32-nm'
   strip = '/bin/x86_64-w64-mingw32-strip'
   pkg-config = '/bin/pkgconf'
   
   [built-in options]
   c_args = ['-I/tmp/zstd/destdir/include']
   cpp_args = ['-I/tmp/zstd/destdir/include']
   fortran_args = ['-I/tmp/zstd/destdir/include']
   objc_args = ['-I/tmp/zstd/destdir/include', '-x', 'objective-c']
   c_link_args = ['-L/tmp/zstd/destdir/bin']
   cpp_link_args = ['-L/tmp/zstd/destdir/bin']
   fortran_link_args = ['-L/tmp/zstd/destdir/bin']
   objc_link_args = ['-L/tmp/zstd/destdir/bin']
   prefix = '/tmp/zstd/destdir'
   
   [properties]
   needs_exe_wrapper = true
   cmake_toolchain_file = '/tmp/target_x86_64-w64-mingw32.cmake'
   cmake_defaults = false
   
   [build_machine]
   system = 'linux'
   cpu_family = 'x86_64'
   cpu = 'x86_64'
   endian = 'little'
   
   [host_machine]
   system = 'windows'
   cpu_family = 'x86_64'
   cpu = 'x86_64'
   endian = 'little'
   ```
   
   </details>
   
   `target_x86_64-w64-mingw32.cmake`:
   
   <details>
   
   ```text
   set(CMAKE_HOST_SYSTEM_NAME Linux)
   set(CMAKE_HOST_SYSTEM_PROCESSOR x86_64)
   execute_process(COMMAND /bin/uname -r OUTPUT_VARIABLE 
CMAKE_HOST_SYSTEM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
   set(CMAKE_SYSTEM_NAME Windows)
   set(CMAKE_SYSTEM_PROCESSOR x86_64)
   execute_process(COMMAND /usr/bin/uname -r OUTPUT_VARIABLE 
CMAKE_SYSTEM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
   
   set(CMAKE_SYSROOT /usr/x86_64-w64-mingw32/)
   set(CMAKE_INSTALL_PREFIX $ENV{prefix})
   
   set(CMAKE_C_COMPILER   /bin/x86_64-w64-mingw32-gcc)
   set(CMAKE_CXX_COMPILER /bin/x86_64-w64-mingw32-g++)
   set(CMAKE_Fortran_COMPILER /bin/x86_64-w64-mingw32-gfortran)
   
   set(CMAKE_LINKER  /bin/x86_64-w64-mingw32-ld)
   set(CMAKE_OBJCOPY /bin/x86_64-w64-mingw32-objcopy)
   
   set(CMAKE_AR     /bin/x86_64-w64-mingw32-ar)
   set(CMAKE_NM     /bin/x86_64-w64-mingw32-nm)
   set(CMAKE_RANLIB /bin/x86_64-w64-mingw32-ranlib)
   
   if( $ENV{CC} MATCHES ccache )
       set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
   endif()
   ```
   
   </details>
   
   It didn't reproduce this problem. (`libzstd.dll.a` doesn't have `wcrtomb`.)
   
   The diff between my build log and the attached verbose build log show that 
`-pthread` is used with Yggdrasil.
   
   It's related to 
https://github.com/facebook/zstd/commit/5be2a8721d527ae349539b459b35fb628467e00d
 . So I also tried Zstandard 1.5.6 that is used by Yggdrasil.
   
   The `-pthread` diff was disappeared with Zstandard 1.5.6 but this problem 
wasn't reproduced. (`libzstd.dll.a` doesn't have `wcrtomb`.)
   
   MinGW version may be related. It seems that Yggdrasil uses 4.8.5. Can we try 
newer MinGW-w64 in Yggdrasil?


-- 
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]

Reply via email to