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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

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 73.71%. Comparing base (09067f5) to head (2495ce1).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4456      +/-   ##
==========================================
- Coverage   73.75%   73.71%   -0.05%     
==========================================
  Files         525      524       -1     
  Lines       33532    33419     -113     
  Branches     4139     4148       +9     
==========================================
- Hits        24733    24634      -99     
+ Misses       8797     8783      -14     
  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)

Co-authored-by: Tom Hughes <tom@compton.nu>
@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!

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

3 participants