Skip to content
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

statically linked GDAL 3.0.0 / PROJ 6.1.0 on OSX #1070

Closed
edzer opened this issue Jun 4, 2019 · 6 comments
Closed

statically linked GDAL 3.0.0 / PROJ 6.1.0 on OSX #1070

edzer opened this issue Jun 4, 2019 · 6 comments

Comments

@edzer
Copy link
Member

edzer commented Jun 4, 2019

See also #79, #327.

After building GEOS with:

CC=clang CXX=clang++ ./configure --disable-shared
make
sudo make install

then building and installing PROJ 6.1.0 with:

CC=clang CXX=clang++ ./configure --disable-shared
make
sudo make install

then building & installing GDAL 3.0.0 with:

CC=clang CXX=clang++ ./configure --disable-shared --with-proj=/usr/local --without-geos --without-pg
make
sudo make install

I was successful building an OSX static binary package for sf using

R CMD INSTALL --dsym --build --configure-args='--with-proj-lib=/usr/local/lib --with-proj-include=/usr/local/include --with-proj-share=/usr/local/share/proj --with-proj-data=/usr/local/share/proj --with-data-copy=yes' sf

There's one more patch to sf's configure needed to make this work (following).

@edzer
Copy link
Member Author

edzer commented Jun 7, 2019

@rsbivand please review these changes to rgdal's configure.ac: https://r-forge.r-project.org/scm/viewvc.php/pkg/configure.ac?root=rgdal&r1=831&r2=834

(still some debug noise in there.) Turns out I had to change a test for proj.db to use C++ rather than C, and link with -lsqlite3 on OSX (this is the noise Brian referred to). This works for me on ubuntu with both GDAL 2.x/PROJ 5.x and GDAL 3.0.0/PROJ 6.1.0.

@rsbivand
Copy link
Member

rsbivand commented Jun 7, 2019

Thanks. Are we now assuming that if PROJ 6 is present that libsqlite is present, or do we need to test for that too?

Do I need to release this version soon, or is R-Forge OK for now?

@edzer
Copy link
Member Author

edzer commented Jun 7, 2019

No urge for this until Simon's build train for OSX-CRAN migrates GDAL and PROJ...

@rsbivand
Copy link
Member

rsbivand commented Jun 7, 2019

Have updated the proj4.org URLs to proj.org too, check had started complaining.

@edzer
Copy link
Member Author

edzer commented Jun 12, 2020

Some great progress going on here; a message from Brian Ripley:

I have put binary packages on CRANextras for lwgeom rgdal rgeos sf built with GEOS 3.8.1, GDAL 3.1.0, PROJ 6.3.2.

Install with (e.g.)

options(repos="https://www.stats.ox.ac.uk/pub/RWin")
install.packages('rgdal', type = 'binary')

(This needed a development version of the rgdal sources.)

This is just to allow early access: it is planned to use these versions of the libs on the CRAN builders soon (but they do need package updates, e.g. for rgdal and proj4).

These are all using static libraries to make these self-contained.

(In case anyone is wondering why not PROJ 7 -- that would need unreleased changes to the PROJ and GDAL sources and changes to many CRAN packages.)

Please try these out and report success/failure!

@rsbivand
Copy link
Member

R-sig-mac thread link: https://stat.ethz.ch/pipermail/r-sig-mac/2020-June/013599.html. Please follow up there with reports detailing specific failures/breakages if any. Do not complain about rgdal issuing warnings (even annoying false positives), they are there to alert users further away from development that new transformation mechanisms may compromise their work.

@edzer edzer closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants