Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933711 - media-gfx/inkscape-1.3.2-r2: fails to compile with clang-18 on llvm profile (3rdparty/2geom/include/2geom/path.h:846:20: error: no member named 'unique' in 'std::shared_ptr<Geom::PathInternal::PathData>')
Summary: media-gfx/inkscape-1.3.2-r2: fails to compile with clang-18 on llvm profile (...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Andreas K. Hüttel
URL: https://gitlab.com/inkscape/lib2geom/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-06-07 00:49 UTC by Liu Yujie
Modified: 2024-11-21 19:06 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,16.35 KB, text/plain)
2024-06-07 00:49 UTC, Liu Yujie
Details
build.log (media-gfx:inkscape-1.3.2-r2:20240607-003411.log,397.21 KB, text/x-log)
2024-06-07 00:50 UTC, Liu Yujie
Details
Avoid-std-shared_ptr-T-unique.patch (Avoid-std-shared_ptr-T-unique.patch,849 bytes, patch)
2024-06-07 00:58 UTC, Liu Yujie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Liu Yujie 2024-06-07 00:49:16 UTC
When trying to emerge media-gfx/inkscape-1.3.2-r2 on llvm profile with clang-18:
/tmp/portage/media-gfx/inkscape-1.3.2-r2/work/inkscape-1.3.2/src/3rdparty/2geom/include/2geom/path.h:846:20: error: no member named 'unique' in 'std::shared_ptr<Geom::PathInternal::PathData>'
  846 |         if (!_data.unique()) {
      |              ~~~~~ ^


there is already an upstream issue and exists possible fix 
https://gitlab.com/inkscape/lib2geom/-/issues/74
https://gitlab.com/inkscape/lib2geom/-/commit/9b1ff56ae90db7fbbceebaac3ccf521f6ceb32f4

Reproducible: Always
Comment 1 Liu Yujie 2024-06-07 00:49:45 UTC
Created attachment 895280 [details]
emerge --info
Comment 2 Liu Yujie 2024-06-07 00:50:41 UTC
Created attachment 895281 [details]
build.log
Comment 3 Liu Yujie 2024-06-07 00:58:44 UTC
Created attachment 895282 [details, diff]
Avoid-std-shared_ptr-T-unique.patch
Comment 4 Markus Peloquin 2024-10-15 06:40:38 UTC
Patch works for me! Thanks!
Comment 5 Paweł Metelski 2024-11-14 19:02:49 UTC
Not sure if related, but also failing to build with gcc 13.3.1_p20241025:

/var/tmp/portage/media-gfx/inkscape-1.3.2-r2/work/inkscape-1.3.2/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp: In static member function ‘static CairoFreeTypeFont* CairoFreeTypeFont::create(const std::shared_ptr<GfxFont>&, XRef*, FT_Library, CairoFontEngine*, bool)’:
/var/tmp/portage/media-gfx/inkscape-1.3.2-r2/work/inkscape-1.3.2/src/extension/internal/pdfinput/poppler-cairo-font-engine.cpp:424:44: error: no matching function for call to ‘FoFiTrueType::make(fontchar, std::vector<unsigned char>::size_type)’

(...)

I didn't dig into this, just removed it from world and moved on with my update. Perhaps should have a dependency on app-text/poppler <= 24.08.0 ?
Comment 6 Andreas Sturmlechner gentoo-dev 2024-11-14 21:13:37 UTC
(In reply to Paweł Metelski from comment #5)
> Not sure if related, but also failing to build with [...]
Unrelated and fixed in 1.4-r1.

Speaking of which, did anyone here test 1.4-r1 with clang-18 already?
Comment 7 Michel Ganguin 2024-11-21 19:06:36 UTC
Same error with 1.3.2. Building 1.4 with LLVM profile works for me, with the following USE flags:

    [ebuild   R   ~] media-gfx/inkscape-1.4-r1::gentoo  USE="cdr exif jpeg openmp readline spell -X -dia -graphicsmagick -imagemagick -inkjar -postscript -sourceview -svg2 -test -visio -wpg" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13" 0 KiB