Found it. The section of emcc I spotted looks at EMCONFIGURE_JS. Setting it to 1 allowed configure to work. For future reference, here's what I ended up with:
EMCONFIGURE_JS=1 emconfigure ./configure --prefix=/home/todd/try2 --with-gmp=/home/todd/try2 emmake make -j4 emmake make install On Tuesday, June 3, 2014 8:49:59 AM UTC-4, jj wrote: > > What does it print if you do export EMCC_DEBUG=1 and export > EM_BUILD_VERBOSE=3 before the call to emcc? > > > 2014-06-03 15:35 GMT+03:00 Todd Fleming <[email protected] <javascript:>>: > >> They all do the same thing. I shortened it down to just this, which still >> invokes /usr/bin/ld: >> >> $ emcc -v conftest.c >> clang version 3.3 >> Target: x86_64-unknown-linux-gnu >> Thread model: posix >> "/home/todd/emscripten-fastcomp/build/bin/clang-3.3" -cc1 -triple >> x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free >> -disable-llvm-verifier -main-file-name conftest.c -mrelocation-model static >> -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases >> -munwind-tables -fuse-init-array -target-cpu x86-64 -v -nostdsysteminc >> -nobuiltininc -resource-dir >> /home/todd/emscripten-fastcomp/build/bin/../lib/clang/3.3 -D __EMSCRIPTEN__ >> -D EMSCRIPTEN -fdebug-compilation-dir /home/todd/try2/mpfr-3.1.1 >> -ferror-limit 19 -fmessage-length 155 -mstackrealign -fobjc-runtime=gcc >> -fobjc-default-synthesize-properties -fdiagnostics-show-option >> -fcolor-diagnostics -backend-option -vectorize-loops -nobuiltininc >> -nostdsysteminc -isystem/home/todd/emscripten/system/local/include >> -isystem/home/todd/emscripten/system/include/compat >> -isystem/home/todd/emscripten/system/include >> -isystem/home/todd/emscripten/system/include/emscripten >> -isystem/home/todd/emscripten/system/include/bsd >> -isystem/home/todd/emscripten/system/include/libc >> -isystem/home/todd/emscripten/system/include/gfx >> -isystem/home/todd/emscripten/system/include/net >> -isystem/home/todd/emscripten/system/include/SDL >> -isystem/home/todd/emscripten/system/include/libcxx -o >> /tmp/conftest-tJDHqi.o -x c conftest.c >> clang -cc1 version 3.3 based upon LLVM 3.3svn default target >> x86_64-unknown-linux-gnu >> ignoring nonexistent directory >> "/home/todd/emscripten/system/local/include" >> ignoring nonexistent directory "/home/todd/emscripten/system/include/bsd" >> ignoring nonexistent directory "/home/todd/emscripten/system/include/net" >> #include "..." search starts here: >> #include <...> search starts here: >> /home/todd/emscripten/system/include/compat >> /home/todd/emscripten/system/include >> /home/todd/emscripten/system/include/emscripten >> /home/todd/emscripten/system/include/libc >> /home/todd/emscripten/system/include/gfx >> /home/todd/emscripten/system/include/SDL >> /home/todd/emscripten/system/include/libcxx >> End of search list. >> "/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker >> /lib64/ld-linux-x86-64.so.2 -o a.out >> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o >> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o >> /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o >> -L/usr/lib/gcc/x86_64-linux-gnu/4.8 >> -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu >> -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu >> -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -L/lib -L/usr/lib >> /tmp/conftest-tJDHqi.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc >> --as-needed -lgcc_s --no-as-needed >> /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o >> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o >> /tmp/conftest-tJDHqi.o: In function `main': >> conftest.c:(.text+0x12): undefined reference to `__gmpz_init' >> clang-3.3: error: linker command failed with exit code 1 (use -v to see >> invocation) >> >> >> On Tuesday, June 3, 2014 7:51:20 AM UTC-4, jj wrote: >> >>> What happens if you do '-o conftest.js' or '-o conftest.bc' or '-o >>> conftest.html' instead of just '-o conftest'? >>> >>> >>> 2014-06-03 5:53 GMT+03:00 Todd Fleming <[email protected]>: >>> >>> I get this when trying to use libraries: >>>> >>>> $ emcc -o conftest -I/home/todd/try2/include -L/home/todd/try2/lib >>>> conftest.c -lgmp >>>> /home/todd/try2/lib/libgmp.so: file not recognized: File format not >>>> recognized >>>> clang-3.3: error: linker command failed with exit code 1 (use -v to see >>>> invocation) >>>> >>>> >>>> libgmp.so looks like the right type: >>>> >>>> $ file /home/todd/try2/lib/libgmp.so >>>> /home/todd/try2/lib/libgmp.so: LLVM IR bitcode >>>> >>>> >>>> The -v option reveals the culprit: >>>> >>>> $ emcc -v -o conftest -I/home/todd/try2/include -L/home/todd/try2/lib >>>> conftest.c -lgmp >>>> clang version 3.3 >>>> Target: x86_64-unknown-linux-gnu >>>> Thread model: posix >>>> "/home/todd/emscripten-fastcomp/build/bin/clang-3.3" -cc1 -triple >>>> x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free >>>> -disable-llvm-verifier -main-file-name conftest.c -mrelocation-model >>>> static >>>> -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases >>>> -munwind-tables -fuse-init-array -target-cpu x86-64 -v -nostdsysteminc >>>> -nobuiltininc -resource-dir /home/todd/emscripten- >>>> fastcomp/build/bin/../lib/clang/3.3 -D __EMSCRIPTEN__ -D EMSCRIPTEN -I >>>> /home/todd/try2/include -fdebug-compilation-dir /home/todd/try2/mpfr-3.1.1 >>>> -ferror-limit 19 -fmessage-length 189 -mstackrealign -fobjc-runtime=gcc >>>> -fobjc-default-synthesize-properties -fdiagnostics-show-option >>>> -fcolor-diagnostics -backend-option -vectorize-loops -nobuiltininc >>>> -nostdsysteminc -isystem/home/todd/emscripten/system/local/include >>>> -isystem/home/todd/emscripten/system/include/compat >>>> -isystem/home/todd/emscripten/system/include >>>> -isystem/home/todd/emscripten/system/include/emscripten >>>> -isystem/home/todd/emscripten/system/include/bsd >>>> -isystem/home/todd/emscripten/system/include/libc >>>> -isystem/home/todd/emscripten/system/include/gfx >>>> -isystem/home/todd/emscripten/system/include/net >>>> -isystem/home/todd/emscripten/system/include/SDL >>>> -isystem/home/todd/emscripten/system/include/libcxx -o >>>> /tmp/conftest-9LGfCY.o -x c conftest.c >>>> clang -cc1 version 3.3 based upon LLVM 3.3svn default target >>>> x86_64-unknown-linux-gnu >>>> ignoring nonexistent directory "/home/todd/emscripten/system/ >>>> local/include" >>>> ignoring nonexistent directory "/home/todd/emscripten/system/ >>>> include/bsd" >>>> ignoring nonexistent directory "/home/todd/emscripten/system/ >>>> include/net" >>>> #include "..." search starts here: >>>> #include <...> search starts here: >>>> /home/todd/try2/include >>>> /home/todd/emscripten/system/include/compat >>>> /home/todd/emscripten/system/include >>>> /home/todd/emscripten/system/include/emscripten >>>> /home/todd/emscripten/system/include/libc >>>> /home/todd/emscripten/system/include/gfx >>>> /home/todd/emscripten/system/include/SDL >>>> /home/todd/emscripten/system/include/libcxx >>>> End of search list. >>>> "/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker >>>> /lib64/ld-linux-x86-64.so.2 -o conftest /usr/lib/gcc/x86_64-linux-gnu/ >>>> 4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/ >>>> 4.8/../../../x86_64-linux-gnu/crti.o >>>> /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o >>>> -L/home/todd/try2/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8 >>>> -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu >>>> -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu >>>> -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -L/lib -L/usr/lib >>>> /tmp/conftest-9LGfCY.o -lgmp -lgcc --as-needed -lgcc_s --no-as-needed -lc >>>> -lgcc --as-needed -lgcc_s --no-as-needed >>>> /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o >>>> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o >>>> /home/todd/try2/lib/libgmp.so: file not recognized: File format not >>>> recognized >>>> clang-3.3: error: linker command failed with exit code 1 (use -v to see >>>> invocation) >>>> >>>> >>>> /usr/bin/ld shouldn't be invoked, should it? >>>> >>>> This is a fresh checkout of emscripen, emscripten-fastcomp, >>>> and emscripten-fastcomp-clang running on Ubuntu 14.04. >>>> >>>> Did I miss a key step in the build instructions? >>>> >>>> Todd >>>> >>>> -- >> 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 [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
