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

make fails on ubuntu: missing llvm-ar #84

Open
pelletier opened this issue May 23, 2023 · 0 comments
Open

make fails on ubuntu: missing llvm-ar #84

pelletier opened this issue May 23, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@pelletier
Copy link
Contributor

Running make in the root directory yield this on my ubuntu machine:

#
# Install the startup files (crt1.o etc).
#
mkdir -p "/home/thomas/src/github.com/stealthrocket/wzprof/testdata/.wasi-libc/sysroot/lib/wasm32-wasi" && \
cp build/wasm32-wasi/libc-bottom-half/crt/crt1.o build/wasm32-wasi/libc-bottom-half/crt/crt1-command.o build/wasm32-wasi/libc-bottom-half/crt/crt1-reactor.o "/home/thomas/src/github.com/stealthrocket/wzprof/testdata/.wasi-libc/sysroot/lib/wasm32-wasi"
# On Windows, the commandline for the ar invocation got too long, so it needs to be split up.
llvm-ar crs /home/thomas/src/github.com/stealthrocket/wzprof/testdata/.wasi-libc/sysroot/lib/wasm32-wasi/libc.a build/wasm32-wasi/dlmalloc/src/dlmalloc.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/closedir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/dirfd.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/fdclosedir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/fdopendir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/opendirat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/readdir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/rewinddir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/scandirat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/seekdir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/dirent/telldir.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/errno/errno.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/fcntl.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/openat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/posix_fadvise.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/posix_fallocate.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/poll/poll.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sched/sched_yield.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/stdio/renameat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/stdlib/_Exit.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/ioctl/ioctl.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/select/pselect.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/select/select.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/getsockopt.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/recv.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/send.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/shutdown.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/fstat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/fstatat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/futimens.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/mkdirat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/utimensat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/time/gettimeofday.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/preadv.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/pwritev.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/readv.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/writev.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_MONOTONIC.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_REALTIME.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_getres.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_gettime.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/nanosleep.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/time/time.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/faccessat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/fdatasync.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/fsync.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/ftruncate.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/linkat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/lseek.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/pread.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/pwrite.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/read.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/readlinkat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/sleep.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/symlinkat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/unlinkat.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/usleep.o build/wasm32-wasi/libc-bottom-half/cloudlibc/src/libc/unistd/write.o build/wasm32-wasi/libc-bottom-half/sources/__errno_location.o build/wasm32-wasi/libc-bottom-half/sources/__main_void.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_dt.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_environ.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_fd_renumber.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_initialize_environ.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_real.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_rmdirat.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_tell.o build/wasm32-wasi/libc-bottom-half/sources/__wasilibc_unlinkat.o build/wasm32-wasi/libc-bottom-half/sources/abort.o build/wasm32-wasi/libc-bottom-half/sources/accept.o build/wasm32-wasi/libc-bottom-half/sources/at_fdcwd.o build/wasm32-wasi/libc-bottom-half/sources/chdir.o build/wasm32-wasi/libc-bottom-half/sources/complex-builtins.o build/wasm32-wasi/libc-bottom-half/sources/environ.o build/wasm32-wasi/libc-bottom-half/sources/errno.o build/wasm32-wasi/libc-bottom-half/sources/getcwd.o build/wasm32-wasi/libc-bottom-half/sources/getentropy.o build/wasm32-wasi/libc-bottom-half/sources/isatty.o build/wasm32-wasi/libc-bottom-half/sources/math/fmin-fmax.o build/wasm32-wasi/libc-bottom-half/sources/math/math-builtins.o build/wasm32-wasi/libc-bottom-half/sources/posix.o build/wasm32-wasi/libc-bottom-half/sources/preopens.o build/wasm32-wasi/libc-bottom-half/sources/reallocarray.o build/wasm32-wasi/libc-bottom-half/sources/sbrk.o build/wasm32-wasi/libc-bottom-half/sources/truncate.o build/wasm32-wasi/libc-top-half/musl/src/complex/__cexp.o build/wasm32-wasi/libc-top-half/musl/src/complex/__cexpf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cabs.o build/wasm32-wasi/libc-top-half/musl/src/complex/cabsf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cabsl.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacos.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacosf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacosh.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacoshf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacoshl.o build/wasm32-wasi/libc-top-half/musl/src/complex/cacosl.o build/wasm32-wasi/libc-top-half/musl/src/complex/carg.o build/wasm32-wasi/libc-top-half/musl/src/complex/cargf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cargl.o build/wasm32-wasi/libc-top-half/musl/src/complex/casin.o build/wasm32-wasi/libc-top-half/musl/src/complex/casinf.o build/wasm32-wasi/libc-top-half/musl/src/complex/casinh.o build/wasm32-wasi/libc-top-half/musl/src/complex/casinhf.o build/wasm32-wasi/libc-top-half/musl/src/complex/casinhl.o build/wasm32-wasi/libc-top-half/musl/src/complex/casinl.o build/wasm32-wasi/libc-top-half/musl/src/complex/catan.o build/wasm32-wasi/libc-top-half/musl/src/complex/catanf.o build/wasm32-wasi/libc-top-half/musl/src/complex/catanh.o build/wasm32-wasi/libc-top-half/musl/src/complex/catanhf.o build/wasm32-wasi/libc-top-half/musl/src/complex/catanhl.o build/wasm32-wasi/libc-top-half/musl/src/complex/catanl.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccos.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccosf.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccosh.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccoshf.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccoshl.o build/wasm32-wasi/libc-top-half/musl/src/complex/ccosl.o build/wasm32-wasi/libc-top-half/musl/src/complex/cexp.o build/wasm32-wasi/libc-top-half/musl/src/complex/cexpf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cexpl.o build/wasm32-wasi/libc-top-half/musl/src/complex/clog.o build/wasm32-wasi/libc-top-half/musl/src/complex/clogf.o build/wasm32-wasi/libc-top-half/musl/src/complex/clogl.o build/wasm32-wasi/libc-top-half/musl/src/complex/conj.o build/wasm32-wasi/libc-top-half/musl/src/complex/conjf.o build/wasm32-wasi/libc-top-half/musl/src/complex/conjl.o build/wasm32-wasi/libc-top-half/musl/src/complex/cpow.o build/wasm32-wasi/libc-top-half/musl/src/complex/cpowf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cpowl.o build/wasm32-wasi/libc-top-half/musl/src/complex/cproj.o build/wasm32-wasi/libc-top-half/musl/src/complex/cprojf.o build/wasm32-wasi/libc-top-half/musl/src/complex/cprojl.o build/wasm32-wasi/libc-top-half/musl/src/complex/csin.o build/wasm32-wasi/libc-top-half/musl/src/complex/csinf.o build/wasm32-wasi/libc-top-half/musl/src/complex/csinh.o build/wasm32-wasi/libc-top-half/musl/src/complex/csinhf.o build/wasm32-wasi/libc-top-half/musl/src/complex/csinhl.o build/wasm32-wasi/libc-top-half/musl/src/complex/csinl.o build/wasm32-wasi/libc-top-half/musl/src/complex/csqrt.o build/wasm32-wasi/libc-top-half/musl/src/complex/csqrtf.o build/wasm32-wasi/libc-top-half/musl/src/complex/csqrtl.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctan.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctanf.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctanh.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctanhf.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctanhl.o build/wasm32-wasi/libc-top-half/musl/src/complex/ctanl.o build/wasm32-wasi/libc-top-half/musl/src/conf/confstr.o build/wasm32-wasi/libc-top-half/musl/src/conf/fpathconf.o build/wasm32-wasi/libc-top-half/musl/src/conf/legacy.o build/wasm32-wasi/libc-top-half/musl/src/conf/pathconf.o build/wasm32-wasi/libc-top-half/musl/src/conf/sysconf.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_blowfish.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_des.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_md5.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_r.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_sha256.o build/wasm32-wasi/libc-top-half/musl/src/crypt/crypt_sha512.o build/wasm32-wasi/libc-top-half/musl/src/crypt/encrypt.o build/wasm32-wasi/libc-top-half/musl/src/ctype/__ctype_b_loc.o build/wasm32-wasi/libc-top-half/musl/src/ctype/__ctype_get_mb_cur_max.o build/wasm32-wasi/libc-top-half/musl/src/ctype/__ctype_tolower_loc.o build/wasm32-wasi/libc-top-half/musl/src/ctype/__ctype_toupper_loc.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isalnum.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isalpha.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isascii.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isblank.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iscntrl.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isdigit.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isgraph.o build/wasm32-wasi/libc-top-half/musl/src/ctype/islower.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isprint.o build/wasm32-wasi/libc-top-half/musl/src/ctype/ispunct.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isspace.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isupper.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswalnum.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswalpha.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswblank.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswcntrl.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswctype.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswdigit.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswgraph.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswlower.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswprint.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswpunct.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswspace.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswupper.o build/wasm32-wasi/libc-top-half/musl/src/ctype/iswxdigit.o build/wasm32-wasi/libc-top-half/musl/src/ctype/isxdigit.o build/wasm32-wasi/libc-top-half/musl/src/ctype/toascii.o build/wasm32-wasi/libc-top-half/musl/src/ctype/tolower.o build/wasm32-wasi/libc-top-half/musl/src/ctype/toupper.o build/wasm32-wasi/libc-top-half/musl/src/ctype/towctrans.o build/wasm32-wasi/libc-top-half/musl/src/ctype/wcswidth.o build/wasm32-wasi/libc-top-half/musl/src/ctype/wctrans.o build/wasm32-wasi/libc-top-half/musl/src/ctype/wcwidth.o build/wasm32-wasi/libc-top-half/musl/src/dirent/alphasort.o
make[1]: llvm-ar: No such file or directory
make[1]: *** [Makefile:491: /home/thomas/src/github.com/stealthrocket/wzprof/testdata/.wasi-libc/sysroot/lib/wasm32-wasi/libc.a] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/thomas/src/github.com/stealthrocket/wzprof/testdata/.wasi-libc'
make: *** [Makefile:40: testdata/.sysroot/lib/wasm32-wasi/libc.a] Error 2

Seems like ubuntu installs it as /usr/bin/llvm-ar-15. Manually linking it as llvm-ar allows the make process to continue, until it hits the same issue for llvm-nm.

Should we leave the installation of llvm/wasi-sdk to the user and rely on the WASI_SDK_PATH environment variable instead?

@pelletier pelletier added the bug Something isn't working label May 23, 2023
@pelletier pelletier assigned pelletier and unassigned pelletier May 23, 2023
@achille-roussel achille-roussel added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants