.emscripten config not picked up

63 views
Skip to first unread message

r0l...@freemail.hu

unread,
Aug 26, 2020, 11:55:49 AM8/26/20
to emscripten-discuss

Hi All,

I've just installed and activated emsdk 1.39.8 on my NetBSD box and as it unfortunately cannot be built from source I built binaryen and fastcomp separately so that I can simply set up my .emscripten config so that LLVM_ROOT and BINARYEN_ROOT point to those directories. So the relevant paths look like this in emsdk/.emscripten:

LLVM_ROOT = '/home/r0ller/fastcomp/emscripten-fastcomp/build'
BINARYEN_ROOT = ' /home/r0ller/binaryen'
EMSCRIPTEN_ROOT = emsdk_path + '/upstream/emscripten'

However, no matter what I set up for LLVM_ROOT or BINARYEN_ROOT (paths ending in /bin or not as above), when issuing 'source emsdk_env.sh', it spits out only one environment variable that gets set up:

EMSDK = /home/r0ller/emsdk

What am I doing wrong? By the way, is there any way to build 1.39.8 from source like certain tagged versions?

Thanks&regards,
r0ller
Message has been deleted

Sam Clegg

unread,
Aug 27, 2020, 3:23:05 PM8/27/20
to emscripte...@googlegroups.com
This is because emsdk doesn't read the config file at all, it only writes it during `activate`.

I think that is doing on is that emsdk is not aware that you have installed binaryen or llvm so it doesn't think those tool are part of the config. Tools have to be "activate"d before emsdk will consider them part of the config I believe.

If you are building your own tools and writing your own `.emscripten` file I suggest you put the config file in the `emscripten` directory itself.    This is the first place emscripten will look for the config file (alongside emcc).

Then you should be able to simply add the emscripten directory to your PATH and avoid emsdk_env completely. (since you are not really using the emsdk at this point).

Should we look into the reasons why "it unfortunately cannot be built from source"?  Is it a netbsd specific thing?   

cheers,
sam



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/c5e813b3-37f7-4b30-9bd0-9e4fbac1cdecn%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

r0ller r0ller

unread,
Sep 7, 2020, 3:44:46 PM9/7/20
to emscripten-discuss
Hi Sam,
 
Thanks for the explanation. Actually, that's what I concluded myself so I just wrote my own .emscripten config (LLVM_ROOT path above was actually not correct as I had to point it to the directory where the package manager installed llvm) and copied it to my home and to the emsdk directory as well which kicked the whole stuff in but as you mentioned I don't need to use emsdk_env.sh at all. Now even my QtCreator recognises emscripten and can compile qt programs to wasm :)
 
Concerning source compilation of emscripten on netbsd: it's definitely easier to install emscripten that way since one does not need to build binaryen (or fastcomp) separately. So usually I use emscripten versions which emsdk can install from source but now I wanted to use it with Qt which is bound to a certain version e.g. qt5.15 is bound to emscripten 1.39.8, see:
 
https://doc.qt.io/qt-5/wasm.html
 
However, 1.39.8 cannot be installed from source via emsdk so that's where my whole story began... Though it worked out in the end fine, it would have been easier to simply issue an emsdk install command instead of cloning and compiling binaryen separately. Nevertheless, most stuff can be installed via the netbsd package manager like llvm, lld, node, etc. so it was only binaryen that added an extra turn to the screw.
 
Thanks again for your answer!
 
Best regards,
r0ller
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscribe at googlegroups.com.
Reply all
Reply to author
Forward
0 new messages