Skip to content

Instantly share code, notes, and snippets.

@passcod
Created March 11, 2015 09:47
Show Gist options
  • Save passcod/4b382bc836456b77249b to your computer and use it in GitHub Desktop.
Save passcod/4b382bc836456b77249b to your computer and use it in GitHub Desktop.
Emscripten build process for jq
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
@fiatjaf
Copy link

fiatjaf commented May 5, 2017

Ok, I finally got it working. For all begginers like me, the above instructions do work, but here's what I did exactly:

  1. download the master.zip (the full repository) of oniguruma and jq from GitHub.
  2. unzip oniguruma, enter the directory, run autoreconf -i, emconfigure ./configure and emmake make
  3. unzip jq, enter the directory, run autoreconf -i
  4. 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/")
  5. run the instructions above with absolute strictness

@rossillingworth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment