nodejs / uvwasi

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

Missing function `uv_fs_lutime` #213

Closed phated closed 1 year ago

phated commented 1 year ago

As reported at https://github.com/bytecodealliance/wasm-micro-runtime/pull/1861#discussion_r1241346007, when compiling uvwasi against the libuv available in Ubuntu-20.04, an error occurs:

product-mini/platforms/linux/build/_deps/uvwasi-src/src/uvwasi.c:1743:7: warning: implicit declaration of function ‘uv_fs_lutime’; did you mean ‘uv_fs_futime’? [-Wimplicit-function-declaration]
 1743 |   r = uv_fs_lutime(NULL, &req, resolved_path, atim, mtim, NULL);
[ 98%] Linking C executable iwasm
/usr/local/bin/ld: _deps/uvwasi-build/libuvwasi_a.a(uvwasi.c.o): in function `uvwasi_path_filestat_set_times':
uvwasi.c:(.text+0x293f): undefined reference to `uv_fs_lutime'

What is the difference between uv_fs_lutime and uv_fs_futime? When was uv_fs_lutime added?

cjihrig commented 1 year ago

When was uv_fs_lutime added?

It was added in v1.36.0 in April of 2020.

What is the difference between uv_fs_lutime and uv_fs_futime?

utime changes the access and modification times of a file based on it's filename. futime does the same thing, except it uses a file descriptor instead of a path. lutime is the same as utime, but does not follow symlinks.

phated commented 1 year ago

This seems like it might just be an outdated version of libuv being shipped with ubuntu-20.04 then.

cjihrig commented 1 year ago

Agreed. Can this be closed?