ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Linux compatibility is only available on amd64 and i386
Linuxulator also supports arm64/aarch64 (support started being added in 2018). There are increasing amounts of bug fixes over time and we could limit ports support to FreeBSD 13 and up.
Just noting here so we have a reference point.
The editors/sublime-text4 port is using this feature on Aarch64 and is the perfect test case to validate when it works.
This was briefly discussed on Twitter: https://twitter.com/Ericbsd/status/1415402574728077313
Okay, this is turning into a much larger body of work, so I'm going to start documenting things as I find them.
1) bsd.sites.mk also needs updating to include aarch64 before linux.mk will work. Both in the centos and epel7 sections need aarch64 support.
2) emulators/linux_base-c7: compat-libstdc++-33-3.2.3-72.el7 doesn't exist on aarch64.
3) emulators/linux_base-c7: redhat-lsb-core has a different filename between i386/amd64 and aarch64.
Currently it looks like linux.mk assumes that all archs have the same file list when doing a "makesum" - this assumption is no longer true on aarch64 with the two noted files above. We'll need to come up with a way to provide a dynamic file list that'll work on all arches for makesum to work properly.
@Ed/Vince If this ends up being a tracking issue, please feel free to self-assign and created separate dependent issues
Here is my personal work-in-progress attempt to get emulators/linux_base-c7 working.
Currently, its pulling in a PLIST from some unknown location, so throwing errors attempting to make the package. Even outright deleting the pkg-plist.amd64 and pkg-plist.i386 files, there are still references to i386 being included SOMEWHERE. I'm currently at a loss on this one.
"Fix the 'linux' rc script on aarch64"
This will need to be backported to 13-STABLE
Also, things are starting to work! :-O
WARNING: SOME OF THESE CHANGE BREAK I386/AMD64
- Check each individual c7 port to see if they have architecture specific pkg-plist files, and generate a new file for Aarch64
- linux-c7-dri is all kinds of broken and has sections of i386/amd64 upstream packages commented out, rather than properly architecture gated
- At least one port had issues with DISTFILES, but I don't remember which or what that issue was off the top of my head. This issue only effected "makesum" though, so I temporarily disabled DISTFILES while making the checksums on one of these, and then re-enabled it afterwards.
Updated almost all C7 ports to build on Aarch64. Currently there are 7 left giving me troubles that I've yet to look into exactly why, but should be easy enough to tackle once I get some time.
Remaining 7 ports:
Nice! Note that linux-c7-strace one isn’t going to work as-is, due to ptrace(2) missing on aarch64. But let me know when you have the port ready; implementing ptrace(2) is on my TODO list.
> linux-c7-strace one isn’t going to work as-is, due to ptrace(2) missing on aarch64.
That's really handy to know!
Yeah, right now, I've just been making sure the ports properly extract the upstream archives and put files in the correct places, and then have an updated plist file to built a FreeBSD package out of.
Only a small handful of the ports have I actively tried using and running.
Several though, I'm not sure exactly how to test, since many are just a single shared object file, and not knowing what relies on those to test with.
(In reply to Edward Tomasz Napierala from comment #8)
I went back and looked at what was wrong with linux-c7-strace, it was just a 32-bit vs 64-bit dependency reference in the Makefile. So the port is good, just need that ptrace(2) work now!