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

Cleanup build #103

Merged
merged 55 commits into from
Jul 27, 2021
Merged

Cleanup build #103

merged 55 commits into from
Jul 27, 2021

Conversation

cvvergara
Copy link
Contributor

Before working on the src code,
the build needs to be cleaned up and adjusted so it can find postgres in other environments besides unix.

@cvvergara
Copy link
Contributor Author

The postgres version number was not been captured correctly

POSTGRESQL_VERSION_NUMBER=120700
-- POSTGRESQL_VERSION_STRING=PostgreSQL 12.7 (Ubuntu 12.7-0ubuntu0.20.04.1)
-- Found POSTGRESQL: /usr/include/postgresql/12/server (found version "12.7") 
Found compatible PostgreSQL 12.7 (Ubuntu 12.7-0ubuntu0.20.04.1)
-- PG_FULL_VERSION=120000

@cvvergara
Copy link
Contributor Author

MobilityDb is not using protobuf in its code and it is not building postgis so there is no need to checj for protobuf

@cvvergara
Copy link
Contributor Author

Understanding with Postgis 3
The error is different, (note that on first error when creating the extension it stops, there might me more)

ERROR:  could not load library "/usr/lib/postgresql/11/lib/libMobilityDB.so": /usr/lib/postgresql/11/lib/libMobilityDB.so: undefined symbol: getSRSbySRID

But interesting:

git grep getSRSbySRID ..
../point/include/postgis.h:extern char *getSRSbySRID(FunctionCallInfo fcinfo, int32_t srid, bool short_crs);
../point/src/tpoint_out.c:      srs = getSRSbySRID(fcinfo, srid, true);
../point/src/tpoint_out.c:      srs = getSRSbySRID(fcinfo, srid, false);

On Postgres 3 that one is defined in:
https://github.com/postgis/postgis/blob/stable-3.1/libpgcommon/lwgeom_cache.c
on Postgres 2.5 is defined in
https://github.com/postgis/postgis/blob/stable-2.5/postgis/lwgeom_export.c

In any case It is not the topic of this PR, yet. but those comments are a reminder of what to look when trying to make it work with PostGIS 3

@cvvergara
Copy link
Contributor Author

Need to find PostGIS to make sure that postgis-2.5 is found and that it is used

estebanzimanyi
estebanzimanyi previously approved these changes Jul 26, 2021
@cvvergara
Copy link
Contributor Author

@estebanzimanyi
There is no need to review while it is work in progress, I haven't clicked the button of "Ready for review", it still a draft

@cvvergara
Copy link
Contributor Author

@estebanzimanyi
From what I understand in this code:
https://github.com/MobilityDB/MobilityDB/blob/develop/CMakeLists.txt#L149-L169
When lwgeom is not found, then there is a fatal error and nothing is done.
So its always building "with postgis", never without it.

@cvvergara
Copy link
Contributor Author

There is a FindGSL but its avaliable on cmake 3.2 will see what happens when using that one
https://cmake.org/cmake/help/latest/module/FindGSL.html

@estebanzimanyi
Copy link
Member

estebanzimanyi commented Jul 26, 2021 via email

@cvvergara
Copy link
Contributor Author

About the lines, that is using the FindPostgresql, I created a custom one
https://github.com/cvvergara/MobilityDB/blob/cleanup-build/cmake/FindPOSTGRESQL.cmake
So now everything is based on the custom one, that gets everything that its needed in mobitlityDB
To avoid confision its FindPOSTGRESQL instead of FindPostgresql

@cvvergara cvvergara marked this pull request as ready for review July 27, 2021 00:01
@cvvergara
Copy link
Contributor Author

Basically the description of the changes of this PR are on the titles of the different commits.

@cvvergara
Copy link
Contributor Author

@estebanzimanyi Now you can review :-)

@cvvergara cvvergara mentioned this pull request Jul 27, 2021
10 tasks
@cvvergara cvvergara merged commit 057329d into MobilityDB:develop Jul 27, 2021
@cvvergara cvvergara deleted the cleanup-build branch July 27, 2021 14:15
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

Successfully merging this pull request may close these issues.

None yet

2 participants