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

Compiling corrade and magnum separately for web-assembly #283

Closed
sunayana opened this issue Sep 9, 2018 · 3 comments
Closed

Compiling corrade and magnum separately for web-assembly #283

sunayana opened this issue Sep 9, 2018 · 3 comments

Comments

@sunayana
Copy link

sunayana commented Sep 9, 2018

Hello,

I am having problems installing magnum separately for web-assembly, these are the steps I took :

  1. Installed corrade successully with emscripten from corrade/build-emscripten/ using the following command:
cmake .. -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system
cmake --build .
cmake --build . --target install
  1. While trying to install magnum from magnum/build-emscripten/ directory using the following set of commands:
    cmake .. -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system/ -DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system/ -DMAGNUM_DEPLOY_PREFIX=/srv/http/magnum

I get the following error:

CMake Error at /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Corrade (missing: CORRADE_INCLUDE_DIR
  _CORRADE_CONFIGURE_FILE)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  modules/FindCorrade.cmake:281 (find_package_handle_standard_args)
  CMakeLists.txt:60 (find_package)


-- Configuring incomplete, errors occurred!

Although corrade has been successfully installed. Could you point out if I have missed something while trying to install corrade and magnum separately.

Thanks
Sunayana

@mosra
Copy link
Owner

mosra commented Sep 9, 2018

Hi,

can you try pointing CMAKE_FIND_ROOT_PATH to your install location as well? Like this:

cmake .. \
    -DCMAKE_TOOLCHAIN_FILE="../toolchains/generic/Emscripten-wasm.cmake" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system/ \
    -DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system/ \
    -DCMAKE_FIND_ROOT_PATH=/usr/lib/emscripten/system/ \
    -DMAGNUM_DEPLOY_PREFIX=/srv/http/magnum

I am not exactly sure why is this happening (sometimes it's needed, sometimes not). I need to investigate and invent a fix so this is not needed, but at the moment this should hopefully do the trick.

Sometimes just rerunning CMake for the second time works too ¯\_(ツ)_/¯.

@mosra mosra added this to the 2018.0c milestone Sep 9, 2018
@mosra mosra added this to TODO in Project management via automation Sep 9, 2018
@mosra mosra mentioned this issue Sep 9, 2018
56 tasks
@sunayana
Copy link
Author

Hello,

That worked, thank you very much :)

@mosra mosra moved this from TODO to In progress in Project management Sep 14, 2018
@mosra mosra closed this as completed Sep 14, 2018
Project management automation moved this from In progress to Done Sep 14, 2018
@mosra mosra reopened this Sep 14, 2018
Project management automation moved this from Done to In progress Sep 14, 2018
@mosra mosra self-assigned this Sep 14, 2018
@mosra
Copy link
Owner

mosra commented Oct 21, 2018

The toolchain is fixed to no longer require an explicit CMAKE_PREFIX_PATH in mosra/toolchains@cbd9843 (all submodules in Magnum projects are updated to use it). Should hopefully fix the above case as well.

@mosra mosra closed this as completed Oct 21, 2018
Project management automation moved this from In progress to Done Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants