petersalomonsen / wasm-git

GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
Other
647 stars 37 forks source link

Can't compile WASM-GIT #84

Closed philipp-strack closed 7 months ago

philipp-strack commented 1 year ago

Hello,

first, thanks a lot for all you work on wasm-git it is an amazing piece of software. Unfortunately, I can't compile wasm-git:

configure: cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_C_FLAGS=  --pre-js /home/philipp/Schreibtisch/wasm-git/emscriptenbuild/pre.js --post-js /home/philipp/Schreibtisch/wasm-git/emscriptenbuild/post.js -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS','callMain']\" -lnodefs.js -lidbfs.js -s INVOKE_RUN=0 -s ALLOW_MEMORY_GROWTH=1 -s STACK_SIZE=131072" -DREGEX_BACKEND=regcomp -DSONAME=OFF -DUSE_HTTPS=OFF -DBUILD_SHARED_LIBS=OFF -DTHREADSAFE=OFF -DUSE_SSH=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=ON ../libgit2 -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node;--experimental-wasm-threads
-- Could NOT find Threads (missing: Threads_FOUND) 
-- Checking for module 'heimdal-gssapi'
--   Package 'heimdal-gssapi', required by 'virtual:world', not found
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR) 
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
-- http-parser version 2 was not found or disabled; using bundled 3rd-party sources.
-- Could NOT find PCRE (missing: PCRE_LIBRARY PCRE_INCLUDE_DIR) 
-- LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
-- zlib was not found; using bundled 3rd-party sources.
CMake Error at /snap/cmake/1328/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /snap/cmake/1328/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /snap/cmake/1328/share/cmake-3.27/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/CMakeLists.txt:136 (find_package)

-- Configuring incomplete, errors occurred!
emcmake: error: 'cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_C_FLAGS=  --pre-js /home/philipp/Schreibtisch/wasm-git/emscriptenbuild/pre.js --post-js /home/philipp/Schreibtisch/wasm-git/emscriptenbuild/post.js -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS','callMain']\" -lnodefs.js -lidbfs.js -s INVOKE_RUN=0 -s ALLOW_MEMORY_GROWTH=1 -s STACK_SIZE=131072" -DREGEX_BACKEND=regcomp -DSONAME=OFF -DUSE_HTTPS=OFF -DBUILD_SHARED_LIBS=OFF -DTHREADSAFE=OFF -DUSE_SSH=OFF -DBUILD_CLAR=OFF -DBUILD_EXAMPLES=ON ../libgit2 -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node;--experimental-wasm-threads' failed (returned 1)
make: make lg2
make: *** Keine Regel, um „lg2“ zu erstellen.  Schluss.
emmake: error: 'make lg2' failed (returned 2)

I am on ubuntu 23.04 and have

cmake version 3.27.3 libpthread-stubs0-dev Version: 0.4-1build2

installed. Thanks a lot for your help!

petersalomonsen commented 1 year ago

Hi,

There's a gitpod.yml which contains all that's needed to install on gitpod.io which use Ubuntu VMs. I just tried spinning up a new workspace, and it did compile ( just let the gitpod.yml scripts do the installation first, and then go to the emscriptenbuild folder and run ./build.sh.

Would you try forking and open in gitpod.io first, and then maybe compare with your own Ubuntu setup to see what's missing?

Thanks for checking out wasm-git :)

/Peter

philipp-strack commented 11 months ago

Thank you and please excuse my delayed reply. yes the project compiles on gitpod.io. Thanks again.