-
Notifications
You must be signed in to change notification settings - Fork 254
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
tinycbor
dependency doesn't build on macOS/BSD when cjson
is installed
#353
Comments
Just for kicks also tried |
@n8henrie thanks for highlighting this issue. We expect to resume work on C2Rust in the near future so once we are able to get off the late 2019 nightly version we're currently pinned to, this issue should get resolved en passant. |
Great, well thanks for getting back to me! |
Any update to this issue? |
We're exploring options to use other Rust parsing APIs such as Rust Analyzer instead of the Rust compiler internals. We don't have a firm date for when we'll have something ready for you to test out but hopefully it will happen in Q1 of this year. |
Blocked on #364. |
Fixed with the v0.16.0 release |
This does not seem to be fixed, but for another reason. To set the llvm-config path, homebrew on m1 will place it in
|
@jkcoxson is that at install time or run time? Installing fine for me following instructions in the README: $ uname -m
arm64
$ LLVM_CONFIG_PATH=/opt/homebrew/opt/llvm/bin/llvm-config cargo install c2rust |
This is install time. I've progressed further by setting |
Looks like something is wrong with your build environment. |
That error was solved by changing to a C 11 compiler, but the current problem is the linker errors in the final link. |
@jkcoxson can you run the below and report back with your output? $ /usr/bin/uname -m
arm64
$ /usr/bin/uname -v
Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101
$ cd $(mktemp -d)
$ cargo --version
cargo 1.60.0 (d1fd9fe2c 2022-03-01)
$ /opt/homebrew/opt/llvm/bin/llvm-config --version
13.0.1
$ LLVM_CONFIG_PATH=/opt/homebrew/opt/llvm/bin/llvm-config cargo install c2rust |
|
Don't forget the full output of EDIT: And I'd recommend the |
|
Thanks. As it's not included with your output, can you confirm you ran with I wonder if updating to |
Yes, I ran with that env var before the command. Just updated to the latest cargo and got the same output. |
Could you have some lingering build flags?
Anything interesting in If you run with a clean environment (other than
|
I think the root problem here is an outdated system Clang toolchain: in any sane environment, your system clang should be a C11 compiler. By switching to Concretely: what does |
❯ llvm-config --version ❯ gcc --version
|
@gcxfd I'm not sure if yours is the same issue:
|
Looking at this again, the
anholt/libepoxy#169 This is best explained here. I'm not sure what the easiest fix is on our side, but I'll look into it and report back. |
@gcxfd By the way, you can install |
As far as I can tell, on Linux at least, our build of @gcxfd, can you build tinycbor directly on your machine? git clone https://github.com/intel/tinycbor.git --branch v0.5.3 && cd tinycbor && make CFLAGS=-fPIC |
@kkysen I can't build tinycbor as image above |
That's weird. I just borrowed someone's mac to debug, and when I ran that same command (after a fresh xcode tools installation), it worked fine for me, and |
I think |
tinycbor
dependency doesn't build on macOS/BSD when cjson
is installed
Should be fixed by #464, which disables I also filed intel/tinycbor#220 to fix the issue upstream instead of just skirting around it. |
@gcxfd and @jkcoxson, could you also test intel/tinycbor#221 on tinycbor itself with? git clone https://github.com/kkysen/tinycbor.git && cd tinycbor && make |
The upstream fix, intel/tinycbor#221, was merged, so you can test with this now: git clone https://github.com/intel/tinycbor.git && cd tinycbor && make |
Not having any luck because aarch64-apple-darwin doesn't exist for
2019-12-05
.Attempting with a current nightly:
Unsurprisingly, same error trying to build locally:
Is there a toolchain available for
aarch64-apple-darwin
that I can use to build / install c2rust?The text was updated successfully, but these errors were encountered: