Lisa
Lisa

Reputation: 81

Unable to install rgdal on macOS 14.3 / M3

The rgdal package is not part of the CRAN anymore but I would need to install it as a dependency for another older package (PlotSvalbard). I am trying to install it from a local .tar file.

Following previous installation issues with this package I followed a few steps:

I get the following error:

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang -arch arm64
configure: CXX: clang++ -arch arm64 -std=gnu++17
configure: CFLAGS: -falign-functions=64 -Wall -g -O2
configure: CPPFLAGS: -I/opt/R/arm64/include
configure: CXXFLAGS: -falign-functions=64 -Wall -g -O2
configure: LDFLAGS: -L/opt/R/arm64/lib
configure: LDFLAGS: -L/opt/R/arm64/lib
configure: CXX17 is: clang++ -arch arm64, CXX17STD is: -std=gnu++17
configure: CXX is: clang++ -arch arm64 -std=gnu++17
configure: C++17 support available
configure: rgdal: 1.6-7
checking for /usr/bin/svnversion... no
configure: svn revision: 1203
checking for gdal-config... /opt/homebrew/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.9.1
checking GDAL version != 3.6.0... yes
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking GDAL: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL: /opt/homebrew/Cellar/gdal/3.9.1/share/gdal/stateplane.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 9.4.1
configure: --with-proj-include= overrides pkg-config proj --cflags
configure: PROJ CPP flags: -DPROJ_H_API -I/opt/homebrew/include/ 
configure: --with-proj-lib= overrides pkg-config proj --libs
configure: PROJ LIBS: -L/opt/homebrew/lib/ 
checking PROJ header API:... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether clang++ -arch arm64 -std=gnu++17 accepts -g... yes
checking for clang++ -arch arm64 -std=gnu++17 option to enable C++11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for proj.h... yes
checking for proj_context_create in -lproj... yes
checking Using GDAL < 3 with PROJ >= 6... no
checking PROJ version >= 4.8.0... yes
checking PROJ: proj.db found and readable... yes
configure: Package CPP flags:  -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API
configure: Package LIBS:  -L/opt/homebrew/Cellar/gdal/3.9.1/lib -lgdal -L/opt/homebrew/lib/ -lproj
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using C++17
using SDK: ‘MacOSX14.4.sdk’
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c OGR_write.cpp -o OGR_write.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c gdal-bindings.cpp -o gdal-bindings.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c inverser.c -o inverser.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c local_stubs.c -o local_stubs.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/homebrew/Cellar/gdal/3.9.1/include -I/opt/homebrew/include/ -DPROJ_H_API -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/sp/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c ogr_geom.cpp -o ogr_geom.o
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:966:34: error: too many arguments provided to function-like macro invocation
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
                                 ^
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:977:9: note: macro 'length' defined here
#define length(x)               Rf_length(x)
        ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:965:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:966:15: error: expected ';' at end of declaration list
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1052:34: error: too many arguments provided to function-like macro invocation
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
                                 ^
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:977:9: note: macro 'length' defined here
#define length(x)               Rf_length(x)
        ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1051:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1052:15: error: expected ';' at end of declaration list
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1137:34: error: too many arguments provided to function-like macro invocation
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
                                 ^
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:977:9: note: macro 'length' defined here
#define length(x)               Rf_length(x)
        ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1136:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1137:15: error: expected ';' at end of declaration list
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1313:34: error: too many arguments provided to function-like macro invocation
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
                                 ^
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:977:9: note: macro 'length' defined here
#define length(x)               Rf_length(x)
        ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1312:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ogr_geom.cpp:14:
In file included from ./rgdal.h:5:
In file included from /opt/homebrew/Cellar/gdal/3.9.1/include/cpl_string.h:296:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:1313:15: error: expected ';' at end of declaration list
    int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
              ^
12 errors generated.
make: *** [ogr_geom.o] Error 1
ERROR: compilation failed for package ‘rgdal’
* removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rgdal’
Warning in install.packages :
  installation of package ‘/Users/ldelpe01/Downloads/rgdal_1.6-7.tar’ had non-zero exit status

Thanks in advance for any help!

Upvotes: 0

Views: 149

Answers (0)

Related Questions