Skip to content

audio_thread_priority fails to compile with musl libc #49

Description

@stefson

hey everyone,

I've just tried to build firefox-156.0_rc1 on a linux system with musl as its libc, using clang-22, and it failed within ../third_party/audio_thread_priority:

313:49.46      Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=audio_thread_priority CARGO_MANIFEST_DIR=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority CARGO_MANIFEST_PATH=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/Cargo.toml CARGO_PKG_AUTHORS='Paul Adenot <paul@paul.cx>' CARGO_PKG_DESCRIPTION='Bump a thread to real-time priority, for audio work, on Linux, Android, Windows and macOS' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=audio_thread_priority CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/mozilla/audio_thread_priority' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.37.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=37 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/release/deps /usr/bin/rustc --crate-name audio_thread_priority --edition=2018 /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type staticlib --crate-type rlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C embed-bitcode=no --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("dbus", "default", "simple_logger", "terminal-logging", "with_dbus"))' -C metadata=31a5bacbfab00230 -C extra-filename=-45712e0aedeb6024 --out-dir /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps --target armv7a-unknown-linux-musleabihf -C linker=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/build/cargo-linker -C strip=debuginfo -L dependency=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps -L dependency=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/release/deps --extern cfg_if=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/libcfg_if-b9b3c358cf44e4af.rlib --extern libc=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/liblibc-74c3679f81beff3c.rlib --extern log=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/liblog-fbba563d46d971c5.rlib --cap-lints warn --cap-lints warn -C codegen-units=1`
313:50.64 E error[E0599]: no method named `to_ne_bytes` found for raw pointer `*mut c_void` in the current scope
313:50.70 E   --> /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/src/rt_linux_native.rs:81:42
313:50.70 E    |
313:50.72 E 81 |         let pthread_id = self.pthread_id.to_ne_bytes();
313:50.73 E    |                                          ^^^^^^^^^^^ method not found in `*mut c_void`
313:50.74 E error[E0599]: no associated function or constant named `from_ne_bytes` found for raw pointer `*mut c_void` in the current scope
313:50.75 E    --> /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/src/rt_linux_native.rs:110:42
313:50.76 E     |
313:50.77 E 110 |             pthread_id: libc::pthread_t::from_ne_bytes(take(&mut src)),
313:50.78 E     |                                          ^^^^^^^^^^^^^ associated function or constant not found in `*mut c_void`
313:50.79 E     |
313:50.80 E help: there is a method `write_bytes` with a similar name, but with different arguments
313:50.81 E    --> /rustc/88d9e12ae178fab0fb5cc050a94da85685d449ea/library/core/src/ptr/mut_ptr.rs:1414:4
313:51.09 E For more information about this error, try `rustc --explain E0599`.
313:51.18 E error: could not compile `audio_thread_priority` (lib) due to 2 previous errors
313:51.19 E Caused by:
313:51.33 E   process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=audio_thread_priority CARGO_MANIFEST_DIR=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority CARGO_MANIFEST_PATH=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/Cargo.toml CARGO_PKG_AUTHORS='Paul Adenot <paul@paul.cx>' CARGO_PKG_DESCRIPTION='Bump a thread to real-time priority, for audio work, on Linux, Android, Windows and macOS' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MPL-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=audio_thread_priority CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/mozilla/audio_thread_priority' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.37.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=37 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/release/deps /usr/bin/rustc --crate-name audio_thread_priority --edition=2018 /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/third_party/rust/audio_thread_priority/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type staticlib --crate-type rlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C embed-bitcode=no --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("dbus", "default", "simple_logger", "terminal-logging", "with_dbus"))' -C metadata=31a5bacbfab00230 -C extra-filename=-45712e0aedeb6024 --out-dir /var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps --target armv7a-unknown-linux-musleabihf -C linker=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox-156.0/build/cargo-linker -C strip=debuginfo -L dependency=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps -L dependency=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/release/deps --extern cfg_if=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/libcfg_if-b9b3c358cf44e4af.rlib --extern libc=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/liblibc-74c3679f81beff3c.rlib --extern log=/var/tmp/portage/www-client/firefox-156.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/deps/liblog-fbba563d46d971c5.rlib --cap-lints warn --cap-lints warn -C codegen-units=1` (exit status: 1)

this is a non dbus build, using rustc-1.98.0

the full and compressed build log is attached: build.log.gz

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions