Skip to content
New issue

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

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

Already on GitHub? # to your account

Avoid extra Cargo installation artifacts #432

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Avoid extra Cargo installation artifacts #432

merged 1 commit into from
Jul 8, 2024

Conversation

abrown
Copy link
Collaborator

@abrown abrown commented Jun 28, 2024

As @bjorn3 mentioned in #420, using --no-track should get rid of the extra files that show up after the cargo install. Fixes #420.

As @bjorn3 mentioned in #420, using `--no-track` should get rid of the extra files that show up after the `cargo install`. Fixes #420.
@abrown
Copy link
Collaborator Author

abrown commented Jun 28, 2024

I haven't yet verified this works but wanted to do this before I forget.

@abrown
Copy link
Collaborator Author

abrown commented Jun 28, 2024

I tried this out locally and the build failed for other reasons!

$ NINJA_FLAGS=-v make package
...
/.../wasi-sdk/build/install/opt/wasi-sdk/bin/llvm-ar crs build/wasm32-wasi/libc.so.a 
/.../wasi-sdk/build/install/opt/wasi-sdk/bin/clang --target=wasm32-wasi -nodefaultlibs -shared --sysroot=/.../wasi-sdk/build/install/opt/wasi-sdk/share/wasi-sysroot \
-o /.../wasi-sdk/build/install/opt/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasi/libc.so -Wl,--whole-archive build/wasm32-wasi/libc.so.a -Wl,--no-whole-archive /.../wasi-sdk/build/install/opt/wasi-sdk/lib/clang/18/lib/wasi/libclang_rt.builtins-wasm32.a
wasm-ld: warning: creating shared libraries, with -shared, is not yet stable
wasm-ld: error: duplicate symbol: accept
>>> defined in build/wasm32-wasi/libc.so.a(accept.pic.o)
>>> defined in build/wasm32-wasi/libc.so.a(accept-wasip1.pic.o)

wasm-ld: error: duplicate symbol: accept4
>>> defined in build/wasm32-wasi/libc.so.a(accept.pic.o)
>>> defined in build/wasm32-wasi/libc.so.a(accept-wasip1.pic.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:587: /.../wasi-sdk/build/install/opt/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasi/libc.so] Error 1
make[1]: Leaving directory '/.../wasi-sdk/src/wasi-libc'
make: *** [Makefile:150: build/wasi-libc.BUILT] Error 2

I wonder if something is failing in the build that is being masked by our action caching?

Copy link
Collaborator

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into the same error you're seeing but the problem was a stale build directory for wasi-libc (I something about in-tree builds made it easier to get into this stale state). Given that CI is green I think this change is ok.

I'll note as well that this was also fixed in #429, but I think it's fine for this to land orthogonal to that.

@abrown abrown merged commit 35c271e into main Jul 8, 2024
9 of 10 checks passed
@abrown abrown deleted the no-track branch July 8, 2024 18:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New artifacts in wasi-sdk-22 release
2 participants