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

OSX: fix build failures due to json-c #1179

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

alanstewart-terragotech
Copy link
Contributor

What does this PR do?

Resolve 64-bit build failures on OSX 10.12.6., following .travis.yml and using gdal/ci/travis/osx/*.sh. Updates assignment of the return value from json_object_array_lenght() to type 'auto' instead of 'int'. Some issues resolved by applying static_cast().

What are related issues/pull requests?

None.

Tasklist

  • ADD YOUR TASKS HERE
  • Add test case(s)
  • Review
  • Adjust for comments
  • All CI builds and checks have passed

Environment

OSX 10.12.6, xcode, homebrew

@@ -1713,6 +1713,7 @@ static const struct sqlite3_module sOGR2SQLITEModule =
nullptr, // xSavepoint
nullptr, // xRelease
nullptr, // xRollbackTo
nullptr, // xShadowName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change. breaks some build like the ubuntu_1804 of https://travis-ci.org/OSGeo/gdal/builds/476518997

@alanstewart-terragotech
Copy link
Contributor Author

alanstewart-terragotech commented Jan 7, 2019 via email

@alanstewart-terragotech
Copy link
Contributor Author

alanstewart-terragotech commented Jan 7, 2019 via email

@rouault
Copy link
Member

rouault commented Jan 7, 2019

Fails locally if it’s not there.

you probably need to add a check for a different sqlite version
#if SQLITE_VERSION_NUMBER >= version_where_xShadow_was_first_introduced
Another option, much more future proof, would probably be to avoid declaring a static const struct sqlite3_module and just declare a local variable in OGR2SQLITEModule::Setup() where it is used, and just manually set the members of version 1, that is all except the ones starting at #if SQLITE_VERSION_NUMBER >= 3007007L.

struct sqlite3_module sModule;
sModule.iVersion = 1;
sModule.xCreate = OGR2SQLITE_ConnectCreate;
etc...

@alanstewart-terragotech
Copy link
Contributor Author

alanstewart-terragotech commented Jan 7, 2019 via email

@rouault
Copy link
Member

rouault commented Jan 8, 2019

Your changes in bagdataset.cpp are not appropriate and should be reverted. Since libhdf5 1.10, hid_t is a typedef of int64 whereas it was int in previous versions, hence only the failure on the most recent distribution

I believe that it can be fixed with changing h5check() declaration to be a template
Something like

static template<class T> T h5check(T ret, const char* filename, int line)

@alanstewart-terragotech
Copy link
Contributor Author

alanstewart-terragotech commented Jan 8, 2019

The only failure now, gcc52_stdcpp14_sanitize, appears to be a network connectivity issue. How to force a re-run?

@rouault
Copy link
Member

rouault commented Jan 8, 2019

The only failure now, gcc52_stdcpp14_sanitize, appears to be a network connectivity issue. How to force a re-run?

I've triggered a re-run. You probably can't because of missing rights on the gdal repository

@alanstewart-terragotech
Copy link
Contributor Author

All green now!

@rouault rouault merged commit dfe030c into OSGeo:master Jan 8, 2019
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.

2 participants