nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
225 stars 49 forks source link

Compilation failure following build instructions in README.md #186

Closed mhdawson closed 1 year ago

mhdawson commented 1 year ago

Compilation failure if you follow the instructions in README.md on how to build.

[ 52%] Building C object CMakeFiles/uvwasi.dir/src/poll_oneoff.c.o
[ 54%] Building C object CMakeFiles/uvwasi.dir/src/uv_mapping.c.o
[ 55%] Building C object CMakeFiles/uvwasi.dir/src/uvwasi.c.o
[ 55%] Building C object CMakeFiles/uvwasi.dir/src/wasi_rights.c.o
[ 56%] Building C object CMakeFiles/uvwasi.dir/src/wasi_serdes.c.o
[ 58%] Linking C shared library libuvwasi.so
/usr/bin/ld: _deps/libuv-build/libuv_a.a(udp.c.o): warning: relocation against `in6addr_any@@GLIBC_2.2.5' in read-only section `.text'
/usr/bin/ld: _deps/libuv-build/libuv_a.a(core.c.o): relocation R_X86_64_PC32 against symbol `environ@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC

I can build with the same arguments that the ci uses:

cmake  .
  cmake --build . --target check
mhdawson commented 1 year ago

It's with the following gcc version:

root@2b741f7759eb:/uvwasi/out/cmake# gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

which looks to be the same version as in the ci:

Run cmake  .
-- The C compiler identification is GNU 11.3.0
mhdawson commented 1 year ago

Looks like this is a dup of https://github.com/nodejs/uvwasi/issues/175