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

Cannot build/link libuv with zig cc #10296

Closed
vshymanskyy opened this issue Dec 7, 2021 · 2 comments
Closed

Cannot build/link libuv with zig cc #10296

vshymanskyy opened this issue Dec 7, 2021 · 2 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@vshymanskyy
Copy link

Zig Version

0.9.0-dev.1815+20e19e75f

Steps to Reproduce

git clone https://github.com/vshymanskyy/wasm2native
cd wasm2native
CC="zig cc -Dtarget=x86_64-linux-musl" ./build-full.sh ./examples/coremark.wasm
# or:
CC="zig cc -Dtarget=x86_64-linux-gnu" ./build-full.sh ./examples/coremark.wasm

Expected Behavior

Executable is produced. I.e. these commands work:

CC="clang-12" ./build-full.sh ./examples/coremark.wasm
CC="gcc" ./build-full.sh ./examples/coremark.wasm

Actual Behavior

ld.lld: error: undefined symbol: fcntl64
>>> referenced by core.c
>>>               core.c.o:(uv__nonblock_fcntl) in archive _deps/libuv-build/libuv_a.a
>>> referenced by core.c
>>>               core.c.o:(uv__nonblock_fcntl) in archive _deps/libuv-build/libuv_a.a
>>> referenced by core.c
>>>               core.c.o:(uv__cloexec_fcntl) in archive _deps/libuv-build/libuv_a.a
>>> referenced 4 more times
>>> did you mean: fcntl64@GLIBC_2.28
>>> defined in: /home/vshymanskyy/.cache/zig/o/497ff3de19cd993c85e39a6043bd7166/libc.so.6
@vshymanskyy vshymanskyy added the bug Observed behavior contradicts documented or intended behavior label Dec 7, 2021
@marler8997
Copy link
Contributor

Looks like another manifestation of #5882

@vshymanskyy
Copy link
Author

@marler8997 thanks for pointing this out. Closing for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants