Comments (18)
One of our team hammered at this yesterday.
The take home was to patch. He wrote:
Used brew edit proj
and added the following code:
head do
url "https://github.com/OSGeo/proj.4.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
#### START OF NEW CODE
patch <<~EOS
diff -ruN proj-6.1.0/src/proj_api.h proj-6.1.0-new/src/proj_api.h
--- proj-6.1.0/src/proj_api.h 2019-05-06 02:11:08.000000000 -0300
+++ proj-6.1.0-new/src/proj_api.h 2019-05-18 21:03:25.000000000 -0300
@@ -34,7 +34,8 @@
*/
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-#error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
+#warning 'Defining ACCEPT_USE_OF_DEPRECATED_PROJ_API_H to allow use of deprecated API. This API won't be available in PROJ 7.0.0 and onwards'
+#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#ifndef PJ_VERSION
EOS
#### END OF NEW CODE
Executed brew reinstall proj -s
and then bundle pristine
. rake db:create
worked.
While it's specific to our software he posted a precise list of commands for a clean install on os x, I've added a gist here- https://gist.github.com/mjy/02fc0bec94a3f0f4da792baad0df1a3f
from rgeo-proj4.
Thanks for reporting this.
This appears to be a band-aid, but not a long-term solution:
from rgeo-proj4.
@sethdeckard Thanks much for the pointer, it resolved our issues as well. We were working with completely clean systems, so it wasn't cache related.
Moving forward ket me know I can help test things out somehow here, we really appreciate everyones work on this.
from rgeo-proj4.
I have created a Gist for anyone looking to get rgeo / proj4 working on a Mac with Homebrew - see https://gist.github.com/peterwake/b0fff0c5c018c655c6d5a4aee86aa8ef
from rgeo-proj4.
Any chance of getting support for the newer version? It's not just macOS machines that use this gem.
from rgeo-proj4.
Fixed by #10. Version 3.0.0 is now out which uses v6.2+. Thanks for the patience everyone!
from rgeo-proj4.
It seems this is now impacting a system setup with brew install postgis
(gets 11.2), could that be right? We're getting "Coordinate system 'proj4' is not supported'?
from the rgeo-2.0.1 gem.
from rgeo-proj4.
To follow up, switching back to 5.2.0 eliminates the first error, but we hit a second:
PG:UdefinedFile: ERROR: could not load library "/usr/local/lib/postgresl/postgis-2.5.0.so ... Library not loaded: /usr/local/opt/proj/lib/libproj.15.dylib
. Seems we only have libproj.13.dylib via this route now. Exploring installing proj from source, but clearly need some other fixes.
Update
For others hitting this I think this ultimately let us use @sethdeckard's solution: brew link --overwrite proj
, our system was obiously not "clean".
from rgeo-proj4.
Anyone have any suggestions on how to get this gem working with alpine linux 3.9? In alpine proj4 is only available in the edge/testing repo and I can't scope to a different version (currently 6.1.0).
from rgeo-proj4.
@mjy I've been hitting the same PG:UdefinedFile
error and can't get the link command to change anything. I've tried starting fresh, messing with the postgis install, and several other things. Is there a reproducible set of steps I can follow to fix this?
from rgeo-proj4.
@MaxMartiFoundry I don't have the full list of steps, sorry. IIRC its something like: nuke as much as possible with brew
, also nuke your geo gems
. Follow Seth's steps, then my link step, then re-install the gems.
Again, sorry this is not very technical. If I hit it again I'll document explicitly here.
from rgeo-proj4.
I can't get this to work. I did this:
brew uninstall proj
brew tap sethdeckard/proj
brew install sethdeckard/proj/proj
gem uninstall rgeo-proj4
gem install rgeo-proj4
Am I missing a step? Can some other proj installation be on my system, how do I find which one it's linking to?
from rgeo-proj4.
Hi, all. Any solution on this, except downgrade?
from rgeo-proj4.
@baramik The patch mentioned above is technically not a downgrade, it's just delaying the inevitable as far as I understand it- i.e. it enables the use of proj 6.2.
from rgeo-proj4.
Hi @teeparham
Is there any plan to provide a long-term solution by replacing proj_api.h
?
Is it at least possible ?
from rgeo-proj4.
Looks like brew is starting to install proj version 7.0. The patch mentioned above will no longer work (as the patch itself warned about). Should still work if you force 6.x, though.
from rgeo-proj4.
Hello, Do you plan to support version 7?
from rgeo-proj4.
Looks like brew is starting to install proj version 7.0. The patch mentioned above will no longer work (as the patch itself warned about). Should still work if you force 6.x, though.
The patch above and @peterwake gist still works with 6.3.2.
As of today (May, 20 2020) it worked with the osgeo-proj.
The only changes are:
brew edit osgeo-proj
brew install osgeo-proj -s
gem install rgeo -- --with-geos-dir=/usr/local/Cellar/geos/3.8.1_1 \
--with-proj-dir=/usr/local/Cellar/osgeo-proj/6.3.2
gem install rgeo-proj4
from rgeo-proj4.
Related Issues (15)
- invalid option: --with-proj-dir=/usr/local/bin for command gem install rgeo-proj4 --with-proj-dir=/usr/local/bin HOT 3
- Move from Travis to Github actions HOT 1
- RGeo::CoordSys::Proj4.supported?` returns false with Homebrew + m1 HOT 14
- Regression in projection definition HOT 5
- Heroku: `proj_create: Cannot find proj.db` and `proj_create: no database context specified` HOT 5
- proj, postgres, spring, fork, Big Sur faulting HOT 4
- `RGeo::CoordSys::Proj4.transform_coords` slower in version 3.0.1 than version 2.0.1 HOT 3
- proj_crs_get_geodetic_crs: Object is not a CRS HOT 7
- Can Segfault with Invalid Proj String
- V4
- CoordinateTransform Refactor
- Segfault when Rails enters parallell testing mode HOT 24
- M1 proj 6.2+ proj4.rb::create::_create method - Error: dyld[xxxxxx]: missing symbol called
- Failt to use proj4 with rails. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgeo-proj4.