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

make error #19

Open
smallsao opened this issue Jul 9, 2024 · 2 comments
Open

make error #19

smallsao opened this issue Jul 9, 2024 · 2 comments

Comments

@smallsao
Copy link

smallsao commented Jul 9, 2024

mkdir build
cd build
emcmake cmake ..
make

when I do make , something is error

[ 50%] Building CXX object src/CMakeFiles/mujoco_wasm.dir/main.genned.cc.o
[100%] Linking CXX executable /Downloads/mujoco_wasm-main/dist/mujoco_wasm.js
error: undefined symbol: saveSetjmp (referenced by root reference (e.g. compiled C/C++ code))
warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _saveSetjmp may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: testSetjmp (referenced by root reference (e.g. compiled C/C++ code))
warning: _testSetjmp may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: '/home/zy/Downloads/emsdk/node/18.20.3_64bit/bin/node /home/zy/Downloads/emsdk/upstream/emscripten/src/compiler.mjs /tmp/tmpfhv1mae3.json' failed (returned 1)
make[2]: *** [src/CMakeFiles/mujoco_wasm.dir/build.make:100:/home/zy/Downloads/mujoco_wasm-main/dist/mujoco_wasm.js] 错误 1
make[1]: *** [CMakeFiles/Makefile2:98:src/CMakeFiles/mujoco_wasm.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2

cmake version 3.28.3
ubuntu 22.04

@schlagercollin
Copy link

Same issue here. @smallsao were you able to resolve this?

Ubuntu: 22.04.3
CMake: 3.22.1
Commit: 4759515

@schlagercollin
Copy link

Same issue here. @smallsao were you able to resolve this?

Ubuntu: 22.04.3 CMake: 3.22.1 Commit: 4759515

Following up. Looks like the MuJoCo source will need to be re-compiled with the latest version of Emscripten.

Related issue: emscripten-core/emscripten#21756

The fix is to use a slightly earlier version of Enscripten -- e.g. 3.1.56 instead of 3.1.57.

# install and use `3.1.56`
cd <your-emscripten-cloned-github-folder>
./emsdk install 3.1.56 &&  ./emsdk activate 3.1.56 && source ./emsdk_env.sh

# re-build mujoco_wasm (as per the README instructions)
cd <your-mujoco_wasm-github-folder>
mkdir build
cd build
emcmake cmake ..
make

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

2 participants