emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
2.96k stars 676 forks source link

Resume failed install from source after missing dependency without recompiling everything #1283

Closed Akinetopsia1 closed 10 months ago

Akinetopsia1 commented 11 months ago

I couldn't find a discussion section, so posting here even though this is more of a question.

precompiled installs are not available on raspberry pi and takes 6-7 hours to compile, only to fail at the end because of missing dependencies that aren't tested for at the beginning.

Fixing those and reissuing the emsdk install command recompiles everything that was already compiled successfully, again.

I am now at my 3rd attempt, using older commits closer to my Buster release (I can't really upgrade for that project). Short of setting up a cross compiler to make things faster (but that's its own can of worms) Is there any way to resume the install from what was already done ? 99% of it was successful

I glanced at the code for command switches but it doesn't appear to have anything that would allow resume - it wants to redo everything


Edit: i found all the output files in /emscripten/main/, managed to get those running, but now i have the issue that clang / llvm is very outdated (LLVM version for clang executable "/usr/bin/clang" appears incorrect (seeing "7.0", expected "18")) nm, llvm is also compiled. That was from the default config. In short things were compiled but not installed so i have to point to the specific bin folders in my source folder, as the install is not complete.

I'm trying to compile stellarium-web for an astronomy project, trying to do so I get emcc: error: linker setting ignored during compilation: 'MODULARIZE'

Googling, it may rely on version 1.40.1 so i'll have to start over anyway.

I think i'm just going to call it a day.

sbc100 commented 11 months ago

Is there some reason you can't use the pre-compiled arm64/linux binaries? We don't provide them for all releases but we update them from time to time. You can install the latest binaries that we ship using emsdk install latest-arm64-linux, and you can see what version they correspond to here: https://github.com/emscripten-core/emsdk/blob/d42c740aa51b961d6e18b649754d2cae8807a277/emscripten-releases-tags.json#L5

Out of interest why are you interested in running the build on a raspberry pi? Do you not have a more powerful laptop or desktop to run on, or is there some other reason?

Akinetopsia1 commented 10 months ago

I'm using a 32bit 3rd-party raspberry image geared for astronomy i'm kind of stuck with, and the precompiled 32 bit versions of emsdk are not provided by the installer. I thought i mentioned it but i might've edited out by mistake.

As for why i was trying to compile on the pi from source, i needed to compile stellarium-web-engine, which requires it to build some native components from what i gathered.

In the end i opted to try stellarium-web first on an ubuntu vm, turns out once built the current repo has a bunch of errors itself (blocked CORS requests and reliance on outdated VueJS making their examples non-functional and their documentation is non-existent.

At that point i gave up, found a vanilla javascript library (virtualSky) that took 30 seconds to setup and get running, which is all i really wanted - light, simple and no convoluted over-reliance on a gazillion frameworks.

I've setup a cross-compiler for the future but that will be my first experience doing so. Eventually i'll just take all my customization on a more recent raspi image with the latest software packages.