nika-begiashvili / libarchivejs

Archive library for browsers
MIT License
285 stars 35 forks source link

Fix Dockerfile to build modules #35

Closed disktnk closed 1 year ago

disktnk commented 3 years ago

Confirmed script:

docker build -t libarchive-llvm lib/tools/docker
bash lib/tools/wasm_gen.sh
npm test

Edit Makefiles using sedis harsh a little but I couldn't find other way to avoid the ad-hoc patch.

nika-begiashvili commented 3 years ago

Hi, Thanks for your PR, what exactly does this fix ?

disktnk commented 3 years ago

wasm_gen.sh gets an error on current master(d2c4d676e5de69aebb1a68cd084a9419b653eae4)'s Dockerfile

make[1]: Leaving directory '/opt/openssl-1.0.2s/test'

Configured for linux-generic32.

*** Because of configuration changes, you MUST do the following before
*** building:

    make depend
make: bash -c ./Configure -no-asm -no-apps no-ssl2 no-ssl3 no-hw no-deprecated shared no-dso linux-generic32
making all in crypto...
make[1]: Entering directory '/opt/openssl-1.0.2s/crypto'
/usr/bin/perl ../util/mkbuildinf.pl "/emsdk_portable/upstream/emscripten/em/emsdk_portable/upstream/emscripten/emcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -O3 -fomit-frame-pointer -Wall" "linux-generic32" >buildinf.h
/emsdk_portable/upstream/emscripten/em/emsdk_portable/upstream/emscripten/emcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -O3 -fomit-frame-pointer -Wall -I/usr/local/include/ -I/opt/zlib-1.2.11 -I/opt/bzip2-1.0.6 -I/opt/openssl-1.0.2s/include -I/opt/openssl-1.0.2s/test  -c -o cryptlib.o cryptlib.c
make[1]: /emsdk_portable/upstream/emscripten/em/emsdk_portable/upstream/emscripten/emcc: Command not found
make[1]: *** [<builtin>: cryptlib.o] Error 127
make[1]: Leaving directory '/opt/openssl-1.0.2s/crypto'
make: *** [Makefile:288: build_crypto] Error 1
make: make
The command '/bin/sh -c cd /opt/openssl-1.0.2s && emmake bash -c "./Configure -no-asm -no-apps no-ssl2 no-ssl3 no-hw no-deprecated shared no-dso linux-generic32" &&     sed -i 's/CC= $(CROSS_COMPILE)\/emsdk_portable\/sdk\/emcc/CC= $(CROSS_COMPILE)cc/' Makefile &&     emmake make &&     cd /usr/local/lib &&     ln -s /opt/openssl-1.0.2s/libssl.a &&     ln -s /opt/openssl-1.0.2s/libcrypto.a' returned a non-zero code: 2

This PR fix to build libarchivejs using the Docker.

disktnk commented 1 year ago

This patch is closed because the equivalent has already been imported in #52