Skip to content

ncl installation on Mac with M1 chip and arm64 machine #187

@email-lhe

Description

@email-lhe

Hi,

I'm using a new Mac with M1 chip and arm64 machine, while the precompiled ncl was based on old compilers are not eligible for new Mac that can't install old version compilers. I tried to compile it using new compilers on my Mac, a lot of issues came up because of updates of compilers. I wonder whether anyone has successfully installed ncl on Mac with M1 chip and arm64 machine and willing to share the precompiled code or the experience, so more people with new Macs can have access to it.

Some of my issues are about missing header files, even I have reinstalled the command line tools for several times.

/usr/X11R6/include/cairo/cairo-ft.h:46:10: fatal error: ft2build.h: No such file or directory
46 | #include <ft2build.h>

hdf.c:54:10: fatal error: hdf.h: No such file or directory
54 | #include <hdf.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/signal.h:69:42: error: 'NSIG' undeclared here (not in a function)
69 | extern __const char *__const sys_signame[NSIG];
| ^~~~

udunitsW.c:5:10: fatal error: udunits2.h: No such file or directory
5 | #include <udunits2.h>

NclGRIB2.h:1:10: fatal error: grib2.h: No such file or directory
1 | #include <grib2.h>

NclApi.c:39:10: fatal error: netcdf.h: No such file or directory
39 | #include <netcdf.h>

udunitsW.c:5:10: fatal error: udunits2.h: No such file or directory
5 | #include <udunits2.h>

LDFLAGS="-L/usr/local/opt/freetype/lib -L/usr/local/opt/libpng/lib" CPPFLAGS="-I/usr/local/opt/freetype/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include/freetype2" pip install matplotlib

LDFLAGS="-L/opt/X11/lib -L/usr/local/opt/libpng/lib" CPPFLAGS="-I/opt/X11/include/freetype2"

I would appreciate any help, thanks in advance.

Best,
Lynn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions