Building Elixir from source segfaults on macOS on Apple Silicon while compiling
groups.google.com
groups.google.com
I can't think of...any program in that sphere that aren't Windows or Linux?
Per the parent, the lack of Fortran compiler causes an issue because some BLAS/LAPACK libraries align their symbols with whatever a Fortran compiler would do. As such, unless there's been a recent change, things like CMake need the compiler to determine the name for linear algebra routines.
I phrased the above as "sadly, yes" because supporting macos has been a pain and costs a fair amount of labor. In my case, Homebrew is required and there a bunch of specialized quirks in the build and packaging system that I'll contend are more difficult to deal with on macos than on Linux and Windows. Lastly, the requirement that macos be virtualized only on mac hardware complicates automating the build and test system since those processes must be relegated to a macos machine and I'd really rather not do primary development on a mac. Frankly, I'd pay Apple a not small amount of money to virtualize macos legally on non-mac hardware.
If they don't do that, then you can just use any "generic" C BLAS/LAPACK implementation, performance will be poor, but that's pretty much the only option if your hardware vendor doesn't support BLAS.
I guess people can write their own BLAS as well, but if you want to re-implement BLAS in 2020, then Fortran is probably not the best language to do that.
Doing this work is significantly easier out-of-the-box on Mac/Linux device.
Data Science is my main job and the first thing I did at my last job was ask if I could wipe windows and put Linux on the desktop they gave me.
How so? mingw-64 exists, and so does Intel Fortran (with good integration with the VS IDE as well).
It was like this in my previous department as well.
I just did a quick google search for it. I know nothing more than that it is FORTRAN compiler for LLVM. (It claims to be an alpha release)
It is quite hard to write portable Fortran code, but code that at least compiles with PGI should compile with that as well.
I find the whole Fortran ecosystem and lineage fascinating for some reason. Like an alternative universe where integers are only used for loop counters.
Btw, here's the list turned up by a dependent search in core:
$ brew uses --recursive gcc
abyss dynare itk numpy qrupdate
adios2 eccodes itpp numpy@1.16 r
apache-arrow ensmallen jags nwchem ratfor
apache-arrow-glib fastme joplin octave rawtoaces
arcade-learning-environment fftw json-fortran ola raxml-ng
armadillo field3d kahip ompl reprepro
arpack flann kallisto open-mpi root
arss fobis kim-api openblas scalapack
astrometry-net gdal lammps opencoarrays scipy
asymptote gdcm lapack opencv shogun
aubio gmic libbi opencv@2 simple-tiles
augustus gmsh libmatio opencv@3 siril
biosig gmt libxc openfast skymaker
boost-mpi gmt@5 liquid-dsp openkim-models sratoolkit
bsponmpi gnuradio luaradio osi suite-sparse
caffe gr-osmosdr mapnik osm2pgrouting sundials
calceph grace mapserver otf2 superlu
cdo graph-tool minimodem packmol synfig
ceres-solver gromacs mlpack pcl urh
cgns gwyddion mpdviz pdal veclibfort
clp hackrf mpi4py petsc vips
coinutils hdf5 mpich petsc-complex virtualpg
cp2k hdf5-mpi mvtools pgplot visp
cpl hdf5@1.10 ncmpcpp pgrouting vtk
csound hdf5@1.8 nco plplot waon
dartsim hypre ncview pnetcdf wxpython
datetime-fortran imake nest points2grid zita-convolver
dlib imgproxy netcdf postgis
dungeon inspectrum networkit proteinortho
dvc ipopt ngspice qd
147 formulae.Edit: Forgot to --include-build. That would add 4:
boost-python3 btfs libtorrent-rasterbar openimageio
libtorrent-rasterbar made front page today btw...You don't need to implement neither hardware support nor OS support, just combine the two things that are already implemented, and fix a couple of incompatibilities, but not many (some parts of OS support will be x86 only and these would need fixing, but fixing these should be trivial since you can c&p from the arm+iOS code).
Why would it take months to add support for this to GCC? GCC's architecture would need to be really flawed for this to be true, i.e. , requiring you to re-implement a big chunk of hardware support for each OS, or full OS support for each new hardware. Given how many architectures and OSes GCC supports I just can't imagine this being true.
Unless by this work taking months, you mean "not doing anything the first 99% of the days, and doing all the work in the last couple of days". In that case, sure, this can take as long as you want.
All I need is working golang and Python 3. The rest I can do on a box in AWS.
If anything, they could have just low-key embrace brew and take it from there. They didn't, and I think that sends a message: they've given up.
They should support open source in an official way. They should support other languages besides swift. They should support virtualization/containers. They should embrace techies, scientists and engineers. But it seems they're closing down these areas of their ecosystem.
> Elixir doesn’t compile any native code. Therefore these errors mean that you were able to compile the Erlang VM but either the code or the compiler has bugs and the VM is seg faulting.
Since gcc doesn't work on Apple Silicon, I assumed the OP must be using clang :).
Perhaps it is also some funding and access to the kits and dev time , updating gcc is not a full time job for most of the contributors after all.
I gather from there that previous efforts to target iOS are outdated, there is substantial work to handle the Apple ABI, and that it's not been seriously looked at yet.
All porting involves some changes and instability. This is "Water is wet" style news.
Are we learning something new from this being widely reported? (very little from what I can see)
Should be infer that there's something inherently wrong with Apple Silicon in that Elixir has an issue? (doubtful - its just new. no surprises multiple projects will need various bugfixes or code changes)
Perhaps that this is insurmountable? (unlikely)
Is this a case where large numbers of eyeballs being focused on it is somehow worthwhile or there are wide implications, eg its a major security incident? (no, unlikely)
Is there some technical quirk that sparks interest? (not particularly)
I don't understand how this is news.
Even so, as you suggest, there are likely thousands of projects going through this transition right now. It's certain that the first retail Macs will lack some support for some things.
These things happen.
https://groups.google.com/forum/m/#!topic/google-breakpad-di...
https://chromium.googlesource.com/linux-syscall-support/+/be...
Until recently there was a concurrency bug in the VM that would trigger on elixir compiles that would cause compilation to hang on both x86 and ARM.
macOS generates the fewest admin headaches.
I’ve slowly been moving more to Linux though
Windows does this now with WSL2 especially, but the desktop experience still has a lot of cruft left over.
I do look with envy at the choice of hardware on the Windows side though. Especially on the desktop side.
There are things I like about both platforms and things I dislike but I'm productive as a developer on either and mostly they feel the same.
At home if I want to do some dev I'm more likely to reach for my thinkpad though because I prefer the keyboard and it runs a lot cooler on my knee.
That and people may just generally prefer using the actual OS over the other two.
I can't stand using Windows for anything other than playing games, for example. I've also never been won over by Linux for anything other than working on the command line only.
Also the way macOS handles 'spaces' (i.e. multiple desktops) especially when connected to extra monitors is unmatched on any OS with a decent gui
I do like Linux for server computing and for command-line/batch computing, but I don't like the state of the Linux Desktop and thus don't consider it seriously as a primary machine.
Windows is just a nightmare and even with WSL2, it still feels like it's bolted on. I only keep a Windows desktop around for gaming. I don't and won't do any productive work on Windows anymore.
As someone who has to use a Mac at work, it still baffles me how macOS doesn't even ship with a serious file manager by default in 2020 and every decent alternative costs decent amount of money.
Finder seems to like to show you what seem like various 'views' of things but these views aren't actual folders or at lest usually don't contain what you would think the folder would or it doesn't initially open where you'd expect it to, if you want to go to an actual particular folder, (once you even figure out where you are if you have any amount of complexity to your FS hierarchy), it has to be done via a nested menu item, (Go=>Go to folder), where it should be front and center, most managers have it under or as part of the menubar itself.
The search doesn't seem to work much of the time, unless one uses Spotlight for everything, no dual pane support & tab support is very, very recent.
Not to mention it doesn't seem to remember my view/display preferences for any length of time, doesn't have sane right click options, (it didn't even have copy paste last time I bothered to check).
I am probably forgetting a bunch of things since I long switched to alternatives like Path Finder & Forklift, but of course you can't even remove it from the dock if you don't use it.
A new Finder window opens to the Documents folder by default, though this is configurable in preferences. You can set it to your home directory
> Finder seems to like to show you what seem like various 'views' of things but these views aren't actual folders or at lest usually don't contain what you would think the folder would
I've... never seen this. Are you talking about tags maybe? Or having an active search?
> (once you even figure out where you are if you have any amount of complexity to your FS hierarchy)
If you right click the folder name in title bar you get a list of path segments. You can also turn on 'Show Path Bar' and get a breadcrumb-style control.
> it has to be done via a nested menu item, (Go=>Go to folder)
There's a shortcut, cmd-shift-G, listed on that menu item.
> The search doesn't seem to work much of the time
Haven't had a problem with it, though I usually use find and grep on the command line.
> no dual pane support
You can tile two finder windows side-by-side.
> tab support is very, very recent.
Tab support is seven years old.
> (it didn't even have copy paste last time I bothered to check).
It does. It doesn't have cut and paste though, but drag and drop works to move.
a.) Why is it not on by default?
b.) I want to type in a full path in one go, not click on individual segments of one - maybe that's not really common but I tend to memorize my FS structure.
> There's a shortcut, cmd-shift-G, listed on that menu item.
Am aware of the shortcut, it's not quite the same, it's an extra step you have to do vs not having to do, but it's probably just a "getting used to thing".
> You can tile two finder windows side-by-side.
That's like saying in a browser without tabs you can just open another window. Sure you can, it takes another second or two to get it the same size, probably won't open in the same directory as the old one, the other one will loose focus as you interact with the other etc.
> Tab support is seven years old.
Fair. Linux had it for 2 decades, I still remember the WWDC keynote where they announced it, which is probably why in my mind it was more recent.
If I want to deal with the file system in a technical way I use the terminal. And whenever I want to bring these two worlds together, I’ll just type:
open .I’d say spotlights file search interface isn’t that great but the finder’s own file search (I presume uses the same md database) seems pretty good to me.
> it didn't even have copy paste last time I bothered to check
Actually it does, which surprises me. That’s more of a Windowsism where you select a subject and then select a verb to apply. The Mac interface has from the beginning been more about direct manipulation. I.e: when you want to move something you just grab it and move it where you want to be.
In that case am really surprised Finder still doesn't support dual pane. Wouldn't this philosophy directly benefit?
This doesn't make any sense. Apple has long shipped MacOS with everything included. Compared to the 12! Windows 10 editions (Home, Pro, Pro for Workstations, Enterprise, ...) MacOS is a cakewalk, particularly since Apple ditched charging for upgrades years ago.
> serious file manager
Huh? Finder is decent, pretty much anything it can't handle is probably best served with a proper scripting language from the command line regardless. I'm not even sure what alternatives to Finder are out there.
Last time I checked Finder didn't support dual pane, (thankfully tabs were finally added very recently). It has insane context menu default, (like assigning tags is there, but Copy+Paste is not?) and to navigate to a specific folder directly, it is a nested menu item, (or a 3-key shortcut you have to remember), rather than being right in the toolbar bellow the menu as most other managers do it.
But of course if one wants to do something the way Apple has not specifically said it should be used they're "holding it wrong". Don't worry, I get it.
As for shipping with everything that's needed, it doesn't even have a 1st party package manager, (congrats even MS beat them to it) and homebrew isn't that great.
I get it, dark mode was probably also stupid until Apple decided to finally implement it.
P.S. Not a Windows fan either, so no need to spell out the various editions here.
Worth noting that you don't get things like " built-in FTP client; ability to mount MTP and iOS devices; RAR, TBZ, TGZ, 7z formats support; Dropbox integration; Terminal emulator"
These are all things Linux FMs have for free, but it's a good first step for sure.
Your comment doesn't make sense. I am saying they're not offering features that come standard, free with other OSes so you end up being charged for this by having to go to a paid 3rd party alternative offering functionality that is typical on other OSes as default.
Even window snapping isn't a thing without 3rd party tools.
Cmd+G - G for Go, and I agree that having to go to the menu bar item called "Go" is not super discoverable, but I found it once, and been using Cmd+G since then. I guess users that don't use shortcuts have more problems with these.
> Copy+Paste is not?
Cmd+C Cmd+V ? I am not sure this really needs an icon. I mean, if you go to the "Edit" menu, you see the shortcuts for Copy, Paste, and Cut, which are the same as on Windows or Linux, but using Cmd instead of Ctrl (which is consistent with the rest of the OS).
> tabs were finally added very recently
Tabs were added a long while ago, 5 years at least. But you don't even need tabs for this. I just do Cmd+Shift+Left to tile one finder window to the left of the screen, and Cmd+Shift+Right to tile another window to the right, and that's it: two windows, side by side.
I mean, it's not i3 or sway, but works fine.
Not saying Linux is superior on the UX front, but it definitely can be as good if not more productive, it has its issues but they all have, I simply haven't found macOS to be this above and beyond experience that is often being claimed and there was a period I gave it a serious try as it sounded so good. But...it's not really there. I get kernel panics, (haven't seen one on Linux in over a decade), UI freezes, (seen them often on all 3 OSes), clunky behavior, (no window snapping, wtf macOS).
my windows snap, tile, etc. when I drag a window to a part of the screen, it snaps there.
I haven't see a kernel panic on MacOSX in the 15 years that I've been using it, and I haven't seen one on Linux either, but maybe my workload is just different.
I've since switched to Forklift and occasionally I'd open Path Finder but these are both not that cheap for a basic file manager.
Serious question: what do you use it for? I rarely use the finder at all; when I do it’s for pretty trivial things that it handles just fine. Generally ls, cd, open, tar etc are enough for me.
I understand a lot of people consider the Finder broken so I assume it lacks “power user” features, at least. But aren’t the power users by definition a couple of sigma out so are better served by a paid product?
For example I don’t use apple’s calendar app but paid $50 for a different calendar. I wouldn’t recommend that most people do this: apple calendar is fine for the bulk of users. I just happened to have some special needs. Could your case be the same?
My point was that on Linux you get the features that on macOS are paid and considered for power users for free and as standard.
By "enterprise" a lot of people understand native Outlook, Powerpoint, Word, Excel, ... Adobe tools, ..., etc. support. On HP-UX and Solaris you get none of these.
As for enterprise desktop UNIX, I bet Red-Hat has more enterprise integration points with IT infrastructure than OS X.
Microsoft web apps suck. The outlook webapp does not even support smart folders, and dozens of other "basic" features that the native apps do support. Same for Word, excel, powerpoint, etc.
This might be an option in the future, but right now, paying microsoft for their webapps is just a waste of money.
Why did I switch just before school? Because I didn’t want the stress of trying to troubleshoot breakage from updates when I was in the middle of assignments and midterms etc. During all of that decade of using Linux daily, there was never a time when I felt like things wouldn’t randomly break (usually from an update) to the point where X wouldn’t even start at boot, requiring a deep dive into display manager configuration, drivers, initial ramdisks, kernels, and everything in between.
Macs just work. The trackpad support is unbeatable. Ditto for battery life. And the terminal ecosystem is fine with homebrew. I’m not one of those people who insists on having the GNU version of all the basic tools, so I don’t mind the old BSD versions of most things.
I am certain your experience was as your describe but I do wonder if the community is making a mistake by continuing to recommend Ubuntu or the like as I've always heard most stories of this nature from there.
Which is kind of funny considering Arch is generally considered not stable, but I am was able to depend on it during my uni years as well as now when I am a full-time software dev, running close to a decade without major issues in fact.
As the LTS version gets older, most of your software starts to get seriously out of date, so every time you need something newer, it's easy to make a mess because you will have multiple versions of the same thing, as well as the dependencies and so on.
Upgrades are also quite scary, and often results in broken systems.
Rolling releases like Arch are much more user friendly in that regard, and breakage are uncommon. Installing older versions of already installed software is also much less frequent, and with the AUR it's really easy (at least compared to PPAs).
I think this is just more evidence of the problem. There is so much infighting between the distributions that the community is unable to come together to create a solution. Linux is a tool for developers, not users, and its values put the convenience of developers ahead of the needs of users.
> I think this is just more evidence of the problem. There is so much infighting between the distributions that the community is unable to come together to create a solution.
With all due respect, but I think this completely misses the mark, the various distros do in fact do things in different ways, I know to Windows/macOS users this may seem baffling but even if we were to come together and create a single distro I think many Linux users, myself included, would reject that.
You see, there's a certain philosophy that is behind most major distros and is whichever philosophy you sync up most with, that's the distro you tend to sick with. Windows/macOS suffer from the lowest common denominator problem for many power users and that's fine as long as there's an out for them, like Linux provides right now.
If you're just going to have a single distro, you recreated exactly the same problems current Linux users ran away from originally. I don't know why everybody has to conform to a singular interface or vision, it seems wrong to me.
If Linux is just for developers because of that, fine. Developers are users too and if they're not well served by the proprietary platforms, I think it's pretty legitimate for Linux to be what primarily speaks to them. I do have plenty of stories of non-developers, (even digital artists), being happy with Linux, but that's for another time.
As for "the community is unable to come together to create a solution", looking at major cross distro projects like GNOME, KDE, GNU etc. nothing can be further from the truth. There's a great amount of cross-distro collaboration happening there.
That does not mean one cannot compare or contrast the distros, that's not immediately 'infighting'. For example even if I prefer Arch, I do use CentOS on some of my server deployments and I certainly appreciate it and by extension what the Fedora folks are doing.
This push to be uniform everywhere, in terms of interfaces, opinions, consensus etc. is not healthy nor sophisticated in my opinion.
If you look at the world of politics, all that gets you is two parties who both agree to launch offensive wars. Some healthy, principled differences aren't a bad thing per se.
The term “power user”, from the perspective of the Linux philosophy, is synonymous with a person who customizes every aspect of their workflow, often writing lots of code and scripts, to arrive at something unique and specific to them.
This is not what a typical Mac or Windows power user does. Instead, on those platforms, being a power user can also be marked by being a user of powerful productivity software, whether it be graphics or audio or video production, or even advanced usage of business productivity software such as Excel.
These users do not typically customize their workflow very much. They insist that their computer be as powerful, low latency, and reliable as possible. They have neither the knowledge nor inclination to delve into the operating system internals in order to troubleshoot issues of latency or performance or reliability. Yet they get far more out of their computers than a typical user, who merely use them for browsing and social media. Linux users do not consider these users to be power users but Apple and Microsoft do.
This is what I meant when I said that “Linux is a tool for developers, not users, and its values put the convenience of developers ahead of the needs of users.”
Or do these not count because they don't have an active Adobe CC subscription?
The actual issue at play here is that most laptops you can buy come with Windows or macOS preinstalled so you need to go out of your way to install Linux. Most people are not going to do that as they probably barely know it's even an option.
So instead as they grow up with Windows/macOS and morph more into power users, they're going to stick with that.
The GNU/Linux community view is just that you generally can't audit Windows/macOS and therefore even be sure that the OS is working (just for) you in a sense. That's the additional dimension of power Linux gives you, higher confidence that you're in fact truly in charge of your machine. Take it or leave it, but that is a legitimate segment that needs to be served.
Another is that on Windows/macOS, (more so), you're subject to those allowances changing or not being allowances enough, the company changing focus etc. With Linux you don't need to rely on tricke down allowances graciously granted to you by a faceless corporation and thus be subjected to their whims, (or "vision").
And yet my stated reason for giving up on Linux after a decade of use was just the opposite: the feeling that I was not in charge of my machine, that the Arch maintainers were instead, when they knowingly pushed updates that broke things to the point where I needed to make a deep dive into configuration files while booted from the console, just to be able to get back to my graphical login screen so I could continue using my computer. This has never happened to me on macOS. Not once! Yet it happened many times over the years on Linux.
I guess it depends quite a bit on your hardware and experience. On Arch I can install anything I want in seconds, configure things exactly how I want, including whether I want a DE or a tilling VM etc. write services for anything using a very straightforward declarative syntax, (not XML or Apple Scipt), to wire up pretty much anything as a managed service or a cron, flying around the system.
On a Mac I constantly have to fight it not letting me do this or that or SIP preventing this other thing, you couldn't even snap windows for a long time, maybe you still can't - I installed some 3rd party, (again paid, of course) utility to do such a basic thing and it looks like Windows is going to beat it, (Unix-based OS), to an official package manager.
But I guess am not the target.
When I got accepted into school, I realized that all had to change. I couldn't spend hours configuring things anymore. I had to focus on getting work done quickly. The Mac gives that to me with minimum fuss.
I think you are definitely not the target. The Mac is not designed for people to treat their own computer as a hobby, the way I did with Linux for a decade. It's designed for getting work done and being as seamless and unobtrusive as possible, for as many people as possible.
I both started and sucesfully completed my CS degree on Arch. I didn't have to spend hours to configure anything. I now work as a full-time software dev on Arch every day, 8 hours a day. This is an often repeated myth but I haven't experienced it. Am not sure Linux, (any distro at this point), is the problem.
With everything still in beta/ pre-release, it's impossible to know how big a transition this is going to be for me personally. By the time I get my next computer most of this will likely be resolved.
> Is there something that macOS provides developers that other operating systems don't?
I prefer MacOS to Windows. In my experience the platform just has less bullshit to deal with. That said, Windows has gotten quite a bit better for Web Developers over the past 10 years or so, so it might be worth revisiting, but I suspect the headache of migrating to Windows will be just as bad for me as the headache of migrating to MacOS ARM (or worse).
If you are a Mobile developer, the transition is almost a no-brainer. Running iPhone apps native is a pretty slam dunk feature. For Web Devs, it's a bit less clear, particularly if you use VMs or Docker as part of your workflow.
It's really a huge unknown right now and until they start shipping hardware to end users, I suspect we won't really know what the whole picture looks like.
The arm windows systems are most robust but they lack a tonne of software - whereas the big name apps already work on Mac/arm (^h^h^hApple Silicon) already.
Coupled with native support for iOS apps (because nothing sounds as awesome as running a phone app on my laptop) I wouldn't be surprised for Macs to become the most common arm pc fairly quickly.
Where are these folks getting Apple silicon? Is there a dev MacOS distribution for iPad? Or is it likely they have preview hardware?
I guess Apple could go out and try to preemptively fix all software, but that seems excessive to expect. :-)
I think this very clearly demonstrates Apple’s commitment to supporting open source, user-installed software on Macs, outside of the Mac App Store.
Of course, moving to ARM is orthogonal to that; Apple could just as easily impose restrictions on x86 Macs. The only immediate downside to ARM is the loss of the ability to boot other OSes, which has apparently been getting more difficult anyway due to custom hardware like the T2 chip.
No, I think Apple will always keep the Mac as a platform where end users can run unapproved software with appropriate warnings. The Mac is a serious tool for many different roles, not just development, and not every tool fits into Apple's App Store ecosystem. This is Apple's tacit acknowledgement of that fact.
Sure, and Blender could be in the app store. (There are possible issues with the GPL, but Apple could fix that if they cared to).
No, I think Apple will always keep the Mac as a platform where end users can run unapproved software with appropriate warnings.
Well, if you believe Apple's messaging, then using an iPad for real work is not only possible but often better than a traditional computer, and also it's too dangerous to allow unapproved software on it even if users had to explicitly opt in. I think it's entirely possible (although far from certain) that Apple could decide that the App Store is good enough for 80% of users, and everyone else can either pay for developer/pro access or go away. I don't think moving to ARM makes that more likely, but nor do I think contributing open source fixes makes it less likely.
The Mac is the Mac. It has been and will continue to be the machine where you can install software not approved by Apple, turn off security, and otherwise poke at the system. You can still create your own kext caches and mount the root filesystem as read-write on Apple Silicon. The procedure has changed but the ability to do it has not.
I really honestly don't know how much clearer it can be.
What they are accomplishing by going to their own silicon is eliminating the need to maintain the Mac as a completely different hardware and driver line. Now the Mac is just a bigger higher specced clamshell iPad with MacOS, and MacOS is the same kernel and mostly the same drivers as iPadOS and iOS but different security policies and a somewhat different user space. It's sort of like a different Linux distribution with a different window manager and different defaults.
I think this will make the Mac better because now it can benefit from all the product dev and R&D being done for iDevices, and vice versa. All those neat features in the high end iPad can now be considered for the Mac.
It would not shock me if they someday allowed the Mac to run iPadOS either if the user so chooses, or vice versa, via some reinstall process.