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

Compiling fails on arm(64) #21

Open
madnuttah opened this issue May 29, 2024 · 5 comments
Open

Compiling fails on arm(64) #21

madnuttah opened this issue May 29, 2024 · 5 comments

Comments

@madnuttah
Copy link

madnuttah commented May 29, 2024

Hello and thanks for dnsi.

I am currently facing issues while compiling dnsi for arm(64) in a GitHub workflow.

Workflow run log:

2024-05-29T15:07:12.9508546Z #19 [linux/arm64 buildenv 2/3] RUN set -xe;     apk --update --no-cache add     ca-certificates     tzdata     build-base     curl     binutils     cargo &&     cargo install --locked dnsi &&     mkdir -p /usr/local/dnsi &&     mv /root/.cargo/bin/dnsi /usr/local/dnsi &&     strip --strip-all /usr/local/dnsi/dnsi
2024-05-29T15:07:13.1066600Z #19 689.6 error: could not compile `syn` (lib)
2024-05-29T15:07:13.1067238Z #19 689.6 
2024-05-29T15:07:13.1067640Z #19 689.6 Caused by:
2024-05-29T15:07:13.1077801Z #19 689.6   process didn't exit successfully: `rustc --crate-name syn --edition=2021 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.60/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="visit-mut"' -C metadata=8e2b8725a826b109 -C extra-filename=-8e2b8725a826b109 --out-dir /tmp/cargo-installHmwaSY/release/deps -C strip=debuginfo -L dependency=/tmp/cargo-installHmwaSY/release/deps --extern proc_macro2=/tmp/cargo-installHmwaSY/release/deps/libproc_macro2-8a0dd023079a1a0e.rmeta --extern quote=/tmp/cargo-installHmwaSY/release/deps/libquote-29702e983c801cfd.rmeta --extern unicode_ident=/tmp/cargo-installHmwaSY/release/deps/libunicode_ident-94891640d59accc2.rmeta --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
2024-05-29T15:07:13.1087763Z #19 689.6 warning: build failed, waiting for other jobs to finish...

The relevant part of the Dockerfile:

...
RUN set -xe; \
    apk --update --no-cache add \
    ca-certificates \
    tzdata \
    build-base \
    curl \
    binutils \
    cargo && \
    cargo install --locked dnsi
...

I can't tell you if it would fail for armv6/v7 too right now. The i386 and amd64 are compiling without issues.

Link to full log

GitHub project

Thank you.

@madnuttah madnuttah changed the title Compiling fails on arm64 Compiling fails on arm(64) May 29, 2024
@partim
Copy link
Member

partim commented Jun 3, 2024

Apologies for the delay, bit of a hectic week around here.

I’m not sure what’s going wrong. I have updated the dependencies on the main branch which updates syn to a newer version. Can you try building from git and see if that works?

@madnuttah
Copy link
Author

Thank you, no apologies please. :) I'll try another build and tell you the outcome.

madnuttah added a commit to madnuttah/dnsi-docker that referenced this issue Jun 4, 2024
@madnuttah
Copy link
Author

It seems like everything except arm64 compiles. It took quite long and after searching through the log, I saw this error again and canceled the workflow. I wonder why it hasn't been canceled after the error occured... But, due to the long runtime it seems like the other arm builds were successful.

2024-06-04T14:16:13.8171964Z #16 [linux/arm64 buildenv 2/4] RUN set -xe;     apk --update --no-cache add     ca-certificates     tzdata     build-base     curl     binutils     cargo &&     cargo install --locked dnsi
2024-06-04T14:16:13.9740615Z #16 442.6 error: could not compile `syn` (lib)
2024-06-04T14:16:13.9741298Z #16 442.6 
2024-06-04T14:16:13.9741686Z #16 442.6 Caused by:
2024-06-04T14:16:13.9750561Z #16 442.6   process didn't exit successfully: `rustc --crate-name syn --edition=2021 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.60/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="visit-mut"' -C metadata=8e2b8725a826b109 -C extra-filename=-8e2b8725a826b109 --out-dir /tmp/cargo-install4YOrCX/release/deps -C strip=debuginfo -L dependency=/tmp/cargo-install4YOrCX/release/deps --extern proc_macro2=/tmp/cargo-install4YOrCX/release/deps/libproc_macro2-8a0dd023079a1a0e.rmeta --extern quote=/tmp/cargo-install4YOrCX/release/deps/libquote-29702e983c801cfd.rmeta --extern unicode_ident=/tmp/cargo-install4YOrCX/release/deps/libunicode_ident-94891640d59accc2.rmeta --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
2024-06-04T14:16:13.9759119Z #16 442.6 warning: build failed, waiting for other jobs to finish...

Link to full log

Thank you.

@tertsdiepraam
Copy link
Contributor

tertsdiepraam commented Jun 5, 2024

This looks like a rustc bug, because rustc is exiting with a segfault. So here's some questions that might help diagnose the issue:

  • What's your compiler version?
  • Is this cross-compiling or compiling on arm64?
  • What target triple are you using?
  • Does the issue persist when using the nightly compiler?

I tried cross-compiling to aarch64-unknown-linux-gnu but that didn't give any issues on rustc 1.78.

@madnuttah
Copy link
Author

Thanks for your questions!

  • I'm just installing cargo, the rust version is rust (1.78.0-r0). The installations run without issues
  • Compiling fails with the error messages mentioned above on arm64 via GitHub workflow calling cargo install --locked dnsi
  • The target platforms: linux/386,linux/arm/v6,linux/arm/v7,linux/arm64,linux/amd64
  • Not tried it yet, how would I do that?

As all this rust stuff is new to me, I hope I've answered your questions properly.

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

3 participants