Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build on macOS with cmake-rs #1455

Open
thewh1teagle opened this issue Dec 8, 2024 · 0 comments
Open

Can't build on macOS with cmake-rs #1455

thewh1teagle opened this issue Dec 8, 2024 · 0 comments

Comments

@thewh1teagle
Copy link

thewh1teagle commented Dec 8, 2024

🐛 Bug description

I'm trying to build the project _ and it failed with this error

  CMAKE_TOOLCHAIN_FILE_wasm32-unknown-unknown = None
  CMAKE_TOOLCHAIN_FILE_wasm32_unknown_unknown = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_wasm32-unknown-unknown = None
  CMAKE_GENERATOR_wasm32_unknown_unknown = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_wasm32-unknown-unknown = None
  CMAKE_PREFIX_PATH_wasm32_unknown_unknown = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_wasm32-unknown-unknown = None
  CMAKE_wasm32_unknown_unknown = None
  TARGET_CMAKE = None
  CMAKE = None
  running: cd "/Volumes/Internal/audio/aec-rs/target/wasm32-unknown-unknown/release/build/aec-rs-sys-a3910734bbe412bf/out/build" && CMAKE_PREFIX_PATH="" LC_ALL="C" "cmake" "/Volumes/Internal/audio/aec-rs/target/wasm32-unknown-unknown/release/build/aec-rs-sys-a3910734bbe412bf/out/speexdsp" "-DCMAKE_SYSTEM_NAME=unknown" "-DCMAKE_SYSTEM_PROCESSOR=wasm32" "-DCMAKE_INSTALL_PREFIX=/Volumes/Internal/audio/aec-rs/target/wasm32-unknown-unknown/release/build/aec-rs-sys-a3910734bbe412bf/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fno-exceptions --target=wasm32-unknown-unknown" "-DCMAKE_C_COMPILER=/opt/homebrew/bin/emcc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fno-exceptions --target=wasm32-unknown-unknown" "-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fno-exceptions --target=wasm32-unknown-unknown" "-DCMAKE_ASM_COMPILER=/opt/homebrew/bin/emcc" "-DCMAKE_BUILD_TYPE=Release"
  -- The C compiler identification is Clang 20.0.0
  -- The CXX compiler identification is Clang 19.1.5
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - failed
  -- Check for working C compiler: /opt/homebrew/bin/emcc
  -- Check for working C compiler: /opt/homebrew/bin/emcc - broken
  -- Configuring incomplete, errors occurred!

  --- stderr
  System is unknown to cmake, create:
  Platform/unknown to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
  System is unknown to cmake, create:
  Platform/unknown to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
  System is unknown to cmake, create:
  Platform/unknown to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
  CMake Error at /Applications/CMake.app/Contents/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
    The C compiler

      "/opt/homebrew/bin/emcc"

    is not able to compile a simple test program.

🤔 Expected Behavior

It should build without error

👟 Steps to reproduce

git clone --recursive -b feat/wasm https://github.com/thewh1teagle/aec-rs
cd aec-rs
brew install emscripten
rustup target add wasm32-unknown-emscripten
cargo build --release --target wasm32-unknown-emscripten
CC=emcc AR=emar wasm-pack build

🌍 Your environment

macos m1
wasm-pack version: wasm-pack 0.13.1
rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)

Looks like it choose wasm32-unknown-uknown instead of wasm32-unknown-emscripten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant