Closed mikbry closed 1 year ago
Thanks for the report. My guess is this is related to the openh264-sys2/build.rs
changes I made to clean things up, which must have caused some issues (likely around try_compile_nasm()
).
I don't have a Mac anymore and would greatly appreciate if you or someone could help debugging this.
It seems like it was working before because nasm
was not being used at all.
Before there was a flag #[cfg(feature = "asm")]
, if the asm
was not defined nasm would not be used. In the other hand, now, the code inside try_compile_nasm
is always executed.
This can be proved by removing the contents of the try_compile_nasm
function.
fn try_compile_nasm(cc_build: &mut Build, root: &str) {}
Now, when we run the cargo command, it will be linked with no problem.
Thanks! Do you have nasm
installed on MacOS? Like, is only the detection broken, or is this related to some bad flags?
In reality there is something really wild going on because I was able to compile it just fine yesterday, the problem only started today; that is the reason why I found this GitHub issue ๐
I don't recall change anything since yesterday on my environment. I have nasm version 2.15.05
installed, and seems like the build.rs
is detecting it correctly.
Another thing that I did, was to copy the function code from a previous state, without the #[cfg(feature = "asm")]
condition and the result is the same.
Any hint on you better debug what is happening, I'm running out of ideas ๐ฌ
What OS / Rust version do you use?
OS: macOS 12.6.1
Rust: 1.67.0-nightly
, but already tested with stable 1.61.0
Also, if I look for the supposed missing symbols on the library they are there ๐ค
nm /Users/gil0mendes/projects/ghost-screen/openh264/target/debug/deps/libopenh264_sys2-ba9a72295344cf6d.rlib | grep DeblockChromaEq4H_ssse3
/Users/gil0mendes/projects/ghost-screen/openh264/target/debug/deps/libopenh264_sys2-ba9a72295344cf6d.rlib:lib.rmeta: no symbols
00000000000009d0 T DeblockChromaEq4H_ssse3
U _DeblockChromaEq4H_ssse3
U _DeblockChromaEq4H_ssse3
I just opened a PR with a possible fix to this issue. Happy to apply any change or suggestion to enhance it ๐
0.3.1 is out which hopefully fixes this, thanks @gil0mendes. Please comment or reopen if it doesn't.
No problem, was a pleasure to contribute ๐
@mikbry if you have the time just to confirm if this fixes it for you too would be wonderful, tks ๐ค
Thanks @gil0mendes @ralfbiedert , 0.3.1 fixes the prb !
openh264::formats::YUVBuffer::with_rgb
instead ofopenh264::formats::RBGYUVConverter::new
.I got
error: linking with
ccfailed: exit status: 1
And a list of undefined symbols:If I use
0.2.18
and revert back YUV changes, all is building and running fine.I am on Macos Ventura x64