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

Fix building with GCC 14 #4456

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Fix building with GCC 14 #4456

merged 2 commits into from
Jul 15, 2024

Conversation

hummeltech
Copy link
Contributor

@hummeltech hummeltech commented May 21, 2024

Fails to build with GCC 14.

/usr/bin/ld: /tmp/cc90QIs2.ltrans0.ltrans.o: in function `main':
<artificial>:(.text.startup+0xb1): undefined reference to `mapnik::singleton<mapnik::datasource_cache, mapnik::CreateStatic>::instance()'
/usr/bin/ld: <artificial>:(.text.startup+0x278): undefined reference to `mapnik::singleton<mapnik::datasource_cache, mapnik::CreateStatic>::instance()'
collect2: error: ld returned 1 exit status
make[2]: *** [utils/geometry_to_wkb/CMakeFiles/geometry_to_wkb.dir/build.make:115: out/geometry_to_wkb] Error 1
make[1]: *** [CMakeFiles/Makefile2:1724: utils/geometry_to_wkb/CMakeFiles/geometry_to_wkb.dir/all] Error 2

@tomhughes
Copy link
Contributor

That looks very similar to https://src.fedoraproject.org/rpms/mapnik/blob/rawhide/f/mapnik-gcc14.patch ;-)

@hummeltech
Copy link
Contributor Author

hummeltech commented May 21, 2024

Indeed, it is basically the same, except that one source file has already had the patch applied and another source file has been renamed such that it cannot be applied directly as that patch is targeting Mapnik v3.1.

Thanks for the help!

Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.00%. Comparing base (d9a6494) to head (0526c60).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4456      +/-   ##
==========================================
- Coverage   72.00%   72.00%   -0.01%     
==========================================
  Files         524      524              
  Lines       33419    33418       -1     
  Branches     4145     4145              
==========================================
- Hits        24065    24064       -1     
  Misses       9352     9352              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hummeltech hummeltech marked this pull request as draft May 21, 2024 15:52
@hummeltech
Copy link
Contributor Author

Unfortunately this patch needs more work as it is breaking Windows builds.

@mathisloge
Copy link
Collaborator

Unfortunately this patch needs more work as it is breaking Windows builds.

I think you just need to add a connection_manager.cpp to postgis with

template class MAPNIK_DECL singleton<ConnectionManager, CreateStatic>;

However, for pgraster plugin it might get a bit weird, since it has been used header sources from the postgis plugin (which might be understandable, but isn't the greatest thing in terms of low coupling :D)

@hummeltech
Copy link
Contributor Author

hummeltech commented Jun 14, 2024

Thanks for the suggestion @mathisloge, unfortunately I wasn't having much luck, especially since I don't have a Windows system at the ready to use for building this. Could you provide a little more detail? Thanks again!

@hummeltech hummeltech marked this pull request as ready for review June 22, 2024 12:44
@hummeltech
Copy link
Contributor Author

hummeltech commented Jun 22, 2024

Alright @mathisloge, I have included a workaround to get Windows builds passing in addition to fixing GCC 14 builds.

@artemp artemp merged commit 5e7b478 into mapnik:master Jul 15, 2024
7 checks passed
@hummeltech hummeltech deleted the GCC14 branch July 15, 2024 14:56
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

4 participants