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

postgis2 doesn't work with PostgreSQL 11 #574

Closed
alazarolop opened this issue Dec 23, 2018 · 7 comments
Closed

postgis2 doesn't work with PostgreSQL 11 #574

alazarolop opened this issue Dec 23, 2018 · 7 comments

Comments

@alazarolop
Copy link
Collaborator

I have been using PostGIS extension with PostgreSQL 10 from postgis2 formula without issues, but since I've upgraded to PostgreSQL 11, postgis2 doesn't work anymore.

When I try CREATE EXTENSION postgis ; in a new database, I get this message:

ERROR:  could not load library "/usr/local/lib/postgresql/postgis-2.5.so": dlopen(/usr/local/lib/postgresql/postgis-2.5.so, 10): Symbol not found: _AllocSetContextCreate
  Referenced from: /usr/local/lib/postgresql/postgis-2.5.so
  Expected in: /usr/local/opt/postgresql/bin/postgres
 in /usr/local/lib/postgresql/postgis-2.5.so

I've just installed PostgreSQL (11.1) and postgis2 (2.5.1_1) in a clean VM to test it and I get the same result. postgis (2.5.0_1) formula instead works flawlessly, which I tested by linking and unlinking both formulae, postgis and postgis2. All the rest packages from OSGeo4Mac are up to date.

@fjperini
Copy link
Collaborator

@alazarolop I think the problem is that you have installed the two versions postgis2/postgis. By uninstalling or unlinking one of the two, you may be deleting /usr/local/lib/postgresql/postgis-2.5.so. Or maybe just seea necessary rebuild for the new PostgreSQL version.

Try only with postgis2 installed, but from source: brew install -build-from-source postgis2

@alazarolop
Copy link
Collaborator Author

I did uninstall postgis and then build from source postgis2. It works like a charm! Thank you.
I take note for the future to avoid installing again postgis.

@fjperini
Copy link
Collaborator

@nickrobison We could rename the formula, but this could bring this problem in the others: for example #503:

Error: Formulae found in multiple taps: 
       * brewsci/science/hdf4
       * osgeo/osgeo4mac/hdf4
Please use the fully-qualified name e.g. brewsci/science/hdf4 to refer the formula.

@alazarolop You can close this issue Thanks for informing us about the problem.

@nickrobison
Copy link
Collaborator

Thanks for reporting this! It sounds like the bottle needs to be rebuilt, which I can do now.

If homebrew core has an updated version of postgis, do we need to support our own?

I think the best, short term, solution is to make postgis2 keg-only and then link when we specifically need it.

@alazarolop
Copy link
Collaborator Author

@nickrobison would postgis core formula cause incompatibilities as it uses another GDAL package and version (2.3.x) and it's updated with a slower pace?

@fjperini
Copy link
Collaborator

@nickrobison @alazarolop That's right, use gdal. I think that was the reason why @PeterPetrik added postgis to osgeo4mac. Also updated much slower.

p/d: I added some more things to the formula. We remember to rebuild the bottle if a new version of PostgreSQL is published.

@nickrobison
Copy link
Collaborator

@alazarolop you’re correct, I hadn’t looked at the formula in a while and forgot why it was there! Glad it’s working for you and we’ll address the issues you reported.

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

3 participants