Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
It's great academic work, no doubt, but I am very skeptical about the practical future of this enterprise. The huge stumbling block is the GPU. I just don't see open source enthusiasts managing to reverse engineer the Apple GPU and write high-quality drivers for it.
 
Whut? What have I been building all these days on my Intel and M1 machines then?
It doesn't work with multi-filed projects. I tried it in cLion and it works, I tried it in Xcode and it works, but if you just do it with g++, it doesn't work. There is some linking issues and the linux team is working on it.

The following is a project that is 100% correct, but I got this.
You can find the source here -> https://repl.it/@dwharder/Fixed-point-representation#main.cpp

Code:
$ g++ main.cpp
In file included from main.cpp:4:
./fixed.cpp:8:10: error: expected '('
mantissa_{} {
         ^
./fixed.cpp:8:13: error: expected unqualified-id
mantissa_{} {
            ^
./fixed.cpp:25:10: error: expected '('
mantissa_{ new_mantissa } {
         ^
./fixed.cpp:25:24: error: expected ';' after expression
mantissa_{ new_mantissa } {
                       ^
                       ;
./fixed.cpp:25:12: warning: expression result unused [-Wunused-value]
mantissa_{ new_mantissa } {
           ^~~~~~~~~~~~
./fixed.cpp:25:27: error: expected unqualified-id
mantissa_{ new_mantissa } {
                          ^
./fixed.cpp:32:12: error: expected ';' at end of declaration
  fixed tmp{ real };
           ^
           ;
./fixed.cpp:51:30: error: expected '(' for function-style cast or type construction
    throw std::overflow_error{ "Addition would mantissaed in an overflow." };
          ~~~~~~~~~~~~~~~~~~~^
./fixed.cpp:54:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa_ + y.mantissa_ };
         ~~~~~^
./fixed.cpp:62:31: error: expected '(' for function-style cast or type construction
    throw std::underflow_error{ "Subtraction would mantissa in an underflow." };
          ~~~~~~~~~~~~~~~~~~~~^
./fixed.cpp:65:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa_ - y.mantissa_ };
         ~~~~~^
./fixed.cpp:81:18: error: expected ';' at end of declaration
  uint32_t xlower{ mantissa_ & 65535 };
                 ^
                 ;
./fixed.cpp:82:18: error: expected ';' at end of declaration
  uint32_t xupper{ mantissa_ >> 16 };
                 ^
                 ;
./fixed.cpp:84:18: error: expected ';' at end of declaration
  uint32_t ylower{ y.mantissa_ & 65535 };
                 ^
                 ;
./fixed.cpp:85:18: error: expected ';' at end of declaration
  uint32_t yupper{ y.mantissa_ >> 16 };
                 ^
                 ;
./fixed.cpp:87:14: error: expected ';' at end of declaration
  uint32_t lu{ xlower*yupper };
             ^
             ;
./fixed.cpp:88:14: error: expected ';' at end of declaration
  uint32_t ul{ xupper*ylower };
             ^
             ;
./fixed.cpp:89:14: error: expected ';' at end of declaration
  uint32_t ll{ xlower*ylower };
             ^
             ;
./fixed.cpp:91:20: error: expected ';' at end of declaration
  uint32_t mantissa{ xupper*yupper + (lu >> 16) + (ul >> 16) };
                   ^
                   ;
./fixed.cpp:112:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa };
         ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
 
  • Disagree
Reactions: Basic75
It doesn't work with multi-filed projects. I tried it in cLion and it works, I tried it in Xcode and it works, but if you just do it with g++, it doesn't work. There is some linking issues and the linux team is working on it.

From your error log it almost looks to me like your compiler is trying to compile C++ code as plain C. Why are you compiling with g++? Is this GCC?

Anyway, "multi-filed projects" (whatever that is) work just fine on Big Sur. I have no idea what linking issues you are referring to (you are pasting a compiler error log, not a linker error log) or what "Linux team" has to do with an Apple operating system...
 
  • Like
Reactions: Basic75
From your error log it almost looks to me like your compiler is trying to compile C++ code as plain C. Why are you compiling with g++? Is this GCC?

Anyway, "multi-filed projects" (whatever that is) work just fine on Big Sur. I have no idea what linking issues you are referring to (you are pasting a compiler error log, not a linker error log) or what "Linux team" has to do with an Apple operating system...
It's the same, I tried both. I honest don't know why it's acting up like this. The folder is on my desktop so, no permission issues there.

I think I meant the C++ compiler team.

Also, yes, my background is in Electrical Engineering, not in Software or Computer Engineering. I only know how to use compilers, I don't know how they work under the hood, and I don't have the ability to write compilers.

Code:
$gcc main.cpp
In file included from main.cpp:4:
./fixed.cpp:8:10: error: expected '('
mantissa_{} {
         ^
./fixed.cpp:8:13: error: expected unqualified-id
mantissa_{} {
            ^
./fixed.cpp:25:10: error: expected '('
mantissa_{ new_mantissa } {
         ^
./fixed.cpp:25:24: error: expected ';' after expression
mantissa_{ new_mantissa } {
                       ^
                       ;
./fixed.cpp:25:12: warning: expression result unused [-Wunused-value]
mantissa_{ new_mantissa } {
           ^~~~~~~~~~~~
./fixed.cpp:25:27: error: expected unqualified-id
mantissa_{ new_mantissa } {
                          ^
./fixed.cpp:32:12: error: expected ';' at end of declaration
  fixed tmp{ real };
           ^
           ;
./fixed.cpp:51:30: error: expected '(' for function-style cast or type construction
    throw std::overflow_error{ "Addition would mantissaed in an overflow." };
          ~~~~~~~~~~~~~~~~~~~^
./fixed.cpp:54:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa_ + y.mantissa_ };
         ~~~~~^
./fixed.cpp:62:31: error: expected '(' for function-style cast or type construction
    throw std::underflow_error{ "Subtraction would mantissa in an underflow." };
          ~~~~~~~~~~~~~~~~~~~~^
./fixed.cpp:65:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa_ - y.mantissa_ };
         ~~~~~^
./fixed.cpp:81:18: error: expected ';' at end of declaration
  uint32_t xlower{ mantissa_ & 65535 };
                 ^
                 ;
./fixed.cpp:82:18: error: expected ';' at end of declaration
  uint32_t xupper{ mantissa_ >> 16 };
                 ^
                 ;
./fixed.cpp:84:18: error: expected ';' at end of declaration
  uint32_t ylower{ y.mantissa_ & 65535 };
                 ^
                 ;
./fixed.cpp:85:18: error: expected ';' at end of declaration
  uint32_t yupper{ y.mantissa_ >> 16 };
                 ^
                 ;
./fixed.cpp:87:14: error: expected ';' at end of declaration
  uint32_t lu{ xlower*yupper };
             ^
             ;
./fixed.cpp:88:14: error: expected ';' at end of declaration
  uint32_t ul{ xupper*ylower };
             ^
             ;
./fixed.cpp:89:14: error: expected ';' at end of declaration
  uint32_t ll{ xlower*ylower };
             ^
             ;
./fixed.cpp:91:20: error: expected ';' at end of declaration
  uint32_t mantissa{ xupper*yupper + (lu >> 16) + (ul >> 16) };
                   ^
                   ;
./fixed.cpp:112:15: error: expected '(' for function-style cast or type construction
  return fixed{ mantissa };
         ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
 
Last edited:
It's the same, I tried both. I honest don't know why it's acting up like this. The folder is on my desktop so, no permission issues there.

I think I meant the C++ compiler team.

Also, yes, my background is in Electrical Engineering, not in Software or Computer Engineering. I only know how to use compilers, I don't know how they work under the hood, and I don't have the ability to write compilers.

I don’t mean to be disrespectful, but it sounds to me like a user error. You should probably have a programmer look at your code and build setup. You seem to be doing some weird things with your includes and I your compiler invocation does not seem to be correct.

The code you have linked on repl.it compiles and links just fine for me.
 
  • Like
Reactions: 0924487
And yes, GPU support is being worked on!

I am looking forward to the details this project will uncover! As to providing production-ready drivers... I remain very skeptical. It's a non-trivial effort to write a driver even if you have extensive technical documentation. Here we are taking about developing a driver for a completely opaque processor. Look at the state of nouveau for example, they have been working on it for a decade, with commercial sponsors and all, and they still barely manage to offer basic support for some older GPUs. And M1 is a completely different beast , with it's TBDR architecture and whatnot...
 
I don't think they're being a snob. The article talks about all the things that don't work yet, so, "barely works" is arguably warranted. And I use Linux all day long, but wouldn't willingly use Linux in preference to macOS for my actual desktop system (on the command line, it's great, I'm ssh'd into a bunch of servers from my Mac). Linux using a Mac Mini as server hardware could be quite reasonable, but on a MacBook, as they mentioned, it's kind of a waste, compared to macOS.
I'm the opposite, despite the small inconsistencies and problems I have with Gnome3, I greatly prefer it to the MacOS UI. Having built in FTP/SFTP right in the File (Finder) app is quite handy for any IT/Web work.

I might not have purchased an M1 Mac if there was a lightweight Linux compatible laptop with a 15+ hour battery life.
 
@Apple,

You will profit from my purchase of an M1 Mac and continued use of macOS and your services, so please don't block this effort. I want Linux to run on my Mac, too!

Thank you.
There have been tech notes available for some time - you can just boot from an external hard drive and do what you want. The internal hard drive is probably not accessible, after all, I don't want someone steal my Mac and then access all my data that way.
 
  • Like
Reactions: WT_
Apple went as far as prevent you downgrading iOS, let along running alternative OS...
For a good reason. It is quite likely that older OS versions have security problems that have been fixed in newer versions. If someone stealing your iPhone could downgrade iOS, they could then use vulnerabilities in the older version against you. Usually older versions are available for a short amount of time, in case you upgrade and regret it.
 
  • Like
Reactions: WT_ and svanstrom
By the way, c++ is not working on MacOS Big Sur. Even on Intel Mac.
What exactly do you mean by "c++ is not working"? Part of my software is C++, and it seems to be working just fine.

Sorry, saw your other posts. Not sure what's going on; I have been using clang, both from Xcode and command line with HUGE makefiles that I would hate to touch, but the code it compiles doesn't look very modern to me. Maybe the code is more modern than your compiler version :-(
 
Last edited:
But would really an ARM/M1 Mac be the ideal environment for some sort of general Linux software that you can't get going in MacOS?

Well, there's a lot of interest in Linux on ARM in the server/cloud computing world - and at the other end of the scale the Raspberry Pi is one of the best selling computers of all time, even with its restrictions. Also, Linux has been running on ARM - and other architectures - since the 1990s and doesn't have deep-rooted assumptions about Intel as Windows does. So, Linux on ARM64 is actually pretty well supported, many of the main distros have a fairly complete ARM64 version and many of the usual suspects in the Linux open-software software world have worked on ARM for a while now. So it's not as dependent on x86 emulation for running apps as, say, Windows.

What there isn't is a nice ARM Linux laptop or desktop for developers and Linux enthusiasts to fill the yawning gap between the Raspberry Pi and expensive/complicated/hard-to-find-retail ARM server boards.

So there would be a niche market for a Macbook with native ARM linux, but it's not going to set Apple's sales on fire: it's a niche between those who use Linux "because freedom" and would avoid Apple like a vegan avoids veal, and others who's Linux itch will be scratched by virtualisation (which is supported by Apple and was demoed at WWDC).
 
  • Like
Reactions: JDGwf
Man, the FOSS community is really amazing I just wish they would walk that last mile and create a polished product. They always seem to walk 60-80% of the way. I don't know how these programmers can know so much and able to do so much looks like magic to me. I also wish they would concentrate their efforts instead of each 3-4 members build their own software. Also amazing is Linux, I don't know what this thing but it seems to be able to run on anything with few adjustments.

If you are interested, there is a new Linux distro in the making named Asahi . It is made by Hector Martin, some computer genius. He was able to run linux on PS4 somehow.

I wish someone would put the effort to complete a Linux/FreeBSD OS that is on par with Windows/MacOS. All the current ones need tinkering and lack Apps. FOSS has a problem in its philosophy, due to its open and free nature that means there is no standard. I don't know how to feels to write a Linux app and try to install it on the 5000s distros they say exists.

@Akrapovic

Doesn't MacOS has unix like thing built in which is the terminal. Shouldn't this cover the aspect of Linux being used as a server? Shouldn't FreeBSD be more stable as a server? I don't know why people prefer Linux over FreeBSD when FreeBSD is more one solid piece and Linux is a collection of attached together software.
 
But why?

The point of installing a different OS is so you can run other programs.

What's available on Ubuntu that isn't available on macOS?

I did install Ubuntu on a 10 year old Mac Mini, but that was so I could install a newer browser so it could access Netflix and YouTube. This might become a problem for the M1 Mac Mini someday, but for now, it's able to run a current version of macOS which has current browsers that work for all the internet that anyone cares about.

you can do absolutely whatever you want with ubuntu, given that you know what to do. apple is progressively finding new ways of trying to lock down the OS regardless if the user has the intelligence to use it otherwise or not. ubuntu is the opposite.
 
Man, the FOSS community is really amazing I just wish they would walk that last mile and create a polished product. They always seem to walk 60-80% of the way. I don't know how these programmers can know so much and able to do so much looks like magic to me. I also wish they would concentrate their efforts instead of each 3-4 members build their own software. Also amazing is Linux, I don't know what this thing but it seems to be able to run on anything with few adjustments.

Walking that extra mile is insanely difficult.

I wish someone would put the effort to complete a Linux/FreeBSD OS that is on par with Windows/MacOS. All the current ones need tinkering and lack Apps.

That will never happen because a finished, useful product needs unified vision and central management. Owners of Linux don’t have a vision beyond the kernel. Their focus on freedom and user agency is the reason why they will never make a great user-facing product.

But the DIY nature of Linux is great for servers and other systems where configurability is desired.

Doesn't MacOS has unix like thing built in which is the terminal. Shouldn't this cover the aspect of Linux being used as a server? Shouldn't FreeBSD be more stable as a server? I don't know why people prefer Linux over FreeBSD when FreeBSD is more one solid piece and Linux is a collection of attached together software.

MacOS is Unix. It is build on top of FreeBSD, but uses a custom kernel and some other components. The system code of macOS/iOS etc. is available as open source. Linux ended up being more popular for a number of reasons, charisma of its creators and the crows-engineered nature being one of them. One of the reasons that FreeBSD is still around is because of Apple btw.
 
  • Like
Reactions: jumpcutking
This sounds like good news - of course I wonder if the performance metrics will be the same. I would love to run a few tests on this...
 
I absolutely need windows to dual boot onto any Mac that I buy. For better or for worse, that's non negotiable. I am hopeful we get the ARM-based (if that the correct terminology?) Windows as a dual boot option down the line, otherwise my days using a MacBook are numbered.
 
I absolutely need windows to dual boot onto any Mac that I buy. For better or for worse, that's non negotiable. I am hopeful we get the ARM-based (if that the correct terminology?) Windows as a dual boot option down the line, otherwise my days using a MacBook are numbered.

You won’t get dual boot but I’m fairly sure that a virtual Windows machine solution will be available by summer.
 
Maybe hackintosh ain't so dead after all? Certainly Apple can change things at anytime, disallowing booting of custom kernels. Mad props to Corellium for making the port (that's the real heavy lifting), but the secret sauce (I read the guide & downloaded the script) is the Apple tool, bputil (only for Apple Silicon Macs right now) which disables SIP, which in turn allows the booting of custom kernels.

Another dude posted last week on Arstechnica's forums about how he got an Ubuntu VM running (with hardware acceleration) in Qemu for Apple ARM (some custom patches).
 
Walking that extra mile is insanely difficult.



That will never happen because a finished, useful product needs unified vision and central management. Owners of Linux don’t have a vision beyond the kernel. Their focus on freedom and user agency is the reason why they will never make a great user-facing product.

But the DIY nature of Linux is great for servers and other systems where configurability is desired.



MacOS is Unix. It is build on top of FreeBSD, but uses a custom kernel and some other components. The system code of macOS/iOS etc. is available as open source. Linux ended up being more popular for a number of reasons, charisma of its creators and the crows-engineered nature being one of them. One of the reasons that FreeBSD is still around is because of Apple btw.


Well some foss has done it right like Firefox and VLC. I was hoping that FOSS community end up like that but it turns out to be more like the wild west, free code thrown around manipulated in multiple ways, pickup up whatever you want and make it work. Should be called Lego Software.

Why Apple keeps FreeBSD? I thought they split from them since Next took it and altered it then Apple bought it and continue to build on it. They don't need them any more.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.