Repository navigation
libiconv necessary on mac, doesn't link #488
Description
Activity
This seems to impact us because this crate depends on the
cargocrate which (transitively) requires thelibgit2-syscrate. There are a number of upstream reports related to this issue, but this recent one seems potentially helpful: rust-lang/git2-rs#830In any case, it does seem that this is an upstream issue and maybe not one we can easily fix ourselves (short of not depending on the
cargocrate), and that there are some viable workarounds for users (wrapping our build withport [de]activatelibiconv).We are planning on no longer depending on the
cargocrate soon (see #448). We'll just invokecargoas an external command and override$RUSTC_WRAPPER, so I think this shouldn't be an issue anymore if we fix that. It's possible we may needcargofor some small querying stuff after that, but I'm guessing it's small enough we can implement it ourselves or use something more detached likecargo metadata.- changed the title
[-]libiconv necessary on mac, doesn't link[/-][+]`libiconv` necessary on mac, doesn't link[/+]on Jul 7, 2022 Should fixing #448 be prioritized at all? How much of an issue is this for you, @boyland-pf? Fixing #448 would have a bunch of other small benefits as well, but isn't immediately pressing otherwise.
It's a low priority for me.
- addedbugSomething isn't workingSomething isn't workingbuildingBuild/compile errors or build system-relatedBuild/compile errors or build system-related
on Jul 9, 2022 - added a commit that references this issue
on Jul 22, 2022 @boyland-pf, can you confirm if this has been fixed now after #554 landed?
Yes, it's been fixed, instrumentation can run on mac.
Reacted by Khyber Sen
The mac version of c2rust with dynamic instrumentation enabled only requires libiconv at some point in the build, resulting in the following error.
This happens on my mac (a Catalina), which has iconv, and won't link libiconv (installed via brew) because it already has iconv which does the same thing.
This post on stackoverflow (https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx) has the best description of the problem that I've found.
Because the compilation is handled by cargo, I don't know how to find a list of all the compilation steps to add
--with-libiconv-prefix=<dir>to, or whether this would work.