-
Notifications
You must be signed in to change notification settings - Fork 439
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
Unable to cross-compile magnum-based project for Emscripten #490
Comments
Attempted cmake commands looked like this:
all ends in the same error |
Hi,
No no, there's no conflict -- it's just that historically Emscripten's toolchain files were unreliable, broken in particular versions and doing too much / being too automatic, which is why Magnum provides its own, and adds Nowadays, ideally Magnum should be independent of the toolchain used and work with either, so this is a bug :) Unfortunately for you, people learned to use Magnum's toolchains exclusively for their Emscripten projects and so you're the first to discover this issue. Sorry about that. The
It shouldn't be (if you really use vanilla CMake), not sure what the ... well until I fix it, at least. I'll let you know when the dependency on |
Yes, I'm currently affected by 2 bugs:
The first one doesn't look like it is a toolchain file problem. I cleared the build dir and I can do the build (without using toolchain file provided by magnum). The problematic part was
I'm not sure either but I noticed:
So in short, the solution was to use it just as emscripten recommends: use |
The |
Hm, looks like I closed too soon. Reopening until I'm sure the LTO / ar related issues are resolved. And mosra/toolchains#13 is also related. |
The LTO and ar issues are finally fixed with mosra/toolchains#14 and the toolchains submodule is updated to include these in 14477c8. |
I have successfully installed Emscripten on Windows but when I'm trying to build my project for Emscripten the configuration fails with this error:
magnum/CMakeLists.txt
seems to try to includeUseEmscripten.cmake
but this file is located inmagnum/toolchains/modules
. I think that the relative path is wrong - the file is in a different directory:magnum/CMakeLists.txt
Lines 294 to 296 in 515bfce
Few notes:
magnum
,magnum-integration
andcorrade
(all from theirmaster
).emcmake cmake
and then input my all flags as usual.emcmake
adds extra cmake flags, includingCMAKE_TOOLCHAIN_FILE
which has different path value from one recommended in corrade docs.cmake ...
oremcmake cmake ...
in emscripten-activated shell.add_subdirectory
within my CMake files. I would like to keep this approach. It works very well.emcmake cmake ...
instead ofcmake ...
andemmake make
instead ofmake
). A lot of my dependencies are recursively git-submoduled and are added usingadd_subdirectory
in my CMake files (this also applies to magnum and corrade). This forms some dependency chain in CMake recipes and when I tell CMake to build everything it performs incremental build flawlessly.The text was updated successfully, but these errors were encountered: