-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined symbols for architecture #46
Comments
Hello @macthecadillac. Is this a macOS program? from a quick search what I found is that what is missing is that you need to link the |
I intend for it to eventually work on macOS, Linux and Windows. I had a hunch that was the problem but I couldn’t find a way to change how `dune` calls the linker when it comes to “foreign archives” after spending hours looking for it/playing with it yesterday. A similar problem exists on Linux (symbol not found and all that but the output is obviously a bit different) so I don’t think it’s macOS specific problem. If there’s no other way I can obviously split this into a separate rust program and have my ocaml code communicate with it through stdin or something but I prefer having everything in a single binary.On Nov 21, 2022, at 10:06 AM, Bruno Deferrari ***@***.***> wrote:
Hello @macthecadillac. Is this a macOS program? from a quick search what I found is that what is missing is that you need to link the Security.framework framework (how that is done, I am not sure, not very familiar with the apple-specific stuff).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I might have found a way to completely bypass this problem (mostly by cherry-picking which component crate of |
Hi,
I have been having this issue with linking when I was trying to connect the rust library
tectonic
to ocaml. The library itself compiles fine--as a matter of fact, if I make a standalone rust executable by turning mylib.rs
into amain.rs
and giving it a minimalfn main()
it builds and runs just fine. The issue only happens when I usedune build
to build and link ocaml code to my rust code, and it only happens with this specific library, which made its origin a bit mysterious to me. I tried the exact same thing with the libraryxlsxwriter
(which itself is a wrapper around a C library) and it worked like a charm.The following is one of the linker commands when I run
cargo
manually (I am exposing bothtectonic
andxlsxwriter
in mylib.rs
here):The following is the final command
dune
issued before it hit an error:The first few lines of the >1000 lines of linker output:
My machine runs macOS on M1 Pro. I also tried this on an x86 Linux machine and a similar result happened (obviously with a slightly different linker output).
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: