-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Tier System: x86_64-freebsd
#1759
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
Comments
That's a raspberry pi 3? We have a small armada of those in the Node.js CI. They're a lot faster than the pi 1 and 2 but still so much slower than regular server hardware that we cross-compile and shard the test suite across 10 or 12 machines. That's a long-winded way of saying they're not really an option unless you're really patient. :-) |
Yes it is. Thanks for the heads up! |
re: CI, I'm "starting" a buildbot cluster at https://porting.club — currently it's just a Scaleway 4-core ThunderX VPS (the master as well as the first worker, which is a jail on the same box). (btw ThunderX cores are comparable to Cortex-A72s / significantly faster than the A53s the RPi has) (@bnoordhuis I guess Node.js builds its own copy of V8, while Zig wouldn't need to build any monster dependencies, and the compiler itself is kinda lightweight. Oh wait, LLVM can be a memory hog though, and the Pi only has 1GB.) |
@myfreeweb that's exciting. Keep me updated. In other news I updated the support table in the README to use a "tier" system: https://github.com/ziglang/zig#support-table I think what I'll do is review the freebsd2 branch, make any changes that I see fit, and then merge it into master. Then freebsd becomes Tier 2 for x86_64 and i386. And then this issue can remain open to track Tier 1 support. |
I just merged the |
I rented a freebsd server for an hour and poked at it. Here's what I accomplished:
Now Hello World works and the behavior tests pass in debug mode. ReleaseFast mode doesn't pass, and the standard library tests require more porting work in order to compile. But they're in a state where I think it's easy to contribute to. |
One of the developers from FreeBSD stopped by and clarified that the stable kernel ABI is in fact through libc, and so we will now switch to doing it that way, like we do for MacOS. |
Since the stable kernel ABI is through libc ziglang#1759
Thanks @ararslan and @mgxm for the CI pull requests. We now have sr.ht building successfully on x86_64 FreeBSD on every pull request and master branch commit. However, all tests are disabled except for the behavioral tests in debug mode (which all pass). So - we've now ensured that FreeBSD won't regress accidentally. And we can progress on Tier 1 Support by getting more tests to pass, and then making sure those tests are run by CI. Once we get all the tests passing, I'll work on static FreeBSD builds being available on ziglang.org/download. Progress! |
See this comment for a proof of concept of cross compiling glibc: #514 (comment) With regards to FreeBSD here are the next steps:
|
keep in mind the funny build process for crt1 required for the ABI version metadata
hm. Do ctors/dtors from shared libraries work without crtbegin/end in the executable? |
I've been staring at glibc code for 7 days now, that "funny build process" looks incredibly clean and easy to understand 🤣
Based on my understanding, crtbegin.o and crtend.o are the "old way" of doing things and aren't necessary with newer C runtime libraries. I haven't tested it yet though. Another option we have is saying "that's not supported". I think you would have trouble finding someone who thinks shared library constructors/destructors are a good idea. Finally a third option is to stop fighting it, and support building crtbegin.o and crtend.o. I looked at the code in gcc, and it wouldn't be straightforward. But I have a few ideas to try that could solve it. |
By the way what ABI does zig say is native for you on freebsd?
Which one do you think makes sense to be the native one? I'm trying to understand this triple: |
✋ why would they be a bad idea? How else should a shared library e.g. initialise an initialisation mutex? |
|
oh, right,
Look at the Nothing prevents me from doing
:) |
I started working on making FreeBSD builds available in the
when I run it manually in a freebsd server that I'm renting, works fine. But in the sr.ht freebsd CI, it prints:
and nothing else. It's hard to tell what the problem is because as far as I understand the environments should be the same, and it works fine in the environment that I have shell access to. |
FreeBSD binary builds available on the download page are also blocking on this sr.ht issue. |
|
Good news for FreeBSD folks, I added some memory profiling code in #3482, and it looks like there are some straightforward changes to make which will greatly reduce memory usage. Hopefully this will put us within sr.ht's requirements so that we can enable all the tests. Then Tier 1 Support will basically be down to supporting cross compiling for FreeBSD's libc. |
More progress: #4458 |
enable std lib freebsd tests on the CI See #1759
I'm going to audit the structs today, will post any updates here if they arise. |
Here's the issue to track FreeBSD support.
History:
freebsd
branch.freebsd2
branch.freebsd2
is now merged into master, and FreeBSD has Tier 2 Support status.Checklist:
freebsd2
branchstd/os/freebsd.zig
to make sure the ABIs are correct and match the system header files.Once this is complete, we can mark FreeBSD x86_64 as having Tier 1 support.
The text was updated successfully, but these errors were encountered: