Git Product home page Git Product logo

Comments (18)

mjy avatar mjy commented on August 26, 2024 3

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.

teeparham avatar teeparham commented on August 26, 2024 2

Thanks for reporting this.

This appears to be a band-aid, but not a long-term solution:

OSGeo/PROJ#836

from rgeo-proj4.

mjy avatar mjy commented on August 26, 2024 2

@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.

peterwake avatar peterwake commented on August 26, 2024 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

from rgeo-proj4.

Mange avatar Mange commented on August 26, 2024 2

Any chance of getting support for the newer version? It's not just macOS machines that use this gem.

from rgeo-proj4.

keithdoggett avatar keithdoggett commented on August 26, 2024 2

Fixed by #10. Version 3.0.0 is now out which uses v6.2+. Thanks for the patience everyone!

from rgeo-proj4.

mjy avatar mjy commented on August 26, 2024 1

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.

mjy avatar mjy commented on August 26, 2024 1

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.

jasonben avatar jasonben commented on August 26, 2024

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.

MaxMartiFoundry avatar MaxMartiFoundry commented on August 26, 2024

@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.

mjy avatar mjy commented on August 26, 2024

@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.

tinco avatar tinco commented on August 26, 2024

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.

baramik avatar baramik commented on August 26, 2024

Hi, all. Any solution on this, except downgrade?

from rgeo-proj4.

mjy avatar mjy commented on August 26, 2024

@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.

inkstak avatar inkstak commented on August 26, 2024

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.

LocoDelAssembly avatar LocoDelAssembly commented on August 26, 2024

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.

sebfie avatar sebfie commented on August 26, 2024

Hello, Do you plan to support version 7?

from rgeo-proj4.

gpcarmo avatar gpcarmo commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.