kou commented on PR #37821:
URL: https://github.com/apache/arrow/pull/37821#issuecomment-1749614525

   > I don't have those threading changes in by the way - emscripten has a stub 
for pthreads, so it should build okay.
   
   OK. I checked CMake's log again, `find_package(Threads REQUIRED)` failed 
with another problem (`pic/` doesn't exist for `libz.a` path):
   
   ```text
           FAILED: CMakeFiles/cmTC_7a54a.dir/CheckForPthreads.c.o 
           /bin/emcc   -Qunused-arguments -sUSE_ZLIB=1  -fPIC -fexceptions  
-std=gnu11 -fPIE -MD -MT CMakeFiles/cmTC_7a54a.dir/CheckForPthreads.c.o -MF 
   CMakeFiles/cmTC_7a54a.dir/CheckForPthreads.c.o.d -o 
CMakeFiles/cmTC_7a54a.dir/CheckForPthreads.c.o -c 
/home/kou/work/cpp/arrow.kou/cpp.build.emscripten/CMakeFiles/CMakeScratch/TryCompile-jKLYqN/CheckForPthreads.c
           Traceback (most recent call last):
             File "/usr/share/emscripten/emcc.py", line 3947, in <module>
               sys.exit(main(sys.argv))
                        ^^^^^^^^^^^^^^
             File "/usr/lib/python3.11/contextlib.py", line 81, in inner
               return func(*args, **kwds)
                      ^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/emcc.py", line 3940, in main
               ret = run(args)
                     ^^^^^^^^^
             File "/usr/share/emscripten/emcc.py", line 1151, in run
               linker_inputs = phase_compile_inputs(options, state, newargs, 
input_files)
                               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             File "/usr/lib/python3.11/contextlib.py", line 81, in inner
               return func(*args, **kwds)
                      ^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/emcc.py", line 2677, in 
phase_compile_inputs
               compile_source_file(i, input_file)
             File "/usr/share/emscripten/emcc.py", line 2657, in 
compile_source_file
               cmd = get_clang_command(input_file)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/emcc.py", line 2598, in 
get_clang_command
               return get_compiler(src_file) + get_cflags(state.orig_args) + 
compile_args + [src_file]
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/emcc.py", line 903, in get_cflags
               ports.add_cflags(cflags, settings)
             File "/usr/share/emscripten/tools/ports/__init__.py", line 364, in 
add_cflags
               port.get(Ports, settings, shared)
             File "/usr/share/emscripten/tools/ports/zlib.py", line 46, in get
               return [shared.Cache.get_lib('libz.a', create, what='port')]
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/tools/cache.py", line 139, in get_lib
               return self.get(name, *args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             File "/usr/share/emscripten/tools/cache.py", line 154, in get
               raise Exception(f'FROZEN_CACHE is set, but cache file is 
missing: "{shortname}" (in cache root path "{self.dirname}")')
           Exception: FROZEN_CACHE is set, but cache file is missing: 
"sysroot/lib/wasm32-emscripten/libz.a" (in cache root path 
"/usr/share/emscripten/
   cache")
           ninja: build stopped: subcommand failed.
   ```
   
   Anyway, let's remove `Threads::Threads` dependency because it's needless for 
`ARROW_ENABLE_THREADING=OFF`: https://github.com/apache/arrow/issues/38055


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