-
Notifications
You must be signed in to change notification settings - Fork 2
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
Compiling on Nixos/OSX/Windows ? #120
Comments
I don't have (I don't think any of us do) a nixos box, so can't comment on that: we really only test this on Debian (and maybe Arch). I wonder if you've not done a clone with submodules, perhaps? |
The x.py or config contained some nixos specific patch executable flags. So I looked it up: x.py build seems to install boehmgc to /usr/lib which is readonly on nixos systems or don't exist. So in that case a different install location must be chosen and it must be found by Rust. Then it probably works. |
Ah, yes, and you probably wouldn't have rights to install in |
Can you help me with the static error ? Because cd src/bdwgc configure make -> same on recent Ubuntu. My understanding is that bdwgc is a fork of boehmgc so it should just compile cause it's basically C |
Can you give the exact sequence of commands you're running (ideally starting at |
These work:
docker ubuntu clang
The ubuntu gcc version is missing c++ - probably could be fixed easily. So at least 2 versions to start finding out the difference. |
Just to check: with the above configurations you can compile Alloy? If so, then I would start looking at the differences in versions (e.g. of clang/gcc) between the configurations that succeed/fail. That might point out the culprit. |
I was interested in how far I would get compiling on OSX:
That's the result after removing the assertion about pointer/platform. So again bdwgc seems to be a limiting factor. Is there any documentation why that version was used rather than latest official ? To me it feels like GC_malloc .. should be stable interface.
|
Can you show me your exact build steps for compiling on OSX? It is not possible to compile Alloy with the official BDWGC library because we use a custom fork to support Rust features which would otherwise be unsound. Much of this is around finalisation and supporting thread-locals. We have only tested Alloy on Linux with x86_64 machines because our fork contains non-portable code (e.g. for making roots discoverable from inside thread-locals) so I would imagine even if you were to get Alloy to compile on OSX you may encounter subtle GC bugs around this. |
Compiling Alloy on Nixos Linux:
using nix-shell to add boehmgc from nixos:
There is src/bdwgc (your fork)
And on Ubuntu (within docker) I it worked with:
/usr/lib/x86_64-linux-gnu/libgccpp.so.1.4.1
/usr/lib/x86_64-linux-gnu/libgccpp.so.1
So what's the way to go?
Use your code ?
Try to use nixos and fix build.rs to find the shared libarries from env or
/run/current-system/ or such ?
The text was updated successfully, but these errors were encountered: