Closed sethdeckard closed 3 years ago
Thanks for reporting this.
This appears to be a band-aid, but not a long-term solution:
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.
@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.
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".
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).
@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?
@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.
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?
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
Hi, all. Any solution on this, except downgrade?
@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.
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
Any chance of getting support for the newer version? It's not just macOS machines that use this gem.
Hi @teeparham
Is there any plan to provide a long-term solution by replacing proj_api.h
?
Is it at least possible ?
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.
Hello, Do you plan to support version 7?
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
Fixed by #10. Version 3.0.0 is now out which uses v6.2+. Thanks for the patience everyone!
I had proj4 installed via homebrew and everything was working fine until just recently when 6.0.0 was released and then I started getting the following error:
Proj4 not supported in this installation
.My first thought was that I needed just rebuild the native extensions for the gem so I did a
bundle pristine
but still no luck.Switching back to 5.2.0 works and I've created a homebrew tap for this: