-
Notifications
You must be signed in to change notification settings - Fork 14
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
How to build on macOS ? #10
Comments
In case you do not have access to macOS, instructions for building for a Debian system for arm64 (aarch64) would be great also. It is much easier for me to run arm64 Linux virtualized on macOS than to run x86_64. |
Hi @ijean Neither I have access to arm64 computer. Can I virtualize it on an ordinary x86_64 Linux or Windows? |
Hello, |
An old version of Free Oberon had SDL as a dependency, but now it is based on Allegro 5. SDL is not a dependency any more. I think I'll try QEMU |
I tried building on a Debian arm64 machine and failed. Than I tried to build just Ofront+, failed again. I opened a new issue on Ofront+ if you want to have a look Oleg-N-Cher/OfrontPlus#122 Thanks, |
SDL support is only needed to build examples (Target/macOS/Examples) that work with the graphics window. The Ofront+ itself does not need SDL and does not require it. |
@Oleg-N-Cher Biggest problem on macOS is that your provided ofront+ executable can't be run no matter what I tried (chmod +x and so on ...). I assume there is no way to build without having this ofront+ binary ? |
As you know, there is Intel-macOS and there is Motorola-macOS platforms. I offer a built binary for Motorola-Mac only.
No, you can still build your own binary for the platform you need using a host Linux system or Wine.
After that you will get the executables ofront+ and all utilities and you can rebuild ofront directly on your mac. The Wine method is a little simpler. If you have Wine installed on your mac, run Target/macOS/Lib/Bin/o2c.bat and Target/macOS/Bin/o2c.bat, after this, run Target/macOS/Lib/Bin/cc and Target/macOS/Bin/cc |
Yep, check the cc script from Target/macOS/Lib/Bin, your script tries to build and link with SDL2.
|
Well, you saw for yourself that your Linux on aarch64 compiled that. What a C compiler (version) did you use on your mac? |
On macOS Ventura (aarch64/arm64) I used the default C compiler - Clang:
|
Hmmm... I didn't know there was a macOS on the arm architecture. I don't see a quick way to help you, as although I have made Clang support for Ofront+, its various versions (especially newer ones) can have unexpected behavior. The module "Sound" that is causing the problems is not critical for Ofront+ builds. Try to remove it from Target/Lib/Bin/cc Ignore the warnings for now. Send me the full log with warnings as a text file. But I don't know where I can run exactly your version of Clang. What are your comments on this problem? |
After I removed Sound.c and Sound.o from the cc script I was able to build the library and executable ! (As a side note Apple moved all their laptops and desktops to the arm architecture since 2020.) I don't think Clang is the problem, C code is C code and it should be the same on both GCC and Clang. What is interesting is that same code behaves a bit different on Linux and macOS (both in principle POSIX systems). If you don't have access to a Mac produced after 2020, I think best approximation would be FreeBSD aarch64. FreeBSD also uses Clang as the default system compiler. An alternative is to use GitHub Actions which let you build software for various architectures. Apparently it is free for open source projects, but I never used it so I don't know exactly how it works: https://github.com/features/actions I've attached a file with the warnings I get when I run "cc" in Lib/Bin. |
I think I fixed the bugs. If you still have them, that would be weird. Plz, re-download the repository. See if these warnings happen again? |
Thanks, I was able to build it, still got the warnings but I built the ofront+ executable. |
I'll figure out what to do about the warnings when I can reproduce it at my place. If you manage to build examples (macOS/Examples), let me know. I haven't been able to do something with SDL. |
Hi,
I learned about FreeOberon from a HN post. I was able to to build and run the code in a x86_64 VM, but my main computing device is an arm64 MacBook from 2021 and I was wondering if it will be possible to build and use FreeOberon on macOS.
I installed liballegro 5 using Homebrew on my Mac, but the docs of FreeOberon seem to target mostly x86_64 Linux. It would be great if you could write a short intro of how to build it on macOS.
Regards,
Jean
The text was updated successfully, but these errors were encountered: