abergmeier / emscripten-libs

Library repository experiment for Emscripten
10 stars 2 forks source link

Building libffi for emscripten #1

Open tobi-laa opened 11 years ago

tobi-laa commented 11 years ago

I was attempting to build the patched version of libffi with emscripten but was unsuccessful. I am really not sure whether I used the right commands, though. Here is what I did:

autoconf
emconfigure ./configure --host=i386-pc-linux-gnu --prefix=${EMSCRIPTEN_SYSTEM_ROOT} --enable-static=yes --disable-shared --disable-libtool
emmake make

Which yielded the following error:

make[3]: Entering directory `/home/tobi/Desktop/emscripten-libffi-emscripten_fix/i386-pc-linux-gnu'
depbase=`echo src/prep_cif.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
 --tag=CC   --mode=compile /home/tobi/emscripten/emcc -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src   -Wall -fexceptions -MT src/prep_cif.lo -MD -MP -MF $depbase.Tpo -c -o src/prep_cif.lo ../src/prep_cif.c &&\
mv -f $depbase.Tpo $depbase.Plo
/bin/sh: line 1: --tag=CC: command not found
make[3]: *** [src/prep_cif.lo] Error 127
make[3]: Leaving directory `/home/tobi/Desktop/emscripten-libffi-emscripten_fix/i386-pc-linux-gnu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tobi/Desktop/emscripten-libffi-emscripten_fix/i386-pc-linux-gnu'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tobi/Desktop/emscripten-libffi-emscripten_fix/i386-pc-linux-gnu'
make: *** [all-all] Error 2

Any input on what went wrong would be highly appreciated ;-)

abergmeier commented 11 years ago

Good question. The thing we do not do is call autoconf. Perhaps scrape it and try without.

tobi-laa commented 11 years ago

Thanks for replying. Without calling autoconf, the option --disable-libtool is not recognized by configure Continuing to build then gives me this error:

libtool: compile:  /home/tobi/emscripten/emcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -MT src/x86/unix64.lo -MD -MP -MF src/x86/.deps/unix64.Tpo -c ../src/x86/unix64.S -o src/x86/unix64.o
Traceback (most recent call last):
  File "/home/tobi/emscripten/emcc", line 965, in <module>
    assert has_source_inputs, 'Must have source code inputs to use -c'
AssertionError: Must have source code inputs to use -c
make[3]: *** [src/x86/unix64.lo] Error 1
leighman commented 11 years ago

Also having this problem. What did you do about the assembly files for the emscripten build?

racerxdl commented 10 years ago

Same problem here. Also I didnt found any LLVM Assembly codes o.O