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

librsvg-2.55.1 fails to build on powerpc-gentoo-linux-musl stating a crossbeam error: error[E0432]: unresolved imports core::sync::atomic::AtomicI64, core::sync::atomic::AtomicU64 #924

Closed
ernsteiswuerfel opened this issue Nov 7, 2022 · 2 comments

Comments

@ernsteiswuerfel
Copy link

librsvg-2.54.x can be patched to run on powerpc-gentoo-linux-musl by adding

[target.powerpc-gentoo-linux-musl]
rustflags = ["--cfg", "crossbeam_no_atomic_64"]

to .cargo/config but on librsvg-2.55.x this is no longer possible. 2.55.1 build fails with following crossbeam error:

[...]
     Running `rustc --crate-name crossbeam_utils --edition=2018 /var/tmp/portage/gnome-base/librsvg-2.55.1/work/cargo_home/gentoo/crossbeam-utils-0.8.11/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="once_cell"' --cfg 'feature="std"' -C metadata=650926ecf19e73c2 -C extra-filename=-650926ecf19e73c2 --out-dir /var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps -L dependency=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps --extern cfg_if=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps/libcfg_if-8b0eed1ca9f18504.rmeta --extern once_cell=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps/libonce_cell-5ba52b14be4f5b16.rmeta --cap-lints allow`
error[E0432]: unresolved imports `core::sync::atomic::AtomicI64`, `core::sync::atomic::AtomicU64`
  --> /var/tmp/portage/gnome-base/librsvg-2.55.1/work/cargo_home/gentoo/crossbeam-utils-0.8.11/src/lib.rs:79:49
   |
79 |             pub(crate) use core::sync::atomic::{AtomicI64, AtomicU64};
   |                                                 ^^^^^^^^^  ^^^^^^^^^ no `AtomicU64` in `sync::atomic`
   |                                                 |
   |                                                 no `AtomicI64` in `sync::atomic`
   |
help: a similar name exists in the module
   |
79 |             pub(crate) use core::sync::atomic::{AtomicI8, AtomicU64};
   |                                                 ~~~~~~~~
help: a similar name exists in the module
   |
79 |             pub(crate) use core::sync::atomic::{AtomicI64, AtomicU8};
   |                                                            ~~~~~~~~

error[E0412]: cannot find type `AtomicU64` in module `core::sync::atomic`
    --> /var/tmp/portage/gnome-base/librsvg-2.55.1/work/cargo_home/gentoo/crossbeam-utils-0.8.11/src/atomic/consume.rs:78:14
     |
78   |   impl_atomic!(AtomicU64, u64);
     |                ^^^^^^^^^ help: a struct with a similar name exists: `AtomicU16`

error[E0412]: cannot find type `AtomicI64` in module `core::sync::atomic`
    --> /var/tmp/portage/gnome-base/librsvg-2.55.1/work/cargo_home/gentoo/crossbeam-utils-0.8.11/src/atomic/consume.rs:80:14
     |
80   |   impl_atomic!(AtomicI64, i64);
     |                ^^^^^^^^^ help: a struct with a similar name exists: `AtomicI16`

Some errors have detailed explanations: E0412, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `crossbeam-utils` due to 3 previous errors

Caused by:
  process didn't exit successfully: `rustc --crate-name crossbeam_utils --edition=2018 /var/tmp/portage/gnome-base/librsvg-2.55.1/work/cargo_home/gentoo/crossbeam-utils-0.8.11/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="once_cell"' --cfg 'feature="std"' -C metadata=650926ecf19e73c2 -C extra-filename=-650926ecf19e73c2 --out-dir /var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps -L dependency=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps --extern cfg_if=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps/libcfg_if-8b0eed1ca9f18504.rmeta --extern once_cell=/var/tmp/portage/gnome-base/librsvg-2.55.1/work/librsvg-2.55.1-.ppc/target/release/deps/libonce_cell-5ba52b14be4f5b16.rmeta --cap-lints allow` (exit status: 1)
make[2]: *** [Makefile:1554: librsvg_c_api.la] Error 101

Toolchain used is Rust 1.61, GCC 12.2, binutils 2.39, musl 1.2.3. Build is done natively on Gentoo powerpc-gentoo-linux-musl on a Talos II.
librsvg-2.55.1:20221107-074807.log

@taiki-e
Copy link
Member

taiki-e commented Nov 10, 2022

Should be fixed in #922.

@taiki-e taiki-e closed this as completed Nov 17, 2022
@ernsteiswuerfel
Copy link
Author

Many thanks! I'll report back shortly if this works with librsvg on powerpc as soon as I can test.

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

No branches or pull requests

2 participants