Created
March 11, 2015 09:47
-
-
Save passcod/4b382bc836456b77249b to your computer and use it in GitHub Desktop.
Emscripten build process for jq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emconfigure ./configure --disable-maintainer-mode | |
make clean | |
env CCFLAGS=-O2 emmake make LDFLAGS=-all-static CCFLAGS=-O2 -j4 | |
cp jq jq.o | |
emcc -O2 jq.o -o jq.js |
Ok, I finally got it working. For all begginers like me, the above instructions do work, but here's what I did exactly:
- download the
master.zip
(the full repository) of oniguruma and jq from GitHub. - unzip oniguruma, enter the directory, run
autoreconf -i
,emconfigure ./configure
andemmake make
- unzip jq, enter the directory, run
autoreconf -i
- move your own oniguruma directory (which is probably called "oniguruma-master") to "jq-master/modules/oniguruma" (delete the blank directory that comes inside "jq-master/modules/")
- run the instructions above with absolute strictness
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this. I tried with both the tarball and the git source code. I tried installing Oniguruma and using Oniguruma from
modules/oniguruma
. I tried precompiling Oniguruma with emscriptem before. I tried moving Oniguruma source code tomodules/oniguruma
. I tried passing many different directives toemmake make
, both the ones specified here and those from jq's readme. All failed.