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

CC issue #114

Closed
peteringram0 opened this issue Apr 5, 2023 · 7 comments
Closed

CC issue #114

peteringram0 opened this issue Apr 5, 2023 · 7 comments

Comments

@peteringram0
Copy link

Hi,

Im not sure if this is related to the repo or my setup but my project was working then just stopped. I get the following error related to the stylist repo.

Im really not sure how or what is causing this, has anyone seen this before?

Running on M1 Mac within linux docker container.

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "-Wl,--version-script=/tmp/rustc1YgAoS/list" "-Wl,--no-undefined-version" "/tmp/rustc1YgAoS/symbols.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.0.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.1.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.10.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.11.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.12.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.13.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.14.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.15.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.2.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.3.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.4.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.5.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.6.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.7.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.8.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.stylist_macros.9c89eb4c-cgu.9.rcgu.o" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.3dwl5o6bo7xij5iv.rcgu.rmeta" "/usr/share/nginx/html/app/target/debug/deps/stylist_macros-5f996c90d770e5f3.2iluaconuy4myker.rcgu.o" "-Wl,--as-needed" "-L" "/usr/share/nginx/html/app/target/debug/deps" "-L" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/usr/share/nginx/html/app/target/debug/deps/libstylist_core-44d6b1d9442e8123.rlib" "/usr/share/nginx/html/app/target/debug/deps/libwasm_bindgen-6c67453ea0cb2a8f.rlib" "/usr/share/nginx/html/app/target/debug/deps/libnom-ed00135ca7425d7c.rlib" "/usr/share/nginx/html/app/target/debug/deps/libmemchr-94cc1eadab3d9a4d.rlib" "/usr/share/nginx/html/app/target/debug/deps/libonce_cell-923af7bc8ec3039f.rlib" "/usr/share/nginx/html/app/target/debug/deps/libserde-809f6c71856fef10.rlib" "/usr/share/nginx/html/app/target/debug/deps/libthiserror-bd0898fae653ca9d.rlib" "/usr/share/nginx/html/app/target/debug/deps/liblitrs-39486a924c5edf23.rlib" "/usr/share/nginx/html/app/target/debug/deps/liblog-3485444c90421e04.rlib" "/usr/share/nginx/html/app/target/debug/deps/libcfg_if-d1c614b2a7690bf2.rlib" "/usr/share/nginx/html/app/target/debug/deps/libitertools-2c6f6bf352fe873b.rlib" "/usr/share/nginx/html/app/target/debug/deps/libeither-bcd4f123c0703c99.rlib" "/usr/share/nginx/html/app/target/debug/deps/libproc_macro_error-feedcf832a5f0336.rlib" "/usr/share/nginx/html/app/target/debug/deps/libsyn-387a5f1d9e3f895f.rlib" "/usr/share/nginx/html/app/target/debug/deps/libquote-0102cee385373c7e.rlib" "/usr/share/nginx/html/app/target/debug/deps/libproc_macro2-da3f87b384ec7c5f.rlib" "/usr/share/nginx/html/app/target/debug/deps/libunicode_ident-bb879f1c4efd8065.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libproc_macro-a89d85b84b6dfac3.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-fa130c5f0af40880.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-89f0b3a1354cbb39.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-faa4900c036349e5.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-dfc39cdcdc6fb39b.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-eefdd91d37a72d9c.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-bd21b8a9e7307714.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-cd33bd97ca044183.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-6696fffc6ceffbda.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-ec16bc37044f2d5d.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-61f84f596bd76787.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-6f5c6b6d790e5553.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-55151f99f732c891.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-89823c8400f5ecc3.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-16ba045d4ec2c438.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-d2d232c6d4fe71c3.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-f5dff897100c1d47.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-18ea8bd63a028a62.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-d20cd64dc93f727e.rlib" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-b142ce8e62e662c1.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/usr/share/nginx/html/app/target/debug/deps/libstylist_macros-5f996c90d770e5f3.so" "-Wl,--gc-sections" "-shared" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: __wbindgen_realloc: undefined version:
          /usr/bin/ld: __wbindgen_malloc: undefined version:
          /usr/bin/ld: __wbindgen_free: undefined version:
          /usr/bin/ld: __wbindgen_exn_store: undefined version:
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status


error: could not compile `stylist-macros` (lib) due to previous error
2023-04-04T19:05:44.809611Z ERROR  error
error from HTML pipeline
@futursolo
Copy link
Owner

futursolo commented Apr 5, 2023

Could you please try compiling without using docker container (with a stable compiler if possible)?
If it works then it might not be related to stylist.

Trunk only supports download toolchain with aarch64-apple-darwin and not aarch64-unknown-linux-gnu.

It is possible that some toolchain binary is outdated (especially wasm-bindgen) and if trunk does not support automatically downloading toolchain on that target it will not be able to fix it.

@peteringram0
Copy link
Author

@futursolo I require nightly due to other deps but i am able to compile directly on OSX just fine. Do you think this maybe more of a trunk related issue?

Thanks for your help on this BTW

@futursolo
Copy link
Owner

futursolo commented Apr 5, 2023

I would recommend to develop natively with an Apple Silicon Mac until all toolchains have pre-built Linux ARM binaries, which may be a couple years ahead (or try Rosetta x86_64 containers).

It could also be because of you are using nightly complier. It's not uncommon that nightly compiler encounter issues. You should run rustup update very often if you are using a nightly compiler.

@peteringram0
Copy link
Author

peteringram0 commented Apr 5, 2023

So my image installs rust which i have been destroying every now and again so i dont think thats the issue. This was all working so the binaries must have been in place, i just cant work out why this was working just fine in my setup and now i get this issue :(

Just to add to this. Its 100% caused by this dep. When removed from cargo.toml my project compiles just fine.

@futursolo
Copy link
Owner

futursolo commented Apr 5, 2023

The latest nightly version could also be bad. Rebuilding may not help at the moment. Try to wait a couple days and try again.

In addition, the wasm-bindgen version and wasm-bibdgen-cli must match exactly. If you have modified any dependencies, you need to check the wasm-bindgen version. Similarly, if your image always download the latest version when it is built, you may need to downgrade it. This requirement could be hard to maintain if trunk cannot do it for you. So I would recommend try to avoid Linux ARM64 until Linux arm have proper toolchain support.

@futursolo
Copy link
Owner

Regardless, I do not think this is related to stylist and can be mitigated by avoiding using a docker container workflow. So I am closing this issue.

@futursolo futursolo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
@peteringram0
Copy link
Author

@futursolo If install a targeted version of rust nightly from a few months back everything works as expected (not sure exactly when it broke) so it is the current version of nightly breaking this repo. More of a FYI at this point. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants