You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I've been using
audiopus_sys
0.2.2 viaaudiopus
0.3.0-rc.0, In myCargo.toml
, I've used thestatic
option to ensure thatlibopus
is built from source. In an Ubuntu environment I've been cross compiling my project for thex86_64-pc-windows-gnu
andi686-pc-windows-gnu
targets. However, I have encountered linking issues due to stack-smashing protection (SSP). These manifest as follows: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:I also have a build for x86-64 musl, but did not encounter this issue.
The text was updated successfully, but these errors were encountered: