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

Build error in src/transformations/gridshift.cpp after #4038 #4046

Closed
pjonsson opened this issue Feb 10, 2024 · 4 comments · Fixed by #4047
Closed

Build error in src/transformations/gridshift.cpp after #4038 #4046

pjonsson opened this issue Feb 10, 2024 · 4 comments · Fixed by #4047
Labels

Comments

@pjonsson
Copy link
Contributor

After @rouault merged #4038, PROJ master fails building when building GDAL images.

Example of problem

[ 77%] Building CXX object src/CMakeFiles/proj.dir/transformations/hgridshift.cpp.o
�[91m/proj/src/transformations/gridshift.cpp: In member function 'bool {anonymous}::gridshiftData::checkGridTypes(PJ*, bool&)':
/proj/src/transformations/gridshift.cpp:171:38: error: 'osgeo::proj::internal' has not been declared
  171 |             m_offsetX = osgeo::proj::internal::c_locale_stod(offsetX);
      |                                      ^~~~~~~~
/proj/src/transformations/gridshift.cpp:177:38: error: 'osgeo::proj::internal' has not been declared
  177 |             m_offsetY = osgeo::proj::internal::c_locale_stod(offsetY);
      |                                      ^~~~~~~~
�[0m�[91mmake[2]: *** [src/CMakeFiles/proj.dir/build.make:2484: src/CMakeFiles/proj.dir/transformations/gridshift.cpp.o] Error 1

Problem description

I haven't looked into the details but I think this is the same type of issue as #3842, GDAL redefines namespace names, so the code should use NS_PROJ as namespace name.

Expected Output

Environment Information

  • PROJ version: master
  • Operation System Information: Ubuntu 22.04 LTS as base for GDAL 3.8.3 image.

Installation method

  • What the build script from the GDAL repositiory does.
@jjimenezshaw
Copy link
Contributor

@pjonsson Could you try with that branch? Thanks.

@pjonsson
Copy link
Contributor Author

@jjimenezshaw unfortunately I don't have a development environment over the weekend. Your patch looks correct, so if it gets merged, I can let you know tomorrow if our nightly CI job passed. Otherwise I will try to get time to test your fix next week.

Thank you for the quick fix!

@jjimenezshaw
Copy link
Contributor

@pjonsson Merged. You can have a look tomorrow.

@pjonsson
Copy link
Contributor Author

@jjimenezshaw nightly passed, thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants