Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to rebuild wcsjs from source #6

Open
caillat opened this issue Dec 7, 2020 · 0 comments
Open

Problems to rebuild wcsjs from source #6

caillat opened this issue Dec 7, 2020 · 0 comments

Comments

@caillat
Copy link

caillat commented Dec 7, 2020

Hi,

I know that this project is one quite old of yours, but I do hope that you can provide me with some help.
Extremely interested in having wcsjs in the browser, in the context of a radio astronomy data mining and visualization ( see artemix.obspm.fr ), I tried in the first place to use wcsjs as it comes after a git clone.

Unfortunately, when it's used in the browser it exhibits a strange behaviour. E.g. successive calls to w.pix2sky(x,y) with varying (x,y) would return the same result ( the one returned by the 1st call).

Then I thought I had to rebuild wcs.js from the source, using the build procedure coming the project. Alas I end up with a message saying :

wasm-ld: error: unknown file type: wcs.o

I have the feeling that I'm quite close to the success, so any clue would be more than welcome !

Below the log of the build

/home/caillat/emsdk/upstream/emscripten/emcc -v -O2 src/wrapper.c -I/usr/local/include -L/usr/local/lib -lwcs -lm -o wcslib.js -s EXPORTED_FUNCTIONS="['_getWcs', '_pix2sky', '_sky2pix']";
shared:INFO: (Emscripten: Running sanity checks)
 "/home/caillat/emsdk/upstream/bin/clang" -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -isystem/home/caillat/emsdk/upstream/emscripten/system/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=10 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration --sysroot=/home/caillat/emsdk/upstream/emscripten/system -Xclang -isystem/home/caillat/emsdk/upstream/emscripten/cache/wasm/include -Xclang -iwithsysroot/include/compat -Xclang -iwithsysroot/include/libc -Xclang -iwithsysroot/lib/libc/musl/arch/emscripten -Xclang -iwithsysroot/local/include -Xclang -iwithsysroot/include/SSE -Xclang -iwithsysroot/include/neon -Xclang -iwithsysroot/lib/compiler-rt/include -Xclang -iwithsysroot/lib/libunwind/include -v -O2 -I/usr/local/include -o wcslib.js src/wrapper.c -c -o /tmp/emscripten_temp_t7nv0e97/wrapper_0.o
clang version 12.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 445289aa63e1b82b9eea6497fb2d0443813a9d4e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/caillat/emsdk/upstream/bin
 (in-process)
 "/home/caillat/emsdk/upstream/bin/clang-12" -cc1 -triple wasm32-unknown-emscripten -emit-obj --mrelax-relocations -disable-free -main-file-name wrapper.c -mrelocation-model static -mframe-pointer=none -fno-rounding-math -mconstructor-aliases -target-cpu generic -fvisibility hidden -debugger-tuning=gdb -v -resource-dir /home/caillat/emsdk/upstream/lib/clang/12.0.0 -D EMSCRIPTEN -D __EMSCRIPTEN_major__=2 -D __EMSCRIPTEN_minor__=0 -D __EMSCRIPTEN_tiny__=10 -D _LIBCPP_ABI_VERSION=2 -D unix -D __unix -D __unix__ -I /usr/local/include -isysroot /home/caillat/emsdk/upstream/emscripten/system -internal-isystem /home/caillat/emsdk/upstream/lib/clang/12.0.0/include -internal-isystem /home/caillat/emsdk/upstream/emscripten/system/include/wasm32-emscripten -internal-isystem /home/caillat/emsdk/upstream/emscripten/system/include -O2 -Werror=implicit-function-declaration -fdebug-compilation-dir /home/caillat/wcsjs-master -ferror-limit 19 -fgnuc-version=4.2.1 -fignore-exceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -isystem/home/caillat/emsdk/upstream/emscripten/system/include/SDL -isystem/home/caillat/emsdk/upstream/emscripten/cache/wasm/include -iwithsysroot/include/compat -iwithsysroot/include/libc -iwithsysroot/lib/libc/musl/arch/emscripten -iwithsysroot/local/include -iwithsysroot/include/SSE -iwithsysroot/include/neon -iwithsysroot/lib/compiler-rt/include -iwithsysroot/lib/libunwind/include -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -o /tmp/emscripten_temp_t7nv0e97/wrapper_0.o -x c src/wrapper.c
clang -cc1 version 12.0.0 based upon LLVM 12.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/home/caillat/emsdk/upstream/emscripten/cache/wasm/include"
ignoring nonexistent directory "/home/caillat/emsdk/upstream/emscripten/system/include/wasm32-emscripten"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/caillat/emsdk/upstream/emscripten/system/include/SDL
 /home/caillat/emsdk/upstream/emscripten/system/include/compat
 /home/caillat/emsdk/upstream/emscripten/system/include/libc
 /home/caillat/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten
 /home/caillat/emsdk/upstream/emscripten/system/local/include
 /home/caillat/emsdk/upstream/emscripten/system/include/SSE
 /home/caillat/emsdk/upstream/emscripten/system/include/neon
 /home/caillat/emsdk/upstream/emscripten/system/lib/compiler-rt/include
 /home/caillat/emsdk/upstream/emscripten/system/lib/libunwind/include
 /home/caillat/emsdk/upstream/lib/clang/12.0.0/include
 /home/caillat/emsdk/upstream/emscripten/system/include
End of search list.
 "/home/caillat/emsdk/upstream/bin/wasm-ld" -o wcslib.wasm /tmp/emscripten_temp_t7nv0e97/wrapper_0.o -L/usr/local/lib /usr/local/lib/libwcs.a -L/home/caillat/emsdk/upstream/emscripten/system/lib -L/home/caillat/emsdk/upstream/emscripten/cache/wasm /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libcompiler_rt.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc++-noexcept.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc++abi-noexcept.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libdlmalloc.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --strip-debug --export-table --export getWcs --export pix2sky --export sky2pix --export stackSave --export stackRestore --export stackAlloc --export __wasm_call_ctors --export __errno_location --export malloc --export free -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024
wasm-ld: error: unknown file type: wcs.o
emcc: error: '/home/caillat/emsdk/upstream/bin/wasm-ld -o wcslib.wasm /tmp/emscripten_temp_t7nv0e97/wrapper_0.o -L/usr/local/lib /usr/local/lib/libwcs.a -L/home/caillat/emsdk/upstream/emscripten/system/lib -L/home/caillat/emsdk/upstream/emscripten/cache/wasm /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libcompiler_rt.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc++-noexcept.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc++abi-noexcept.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libdlmalloc.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /home/caillat/emsdk/upstream/emscripten/cache/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --strip-debug --export-table --export getWcs --export pix2sky --export sky2pix --export stackSave --export stackRestore --export stackAlloc --export __wasm_call_ctors --export __errno_location --export malloc --export free -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (1)
Makefile:9: recipe for target 'wcslib.js' failed
make: *** [wcslib.js] Error 1


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant