-
Notifications
You must be signed in to change notification settings - Fork 165
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
Build failures in Darwin arm64 (Mac M1) #983
Comments
@kueda thanks for the detailed report. I don't have time at the moment to dig into the details to comment on each cascade of the failure (but I do appreciate you providing those details to make that possible!). Overall nobody - that I'm aware - on the Mapnik crew has access to an M1 and therefore this problem exists. I'm faintly aware, however that there is a way to force an M1 to use the old architecture. Have you tried that yet (sorry if you did and I missed it). Or perhaps that is not viable for a specific reason? |
Thanks for the quick reply, Dane. I hadn't looked into using Rosetta yet, I just assumed someone would have figured out how to do this on an M1 at this point. I'll try Rosetta now. However, I'm not yet convinced the M1 is to blame for the build errors, just the lack of binaries. Has anyone on the dev team tried building everything from source, i.e. not relying on any homebrew or mason binaries for any dependencies? |
I personally used to build everything from source, but stopped ~2015 once mason got to a point that it was easier (and could also debug via isolated source builds using "mason build"). But mason development is stalled, so it's high time to find an alternative (or like you say, at least double-check source builds to something like /usr/local work). The last person that might be doing source builds is @artemp |
Ok, managing separate arm64 and x86_64 dependencies is proving to be a bit beyond me (got as far convincing mason I was on x86 which got me some binary dependencies but not all). I'm hoping you all can figure out an arm64 build solution at some point, but for now I think I just need to work around this, or do work on stuff that depends on mapnik on an x86 machine. |
@kueda , same issue here |
I am also here with same problem. |
Similar problem. |
Could we send you an M1 laptop? Could you ask if anyone would be open to getting Mapnik working on M1 in exchange for the laptop? It would be worth it for my employer. |
I recently switched to an M1 arm64-based Mac and confronted this same issue. The way I've worked past it for now is to essentially install an x86-based version of node.js then install the node-mapnik package and that worked just fine. The more specific details are:
I haven't looked into installing two different copies of the same version of node.js, so I'm working with the understanding that if I reference that same nvm-installed version of node in a different development directory, that will also use the same x86 version. Not everyone will want to use this approach, but I'm happy with it and I prefer it over alternatives like using Docker or VMs or something else that does not feel like my normal workflow. That said I'll happily switch to an arm64 compatible version when that's possible |
Using |
Potentially relevant mapnik issue: mapnik/mapnik#4313 |
Anyone got a nice workaround yet? Running into this issue now. |
I did a very similar thing to @pleary, but with asdf
|
I'm having trouble building from source on an M1 Mac. TL;DR, binaries don't seem to be available, and building from source seems to result to dependencies conflicts between
mapnik
,node-mapnik
, andmapnik-vector-tile
, or maybe protozero is an undocumented external requirement. I'm using node 16.15.1, node-mapnik 693e402.and then the build just fails, but the root problem there is the binary isn't available, so I should instead be using the more specific source build options at https://github.com/mapnik/node-mapnik/#source-build (right?)
Looks like Mason doesn't have a copy of a clang binary for my architecture. Does this have something to do with SSE support?
Doesn't look like it. So let's try source build strategy B: install an external copy of mapnik on my system:
From the homebrew formula, it seems to be installing the latest available release of mapnik from https://github.com/mapnik/mapnik/releases/download/v3.1.0/mapnik-v3.1.0.tar.bz2. Is mapnik working?
> mapnik-config --prefix (master) 14:14:16 /opt/homebrew
Yes. Let's try npm install again:
Nope. Maybe I should try building mapnik from source:
Maybe I should try building from HEAD:
Anyway, looks like it's trying to find protozero files and they don't exist. I could try installing protozero by hand, but if that's a build requirement, shouldn't that be documented in this repo?
The text was updated successfully, but these errors were encountered: