Giter Club home page Giter Club logo

audiopus_sys's People

Contributors

erk- avatar lakelezz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

audiopus_sys's Issues

Unable to build on windows with GNU toolchain

Hello,

I'm unable to build on windows with the GNU toolchain.
this crate is used on the serenity dependency my project have.

If I change toolchain to msvc it builds, but that toolchain is not an option :( even in Windows environment.

rustup show

Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\Nelson Morais\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu (default)
stable-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

x86_64-pc-windows-gnu
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-pc-windows-gnu (default)
rustc 1.40.0 (73528e339 2019-12-16)
...
   Compiling hyper v0.13.1
   Compiling hyper-tls v0.4.1
   Compiling audiopus_sys v0.1.5
error: failed to run custom build command for `audiopus_sys v0.1.5`
Caused by:
  process didn't exit successfully: `D:\Code\rust\m-bot\target\debug\build\audiopus_sys-b7750ffa84df77b7\build-script-build` (exit code: 101)
--- stdout
cargo:info=No feature or environment variable found, linking by default.
cargo:info=`pkg_config` could not find `Opus`.
cargo:info=Opus source path: "\\\\?\\C:\\Users\\Nelson Morais\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\audiopus_sys-0.1.5\\opus".
cargo:info=Opus will be built as static-library.
--- stderr
cp: cannot stat '\?\C:\Users\Nelson Morais\.cargo\registry\src\github.com-1ecc6299db9ec823\audiopus_sys-0.1.5\opus': No such file or directory
thread 'main' panicked at 'Failed to copy Opus files.', C:\Users\Nelson Morais\.cargo\registry\src\github.com-1ecc6299db9ec823\audiopus_sys-0.1.5\build.rs:69:9
stack backtrace:

How should I go about cross-compiling this crate?

I've hit a bit of a roadblock when trying to cross-compile serenity with the voice feature enabled. Cross-compilation fails with this crate and I can't seem to figure out a solution by looking at the README.

For reference, my compilation target is armv7-unknown-linux-gnueabihf. I'm doing the compilation from a Ubuntu WSL shell. Native compilation works just fine (even if it is ~9-18x slower).

And here's what I get when I try to cross-compile:

   Compiling libsodium-sys v0.2.2
   Compiling audiopus_sys v0.1.3
error: failed to run custom build command for `audiopus_sys v0.1.3`
process didn't exit successfully: `/mnt/d/Programming/Rust/active/bert/target/release/build/audiopus_sys-e872553c6f49fc63/build-script-build` (exit code: 101)
--- stdout
cargo:info=No feature or environment variable found, linking by default.
cargo:info=`pkg_config` could not find `Opus`.

--- stderr
thread 'main' panicked at 'Could not canonicalise.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: build_script_build::main
  10: std::rt::lang_start::{{closure}}
  11: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  12: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  13: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  14: main
  15: __libc_start_main
  16: _start

warning: build failed, waiting for other jobs to finish...

Compilation on aarch64-linux-android fails

With the following error:

error[E0308]: mismatched types
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/audiopus_sys-0.2.2/build.rs:83:33
   |
83 | fn default_library_linking() -> bool {
   |    -----------------------      ^^^^ expected `bool`, found `()`
   |    |
   |    implicitly returns `()` as its body has no tail or `return` expression

For more information about this error, try `rustc --explain E0308`.
error: could not compile `audiopus_sys` (build script) due to previous error

It's the same regardless of any enabled features (happens with dynamic and with static)

Cross compiling to arm fails at the linking stage

sort of a follow-up to #1 as that issue is stale,

attempting to cross-compile to arm systems works, until the linking stage where it produces this error:

target/armv7-unknown-linux-gnueabihf/debug/build/audiopus_sys-96ea5a29564c45f6/out/lib/libopus.so: file not recognized: file format not recognized

Segmentation fault on alpine

Hey, I'm trying to run a discord bot using serenity and songbird on an alpine docker container.
However when trying to join a voice channel it segfaults on this line

https://github.com/Lakelezz/audiopus/blob/701dbf9c07afba9f39e8944c9acdad46b5f921e1/src/coder/encoder.rs#L87

See serenity-rs/songbird#120 for original issue.

Info about the system:

/app # ldd /usr/local/bin/my-binary
        /lib/ld-musl-x86_64.so.1 (0x7fcb47cea000)
        libopus.so.0 => /usr/lib/libopus.so.0 (0x7fcb458d1000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fcb47cea000)
/app # apk info opus
opus-1.3.1-r1 description:
Codec designed for interactive speech and audio transmission over the Internet

It may be relevant that the binary is created in a different docker build stage with only opus-dev installed - I don't think this should matter.

Supporting cross compiling for musl

The build.rs decides whether to use a static or dynamic opus based on the host environment, rather than the target. This means that by default, a build of a binary using this crate with --target x86_64-unknown-linux-musl will look like this:

        linux-vdso.so.1 (0x00007ffd027fa000)
        libopus.so.0 => /usr/lib/libopus.so.0 (0x00007f5cfa9f7000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f5cfa8b1000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f5cfa6ea000)
        /lib/ld64.so.1 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f5cfaadd000)

This is a small issue, easily worked around by building with OPUS_STATIC=1. Unfortunately, this too has problems. If I build on my host machine (Arch linux):

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--eh-frame-hdr" "-m64" "-nostdlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.1944j929e2ydwxpa.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.205px9ivd5z5eahx.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.2kjgu9ng3mdxq3si.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.2saga46ilno96qd6.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.34d7hegztlp8qzap.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.3fv3w2s7diy7yc8m.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.4apt6o2u4paazbc9.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.gz75pbti22wmemj.rcgu.o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.qgresvnj35ypm0g.rcgu.o" "-o" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/serenity_build_test-7848b8fefb6f83b3.26degt12ei47jdw2.rcgu.o" "-Wl,--gc-sections" "-no-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps" "-L" "/home/jamie/Misc/serenity-build-test/target/debug/deps" "-L" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/build/audiopus_sys-66748378a9d9a394/out/lib" "-L" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/build/backtrace-sys-ef152de9f365ee7d/out" "-L" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/build/ring-6b98223915b4bebc/out" "-L" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/build/libsodium-sys-6911eeb94805a9a7/out/installed/lib" "-L" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libserenity-2fe7f7d543f90df8.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libsodiumoxide-ccca8a49265a3ae0.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liblibsodium_sys-60207a8448be03dd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand-3af753b86331f379.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_chacha-58b783cc3d8f6e67.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libc2_chacha-56c5c90d09b2c79e.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libppv_lite86-e3534a13088ddcfd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_core-e8999c965b56bc7c.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libgetrandom-c4ccfa77443e7a0a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus-c341373e6d27d159.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus_sys-be19165e65ee5632.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libthreadpool-b81254cebbaa884d.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtypemap-b5817158666aeff7.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libunsafe_any-fa2d2246da3b806c.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtraitobject-122fcb80605054a1.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbitflags-14b84512f3155e66.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libreqwest-67ab45782cc76f90.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libhyper_rustls-80412acda1c093c6.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libwebpki_roots-f2bc50752f8770e8.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_rustls-f3f50657e29727b4.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librustls-29cb22d7ed145aee.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libwebpki-f52a874d4ffbb795.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libct_logs-406bb0e9634fdb28.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libsct-a3b72c2e784ff106.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libring-5371db7c996a2a76.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libspin-a18cbd985b29015e.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libuntrusted-b9c21c20b3365c61.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libuuid-2140b03c715afd11.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libserde_urlencoded-385db6cd275d53e7.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libdtoa-3ebd3dc3db11884d.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmime_guess-5d263eccff6775b2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libunicase-e8b9183adaddb769.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmime-b95e12389007487f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libhyper-947f2d1b59b58c55.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libwant-dde41f68bb4ffbe3.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtry_lock-0f61c9e8a4d5bfbd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio-613314fedb9a782b.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_timer-ec049d4f5afcfbe2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_threadpool-542c201689911aa2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcrossbeam_queue-f08454f367cc1c90.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcrossbeam_deque-c5ef684ec103cbc6.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcrossbeam_epoch-8cf322adfb21d06f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmemoffset-99aaef740ba0e7fc.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libarrayvec-70f55d14c580f8dc.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libnodrop-6224b850f6ea17c3.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_tcp-e5daa785f3b2a3df.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_reactor-988dad429852e0d2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_sync-2b84fab2373d6196.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_current_thread-030c1abba19524d4.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_executor-579003ea4fa3c61d.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcrossbeam_utils-2ad01a96433e61a9.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmio-c697421624eece8a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libnet2-8f0c77a0ec3a9980.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libhttp_body-dd62274af23412a3.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_buf-5e071599e70f0280.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libh2-ee77401a400ea103.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libindexmap-abefc4ad60df16e9.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libstring-a427643dc920935a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libslab-2d92c7cffdf42be5.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtokio_io-9f376d3d5bee78f8.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libfutures_cpupool-e848cc943c5e3cf5.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libnum_cpus-e4abfacf7a5addfd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libfutures-1d5444d74900fea0.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libencoding_rs-2f45bcbcfd16f433.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcookie_store-b83c0295465a6728.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libpublicsuffix-c4288b3e70a3d331.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libregex-d978730936b292ba.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libthread_local-d68a819a0098f398.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libregex_syntax-284c367993e601bd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaho_corasick-eb6ef634faa5d179.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmemchr-a8c5c5081e09950a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liblazy_static-71eaa6a70ea4830b.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liberror_chain-e7b755a0d18f8959.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtry_from-655671c2fde3cbe4.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libfailure-a2304091ce1d49a6.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbacktrace-1bb7f6b5ee5d46f7.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbacktrace_sys-b74e179a7352650f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librustc_demangle-48f704efd8a559f9.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcookie-530ab9a529106f8f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liburl-1c54b90af71f65db.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libpercent_encoding-11faf5250f5b4982.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libidna-5b6221d557782b9d.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libchrono-7dd25b9bcba661d3.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libnum_integer-37ecd14d080a6628.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libnum_traits-ecf5bc700c67ca2f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtime-d5e7e25c971890bb.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtungstenite-929f9bd07384b13b.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libhttp-c225ff6f103cbd4b.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libfnv-23149e3267bd7fb7.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libutf8-4ad7edf8189cb219.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liburl-036f0e2571ce6d00.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libpercent_encoding-d966fd60741ae44f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libidna-a3e8b59816dbc14a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libunicode_normalization-8516d2cc58c1f14b.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libunicode_bidi-7b74ae352aceab7f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libmatches-cccbdb2fa5e4f49a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libsha1-f98601018d1aced4.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libfake_simd-b92181136177c930.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libdigest-a5aa9f7a14677070.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libopaque_debug-2f7149d105f43c01.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libblock_buffer-415330063534b9c1.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libgeneric_array-a655256a2deeb96c.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libtypenum-e18dd442ed07d562.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libblock_padding-a5e4543ff7963f0c.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbyte_tools-74ac3deebb29e428.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand-dd99dae248763353.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_xorshift-2b85f439f70b3afd.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_pcg-22d66f00ade25d85.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_hc-ed46e3aaafe3ca16.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_chacha-527a60a246f2a203.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_isaac-135caa7072165583.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_core-aa429c51fd20d93f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_os-05a8d4e682619935.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_jitter-d144c64ba9cfb9bc.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/librand_core-e7a6c3eed51e4662.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libinput_buffer-23dc57ce50ee73ee.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libhttparse-978d199fd207e3be.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbytes-bdefa331854b3fb6.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libeither-d1f8450ace645422.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libiovec-642d8cbea1cdd3ef.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbase64-4f54cf6e931ac4c5.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libbyteorder-9f110270aaa31532.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liblog-297fd5b965f928c8.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libflate2-265805297a151cc2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libminiz_oxide-f9da697397c98ca5.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libadler32-38026be2806636b0.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcrc32fast-47e8ef5f76e88fcf.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libparking_lot-d3312a965763f508.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libparking_lot_core-760ec6bbebbca7b2.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liblibc-32954fef17b61274.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libcfg_if-ddee915e468b2182.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libsmallvec-d2aacdde36d48394.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/liblock_api-fa2c733084123719.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libscopeguard-341ad64ea112655a.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libserde_json-a3e68c554709b67f.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libryu-2b888db8d80b222c.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libitoa-31d31a138d8eeb11.rlib" "/home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libserde-07ca6169d1fae1a5.rlib" "-Wl,--start-group" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-57030b0ce75e073b.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-1bde76a071fa967f.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-8e33ccf3a09d88a1.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-dd9876ec17609feb.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace-ead4064e2c908e8a.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace_sys-65b8104fa5c9b551.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-860d3c980e0a707b.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-1abc9950a4adb292.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-39d94a27be851257.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-d04632e9513bbb05.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-f10bafc95f67685f.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-4259d8a4f2b365c6.rlib" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-556d4b174f913867.rlib" "-Wl,--end-group" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-449e8a5a39095721.rlib" "-static" "-Wl,-Bdynamic" "/home/jamie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o"
  = note: /usr/bin/ld: /home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus_sys-be19165e65ee5632.rlib(celt.o): in function `celt_fatal':
          /usr/include/bits/stdio2.h:100: undefined reference to `__fprintf_chk'
          /usr/bin/ld: /home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus_sys-be19165e65ee5632.rlib(bands.o): in function `memcpy':
          /usr/include/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
          /usr/bin/ld: /home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus_sys-be19165e65ee5632.rlib(PLC.o): in function `memcpy':
          /usr/include/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
          /usr/bin/ld: /home/jamie/Misc/serenity-build-test/target/x86_64-unknown-linux-musl/debug/deps/libaudiopus_sys-be19165e65ee5632.rlib(decode_core.o): in function `memcpy':
          /usr/include/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: could not compile `serenity-build-test`.

To learn more, run the command again with --verbose.

And if I build in the rust-musl-builder docker container:

error: linking with `cc` failed: exit code: 1                                                                                                                                                                      
  |                                                                                                                                                                                                                
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--eh-frame-hdr" "-m64" "-nostdlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.0.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.1.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.10.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.11.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.12.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.13.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.14.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.15.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.2.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.3.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.4.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.5.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.6.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.7.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.8.rcgu.o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.pipct_serenity.895um21t-cgu.9.rcgu.o" "-o" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/pipct_serenity-1ac88b86eba0b339.2c7k9iorxsgs53x1.rcgu.o" "-Wl,--gc-sections" "-no-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps" "-L" "/home/rust/src/target/release/deps" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/build/backtrace-sys-6503dff89cc5b522/out" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/build/audiopus_sys-745b9d9a4586a8e5/out/lib" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/build/ring-c0a069c52d9acfd7/out" "-L" "/home/rust/src/target/x86_64-unknown-linux-musl/release/build/libsodium-sys-8085227395f2f0ae/out/installed/lib" "-L" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libenvy-093d795753f3191b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libenv_logger-bfed85a920061b0b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtermcolor-9bf05f28675c0d66.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libatty-89530335ea624f8a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhumantime-c08945dd04a3478c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libquick_error-217415411bcbc83e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserenity-d43519aa5d8e7294.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsodiumoxide-a59182719e580d4a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblibsodium_sys-e11d31384f4a56e9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand-1d0cb532414869bf.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_chacha-2bbeff7d1fc2ffb9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libc2_chacha-a86d2a3640881101.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libppv_lite86-e9a65c2ec80c3f34.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_core-487744d42c971781.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libgetrandom-385110390092da2d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus-d7c88605b0cf2300.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libuwl-716b8534ffb0c275.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libthreadpool-f5aea95133a24a3b.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtypemap-cc4938d1c8059692.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunsafe_any-45ad365b014658d4.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtraitobject-1bbb77431b0982c9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbitflags-181af671baafbb8e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libreqwest-3e43d48f6e78e3fd.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhyper_rustls-b6819dd965e174e2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libwebpki_roots-3b852d8116f2b82a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_rustls-68c00b0a9b547638.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librustls-a900620d911cb2d7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libwebpki-64df207c7278d732.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libct_logs-65bfffd63f2a5f2f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsct-87d22d7ad0feb4c2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libring-fab6d1d26d0ecf58.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libspin-4c93deb890ca03e1.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libuntrusted-4ab45350cb24fc5e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libuuid-5902cf4103a08e42.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde_urlencoded-23098b0aafbc48de.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libdtoa-8af12b5f4d68bed0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmime_guess-640c970bb4ec11e2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicase-f24c5b70d54f968c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmime-0fa429c880019363.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhyper-b753bca3d6c415ae.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libwant-4cd6f52e652a7f2e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtry_lock-1c03a1309ab23426.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio-4490b41dcaa47407.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_timer-7f941faabfd9b1a2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_threadpool-b0791cf9d85d59ae.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_queue-655e85f49696d81e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_deque-6b87e9c517427142.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_epoch-b44ef0673b93d1ef.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmemoffset-c0c5470b31be4fcd.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libarrayvec-8f761421e25a29fa.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnodrop-896f77a50ab1b581.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_tcp-688fc393f639f00a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_reactor-25fd937b0fc0d7e8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_sync-5d4d021746a68089.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_current_thread-0c28e59fdd1c6c6e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_executor-52ebd3dc0582cead.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrossbeam_utils-666c08f88f45ffd2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmio-ed4216b0230dfb4c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnet2-55031d21ea345689.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttp_body-a56bf1e6fe626378.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_buf-72b5c43a5c5ab770.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libh2-e89b8b0ed1ee0d1c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libindexmap-e9497934b942bbf1.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libstring-26449f89109af3e5.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libslab-179da58a6e7b6690.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtokio_io-5bde184ee3264da3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures_cpupool-7edee813306e469e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_cpus-f0b627d169b8fe1f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfutures-0e85a682922850fa.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libencoding_rs-770c9fd6d3459ed6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcookie_store-5409b1e4d18d269a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpublicsuffix-e4b228f3c831b7bb.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex-bece8143094c52a2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libthread_local-9f1749ae98a899b3.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libregex_syntax-19eac5326d045764.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaho_corasick-5fd2b73815454d73.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmemchr-57ad4f2707915974.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblazy_static-ee05bda1344d5e24.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liberror_chain-8bb7a4f4e72f86b7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtry_from-e20c7c1530fdbca6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfailure-b1df57b3fb77ceb9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbacktrace-86793429360e8527.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbacktrace_sys-f5d0da813344e78d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librustc_demangle-c43e787b73ac530f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcookie-902d2d4a9ddc4407.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liburl-d35f78853a01e767.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpercent_encoding-d1c451f7c63dc016.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libidna-a2a46049aca61d29.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libchrono-c50e6a95bbb7fc30.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_integer-d2948d600908f131.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libnum_traits-bb0c78bf2d0cb117.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtime-dd751e62b2bd82be.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtungstenite-e7d42a5b7184a081.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttp-5c4bb212f47e88b1.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfnv-ea4cf62e3f5093da.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libutf8-2c90c8c73b49ee9e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liburl-beed7290c5e43a0e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libpercent_encoding-f4593ce918e1d9fe.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libidna-c8f45ed5227fce57.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_normalization-bf9605004b18cd57.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libunicode_bidi-6d9204ce5d8892bb.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libmatches-cc0c87778c519b4f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsha1-c718ea163bb7fe1f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libfake_simd-0ade31ee060cbdb5.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libdigest-ac12c0334b17ce39.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libopaque_debug-85169466ef2ddaf7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libblock_buffer-72f0223821c9a607.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libgeneric_array-b43d74713ac13968.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libtypenum-267d91a2ddf8021d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libblock_padding-81f81d4d814cbc53.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbyte_tools-533adf65ba05f3b8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand-be977cccbcd62f74.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_xorshift-7718218d0a9afbe0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_pcg-a19449c27cf6d42c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_hc-d667ed95ecdacaef.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_chacha-f51533313e263aae.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_isaac-accb38359ba72e0f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_core-08989c3457bbf997.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_os-b33524d0ea8c7ca8.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_jitter-284948d22a2e909d.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/librand_core-aaf2608b9c47e154.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libinput_buffer-a6cfa62e0c592931.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libhttparse-460966dad87232ce.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbytes-c2151827eb639fe1.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libeither-28c7da35e2a5f41c.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libiovec-77e6066965ad3229.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbase64-8fdce9932314d4dc.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libbyteorder-218dbc38f2aacff7.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libflate2-efbf6d01ba38374e.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libminiz_oxide-5fcf3182af22d4e4.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libadler32-19b18d377b5e3e5f.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcrc32fast-045b8853423885e9.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libparking_lot-8369f8f828c95735.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libparking_lot_core-1df7460faf2523e0.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblibc-ebcd6c8af5ccc483.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libsmallvec-41a92b835cb6fcfd.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblock_api-598de12a8396b85a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libscopeguard-600bb93b84af58de.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde_json-dd210239e321c02a.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libryu-e991d6726f3b2fa2.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libitoa-4f5de07c6ea08e34.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libserde-5436e3e5d9eaa5a6.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/liblog-bc67801ec9b95e14.rlib" "/home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libcfg_if-bd18bef0af7b93ac.rlib" "-Wl,--start-group" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-e396f1d0c01598a4.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-167980ef7fb3dbe1.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace-75d75a9578126353.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libbacktrace_sys-911f6c49d34abec3.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-abf6d2ed07e18a6c.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-e7494298a9d64f27.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-43b985138cb31736.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-733035d7b63c7282.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-39522d4f6367013a.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-b2a09311f0187f78.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-fffb87ba755a39cd.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-c21144bcaca5d612.rlib" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-5513b0df82523eb2.rlib" "-Wl,--end-group" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-2d85891f05ca39b2.rlib" "-static" "-Wl,-Bdynamic" "/home/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o"                                                                                                                                                                                                       
  = note: /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(celt.o): In function `fprintf':                                                                       
          /usr/include/x86_64-linux-gnu/bits/stdio2.h:97: undefined reference to `__fprintf_chk'                                                                                                                   
          /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(encode_frame_FLP.o): In function `memcpy':                                                            
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(pitch_analysis_core_FLP.o): In function `memset':                                                     
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71: undefined reference to `__memset_chk'                                                                                                          
          /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(bands.o): In function `memcpy':                                                                       
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(PLC.o): In function `memcpy':                                                                         
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          /home/rust/src/target/x86_64-unknown-linux-musl/release/deps/libaudiopus_sys-ad32205088bc41e0.rlib(decode_core.o): In function `memcpy':                                                                 
          /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34: undefined reference to `__memcpy_chk'                                                                                                          
          collect2: error: ld returned 1 exit status                                                                                                                                                               
                                                                                                                                                                                                                   

error: aborting due to previous error                                                                                                                                                                              

error: Could not compile `pipct-serenity`.                                                                                                                                                                         

To learn more, run the command again with --verbose. 

In both cases, it seems like the correct includes are not being set up for cross-compilation. Unfortunately I cannot compile from a musl host, as musl does not support proc macros

Any ideas about how to get this compiling?

Compilation on aarch64-apple-ios fails.

My project uses opus-rs v0.3.0 which references audiopus-sys v0.2.2.
When I specified aarch64-apple-ios as the target to build for iOS, the following error was displayed.

(*'-') < cargo build --target aarch64-apple-ios --release                                                                                                                                                                                            [dev]
    Updating crates.io index
   Compiling ring v0.16.20
   Compiling rustls v0.20.6
   Compiling num-complex v0.3.1
   Compiling ordered-float v2.10.0
   Compiling rmp v0.8.11
   Compiling cexpr v0.6.0
   Compiling audiopus_sys v0.2.2
   Compiling serde_derive v1.0.137
   Compiling tokio-macros v1.8.0
   Compiling futures-macro v0.3.21
   Compiling darling_core v0.13.4
   Compiling thiserror-impl v1.0.31
   Compiling num-bigint v0.3.3
   Compiling num-iter v0.1.43
   Compiling async-trait v0.1.56
   Compiling async-stream-impl v0.3.3
   Compiling crypto-common v0.1.3
   Compiling block-buffer v0.10.2
   Compiling hashbrown v0.11.2
   Compiling bindgen v0.59.2
error: failed to run custom build command for `audiopus_sys v0.2.2`

Caused by:
  process didn't exit successfully: `player-rs/target/release/build/audiopus_sys-4e38d88cac7bbdab/build-script-build` (exit status: 101)
  --- stdout
  cargo:info=No feature or environment variable found, linking by default.
  cargo:rerun-if-env-changed=OPUS_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-apple-ios
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_apple_ios
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-ios
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_ios
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-ios
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_ios
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:info=`pkg_config` could not find `Opus`.
  cargo:info=Opus source path used: "/Users/xxxxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus".
  cargo:info=Building Opus via CMake.
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-ios = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_ios = None
  TARGET_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-ios = None
  CMAKE_GENERATOR_aarch64_apple_ios = None
  TARGET_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  running: "xcrun" "--show-sdk-path" "--sdk" "iphoneos"
  exit status: 0
  running: "xcrun" "--show-sdk-path" "--sdk" "iphoneos"
  exit status: 0
  CMAKE_PREFIX_PATH_aarch64-apple-ios = None
  CMAKE_PREFIX_PATH_aarch64_apple_ios = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-ios = None
  CMAKE_aarch64_apple_ios = None
  TARGET_CMAKE = None
  CMAKE = None
  running: "cmake" "/Users/xxxxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus" "-DCMAKE_OSX_SYSROOT=/" "-DCMAKE_OSX_DEPLOYMENT_TARGET=" "-DCMAKE_INSTALL_PREFIX=/Users/xxxxx/Documents/job/git/ios/player-rs/target/aarch64-apple-ios/release/build/audiopus_sys-736f1bafad9309c3/out" "-DCMAKE_C_FLAGS= -fPIC --target=aarch64-apple-ios -arch arm64 -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode" "-DCMAKE_C_COMPILER=/usr/bin/clang" "-DCMAKE_CXX_FLAGS= -fPIC --target=aarch64-apple-ios -arch arm64 -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode" "-DCMAKE_CXX_COMPILER=/usr/bin/clang++" "-DCMAKE_ASM_FLAGS= -fPIC --target=aarch64-apple-ios -arch arm64 -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode" "-DCMAKE_ASM_COMPILER=/usr/bin/clang" "-DCMAKE_BUILD_TYPE=Release"
  -- Opus project version: 0
  -- The C compiler identification is AppleClang 13.1.6.13160021
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - failed
  -- Check for working C compiler: /usr/bin/clang
  -- Check for working C compiler: /usr/bin/clang - broken
  -- Configuring incomplete, errors occurred!
  See also "/Users/xxxx/Documents/job/ios/player-rs/target/aarch64-apple-ios/release/build/audiopus_sys-736f1bafad9309c3/out/build/CMakeFiles/CMakeOutput.log".
  See also "/Users/xxxx/Documents/job/ios/player-rs/target/aarch64-apple-ios/release/build/audiopus_sys-736f1bafad9309c3/out/build/CMakeFiles/CMakeError.log".

  --- stderr
  CMake Warning at cmake/OpusPackageVersion.cmake:61 (message):
    Could not get package version.
  Call Stack (most recent call first):
    CMakeLists.txt:5 (get_package_version)


  CMake Error at /opt/homebrew/Cellar/cmake/3.24.1/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
    The C compiler

      "/usr/bin/clang"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: /Users/xxxx/ios/player-rs/target/aarch64-apple-ios/release/build/audiopus_sys-736f1bafad9309c3/out/build/CMakeFiles/CMakeTmp

      Run Build Command(s):/usr/bin/make -f Makefile cmTC_d8f2e/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_d8f2e.dir/build.make CMakeFiles/cmTC_d8f2e.dir/build
      Building C object CMakeFiles/cmTC_d8f2e.dir/testCCompiler.c.o
      /usr/bin/clang   -fPIC --target=aarch64-apple-ios -arch arm64 -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode  -arch x86_64 -MD -MT CMakeFiles/cmTC_d8f2e.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_d8f2e.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_d8f2e.dir/testCCompiler.c.o -c /Users/xxxxx/Documents/job/ios/player-rs/target/aarch64-apple-ios/release/build/audiopus_sys-736f1bafad9309c3/out/build/CMakeFiles/CMakeTmp/testCCompiler.c
      Linking C executable cmTC_d8f2e
      /opt/homebrew/Cellar/cmake/3.24.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d8f2e.dir/link.txt --verbose=1
      /usr/bin/clang  -fPIC --target=aarch64-apple-ios -arch arm64 -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk -fembed-bitcode  -arch x86_64 -Wl,-search_paths_first  CMakeFiles/cmTC_d8f2e.dir/testCCompiler.c.o -o cmTC_d8f2e
      ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/usr/lib/libSystem.tbd (4 slices)
      ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[1]: *** [cmTC_d8f2e] Error 1
      make: *** [cmTC_d8f2e/fast] Error 2





    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:7 (project)


  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /Users/xxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

I don't know if it's the best way, but I was able to compile by setting some environment variables with reference to the link below.
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos

export CMAKE_OSX_ARCHITECTURES="arm64"                                                                                                                                                                                                                         
export CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH="NO"                                                                             
export CMAKE_IOS_INSTALL_COMBINED="YES"

The best way is to just pass the target to cargo and it will compile, any good ideas?

Stack smashing protection causing issues with Windows targets

I've been using audiopus_sys 0.2.2 via audiopus 0.3.0-rc.0, In my Cargo.toml, I've used the static option to ensure that libopus is built from source. In an Ubuntu environment I've been cross compiling my project for the x86_64-pc-windows-gnu and i686-pc-windows-gnu targets. However, I have encountered linking issues due to stack-smashing protection (SSP). These manifest as follows:

  = note: /target/i686-pc-windows-gnu/debug/deps/libaudiopus_sys-b661dfe0e9f65081.rlib(opus_decoder.c.obj): In function `opus_decoder_get_size':
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:103: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:114: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:114: undefined reference to `__stack_chk_fail'
          /target/i686-pc-windows-gnu/debug/deps/libaudiopus_sys-b661dfe0e9f65081.rlib(opus_decoder.c.obj): In function `opus_decoder_init':
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:117: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:157: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:157: undefined reference to `__stack_chk_fail'
          /target/i686-pc-windows-gnu/debug/deps/libaudiopus_sys-b661dfe0e9f65081.rlib(opus_decoder.c.obj): In function `opus_decode_frame':
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:222: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:624: undefined reference to `__stack_chk_guard'
          /cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.2.2/opus/src/opus_decoder.c:624: undefined reference to `__stack_chk_fail'

From what I can tell, the Opus library will compile using SSP functionality by default which is what causes these references. I was able to work around the issue by creating a .cargo/config.toml as follows:

[target.x86_64-pc-windows-gnu]
rustflags = [ "-C", "link-arg=-lssp" ]

[target.i686-pc-windows-gnu]
rustflags = [ "-C", "link-arg=-lssp" ]

I also have a build for x86-64 musl, but did not encounter this issue.

Bindgen linking error

Seems like this can be mitigated by not using specific versions at build-dependencies for.

Bindgen error:

    Updating crates.io index
error: failed to select a version for `clang-sys`.
    ... required by package `bindgen v0.48.1`
    ... which is depended on by `audiopus_sys v0.1.0`
    ... which is depended on by `audiopus v0.1.0`
    ... which is depended on by `netsound v0.1.0 (/Users/mozgiii/Desktop/netsound)`
versions that meet the requirements `^0.26.4` are: 0.26.4

the package `clang-sys` links to the native library `clang`, but it conflicts with a previous package which links to `clang` as well:
package `clang-sys v0.28.0`
    ... which is depended on by `bindgen v0.51.0`
    ... which is depended on by `netsound v0.1.0 (/Users/mozgiii/Desktop/netsound)`

error: failed to run custom build command for `audiopus_sys v0.1.8`

Is this normal I'm getting the following error ? I use songbird 0.2.2 (latest version) and it uses audiopus 0.2.0 which uses audiopus_sys v0.1.8. Could it be done if there is a quick way to patch the v0.1.8? (maybe add a version v0.1.9 since audiopus uses version '0.1' in their Cargo.toml)

Caused by:
  process didn't exit successfully: `/home/thalusa/CLionProjects/dmr-bridge-discord/target/debug/build/audiopus_sys-f59a36797e33bc33/build-script-build` (exit status: 101)
  --- stdout
  cargo:info=No feature or environment variable found, linking by default.
  cargo:rerun-if-env-changed=OPUS_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:info=`pkg_config` could not find `Opus`.
  cargo:info=Opus source path: "/home/thalusa/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.8/opus".
  cargo:info=Opus will be built as dylib-library.
  Updating build configuration files, please wait....

  --- stderr
  configure.ac:38: warning: macro 'AM_PROG_LIBTOOL' not found in library
  configure.ac:37: warning: The macro `AC_MINGW32' is obsolete.
  configure.ac:37: You should run autoupdate.
  ./lib/autoconf/specific.m4:347: AC_MINGW32 is expanded from...
  configure.ac:37: the top level
  configure.ac:41: warning: The macro `AC_PROG_CC_C99' is obsolete.
  configure.ac:41: You should run autoupdate.
  ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
  configure.ac:41: the top level
  configure.ac:172: warning: The macro `AC_WARN' is obsolete.
  configure.ac:172: You should run autoupdate.
  ./lib/autoconf/oldnames.m4:33: AC_WARN is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  ./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
  configure.ac:172: the top level
  configure.ac:199: warning: The macro `AC_TRY_COMPILE' is obsolete.
  configure.ac:199: You should run autoupdate.
  ./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
  m4/as-gcc-inline-assembly.m4:12: AS_GCC_INLINE_ASSEMBLY is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  configure.ac:199: the top level
  configure.ac:459: warning: The macro `AC_HELP_STRING' is obsolete.
  configure.ac:459: You should run autoupdate.
  ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
  configure.ac:385: OPUS_PATH_NE10 is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  lib/m4sugar/m4sh.m4:594: AS_CASE is expanded from...
  lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
  configure.ac:459: the top level
  configure.ac:38: error: possibly undefined macro: AM_PROG_LIBTOOL
        If this token and others are legitimate, please use m4_pattern_allow.
        See the Autoconf documentation.
  autoreconf: error: /usr/bin/autoconf failed with exit status: 1
  thread 'main' panicked at 'Failed to autogen Opus.', /home/thalusa/.cargo/registry/src/github.com-1ecc6299db9ec823/audiopus_sys-0.1.8/build.rs:102:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.