I cannot compile libskeleton with emscripten
daemoohn opened this issue · comments
Hi,
I'm trying to compile libskeleton.
Here's the script:
#############################
#!/bin/bash
getting the source code
git clone https://github.com/brion/libskeleton.git
getting ogg source code
git clone https://gitlab.xiph.org/xiph/ogg.git
configureOgg.sh
cd ogg
if [ ! -f configure ]; then
generate configuration script
sed -i.bak 's/$srcdir/configure/#/' autogen.sh
./autogen.sh
fi
cd ..
compileOggJs.sh
dir=pwd
set up the build directory
mkdir -p build
cd build
mkdir -p js
cd js
mkdir -p root
mkdir -p libogg
cd libogg
finally, run configuration script
emconfigure ../../../ogg/configure
--prefix="$dir/build/js/root"
--disable-shared
|| exit 1
compile libogg
emmake make -j4 || exit 1
emmake make install || exit 1
cd $dir
configureSkeleton.sh
cd libskeleton
if [ ! -f configure ]; then
generate configuration script
sed -i.bak 's/$srcdir/configure/#/' autogen.sh
ACLOCAL_PATH="$dir/build/js/root/share/aclocal" ./autogen.sh
fi
cd ..
compileSkeletonJs.sh
dir=pwd
set up the build directory
mkdir -p build
cd build
mkdir -p js
cd js
mkdir -p root
mkdir -p libskeleton
cd libskeleton
finally, run configuration script
emconfigure ../../../libskeleton/configure
--prefix="$dir/build/js/root"
PKG_CONFIG_PATH="$dir/build/js/root/lib/pkgconfig"
--disable-shared
compile libskeleton
emmake make -j4 || exit 1
emmake make install || exit 1
############################
It's nothing original, I put together pieces from the buildscripts folder. It's failing at libskeleton compilation step with:
Making all in src
make[2]: Entering directory '/build/js/libskeleton/src'
/bin/bash ../libtool --tag=CC --mode=compile /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton.lo -MD -MP -MF .deps/libskeleton_la-skeleton.Tpo -c -o libskeleton_la-skeleton.lo test -f 'skeleton.c' || echo '../../../../libskeleton/src/'
skeleton.c
/bin/bash ../libtool --tag=CC --mode=compile /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_query.lo -MD -MP -MF .deps/libskeleton_la-skeleton_query.Tpo -c -o libskeleton_la-skeleton_query.lo test -f 'skeleton_query.c' || echo '../../../../libskeleton/src/'
skeleton_query.c
/bin/bash ../libtool --tag=CC --mode=compile /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_vector.lo -MD -MP -MF .deps/libskeleton_la-skeleton_vector.Tpo -c -o libskeleton_la-skeleton_vector.lo test -f 'skeleton_vector.c' || echo '../../../../libskeleton/src/'
skeleton_vector.c
libtool: compile: /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_vector.lo -MD -MP -MF .deps/libskeleton_la-skeleton_vector.Tpo -c ../../../../libskeleton/src/skeleton_vector.c -o libskeleton_la-skeleton_vector.o
libtool: compile: /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_query.lo -MD -MP -MF .deps/libskeleton_la-skeleton_query.Tpo -c ../../../../libskeleton/src/skeleton_query.c -o libskeleton_la-skeleton_query.o
libtool: compile: /root/emsdk/upstream/emscripten/emcc -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton.lo -MD -MP -MF .deps/libskeleton_la-skeleton.Tpo -c ../../../../libskeleton/src/skeleton.c -o libskeleton_la-skeleton.o
In file included from ../../../../libskeleton/src/skeleton_query.c:37:
../../../../libskeleton/src/skeleton_private.h:35:10: fatal error: 'skeleton.h' file not found
#include "skeleton.h"
^~~~~~~~~~~~
In file included from ../../../../libskeleton/src/skeleton_vector.c:33:
In file included from ../../../../libskeleton/src/skeleton_vector.h:36:
../../../../libskeleton/src/skeleton_private.h:35:10: fatal error: 'skeleton.h' file not found
#include "skeleton.h"
^~~~~~~~~~~~
1 error generated.
emcc: error: '/root/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/root/emsdk/upstream/emscripten/system/include -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/root/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/root/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/root/emsdk/upstream/emscripten/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_query.lo -MD -MP -MF .deps/libskeleton_la-skeleton_query.Tpo -c ../../../../libskeleton/src/skeleton_query.c -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/SDL -c -o libskeleton_la-skeleton_query.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
1 error generated.
emcc: error: '/root/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/root/emsdk/upstream/emscripten/system/include -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/root/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/root/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/root/emsdk/upstream/emscripten/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton_vector.lo -MD -MP -MF .deps/libskeleton_la-skeleton_vector.Tpo -c ../../../../libskeleton/src/skeleton_vector.c -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/SDL -c -o libskeleton_la-skeleton_vector.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
In file included from ../../../../libskeleton/src/skeleton.c:36:
../../../../libskeleton/src/skeleton_private.h:35:10: fatal error: 'skeleton.h' file not found
#include "skeleton.h"
^~~~~~~~~~~~
1 error generated.
emcc: error: '/root/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/root/emsdk/upstream/emscripten/system/include -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/root/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/root/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/root/emsdk/upstream/emscripten/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -DHAVE_CONFIG_H -I. -I../../../../libskeleton/src -I.. -I../../../../libskeleton/include -Wall -Wdeclaration-after-statement -I//build/js/root/include -g -O2 -Wall -g -g -O2 -Wall -g -MT libskeleton_la-skeleton.lo -MD -MP -MF .deps/libskeleton_la-skeleton.Tpo -c ../../../../libskeleton/src/skeleton.c -Xclang -isystem/root/emsdk/upstream/emscripten/system/include/SDL -c -o libskeleton_la-skeleton.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
For better readability: https://github.com/daemoohn/libskeleton-ogv.js/runs/861173861?check_suite_focus=true (the libskeletonBuildActions step)
I know what it was. Compiling to emscripten works at this commit hash: 7a3d1fb8e0414ece3aca264593673ff0dd1e4614 , but subsequent changes break the build process in libskeleton, probably this commit breaks the build: bvibber/libskeleton@e96ebe6
You used the wrong branch. Use the one in the git submodule.