* Dr. David Alan Gilbert ([email protected]) wrote:
> * Etna - ([email protected]) wrote:
> > Hello all, attempting to build the latest checkout against Debian 12 on a 
> > self-compiled LLVM15, libc++15 and clang-15 returns the following error:
> > 
> > -----------
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Dict.cc:116:30:
> >  error: no member named 'sort' in namespace 'std::ranges'
> >                 std::ranges::sort(that->entries, CmpDictEntry {});
> >                 ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Dict.cc:123:39:
> >  error: no member named 'lower_bound' in namespace 'std::ranges'
> >         const auto pos = std::ranges::lower_bound(entries, key, std::less<> 
> > {}, &DictEntry::first);
> >                          ~~~~~~~~~~~~~^
> 
> OK, so my reading is that's a C++20 feature, and the LLVM 15.0.0 release 
> notes say:
> 
> https://releases.llvm.org/15.0.0/projects/libcxx/docs/ReleaseNotes.html
> 
>   'The C++20 ranges library has progressed a lot since the last release and 
> is almost complete. The ranges library is considered experimental.'

Oops, so I then saw your line at the bottom; so yes, it's no surprise
that the experimental flag helps, and yes that patch you found
should ifdef these std::ranges against clang;  in your world are
you seeing that patch has been applied - becuase it should
be applied by LO when it unpacks poppler.

Dave

> Dave
> 
> > [CXX] workdir/UnpackedTarball/poppler/poppler/PageTransition.cc
> > [CXX] workdir/UnpackedTarball/poppler/poppler/Parser.cc
> > 2 errors generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:403: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/Dict.o]
> >  Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Catalog.cc:708:22:
> >  error: no member named 'sort' in namespace 'std::ranges'
> >         std::ranges::sort(entries, [](const auto &first, const auto 
> > &second) { return first->name.cmp(&second->name) < 0; });
> >         ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Catalog.cc:757:31:
> >  error: no member named 'lower_bound' in namespace 'std::ranges'
> >     auto entry = std::ranges::lower_bound(entries, name, 
> > EntryGooStringComparer {});
> >                  ~~~~~~~~~~~~~^
> > 2 errors generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:399: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/Catalog.o]
> >  Error 1
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Annot.cc:7502:29:
> >  error: no member named 'find' in namespace 'std::ranges'
> >     auto idx = std::ranges::find(annots, annot);
> >                ~~~~~~~~~~~~~^
> > 1 error generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:399: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/Annot.o]
> >  Error 1
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Gfx.cc:2548:22:
> >  error: no type named 'sort' in namespace 'std::ranges'
> >         std::ranges::sort(bboxIntersections);
> >         ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Gfx.cc:2649:22:
> >  error: no type named 'sort' in namespace 'std::ranges'
> >         std::ranges::sort(s);
> >         ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/Gfx.cc:2790:26:
> >  error: no type named 'sort' in namespace 'std::ranges'
> >             std::ranges::sort(s);
> >             ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GlobalParams.cc:369:30:
> >  error: no member named 'find' in namespace 'std::ranges'
> >             if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
> > filesToIgnore.end()) {
> >                 ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:1871:22:
> >  error: no member named 'sort' in namespace 'std::ranges'
> >         std::ranges::sort(widths.exceps, cmpWidthExcepFunctor());
> >         ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GlobalParams.cc:380:34:
> >  error: no member named 'find' in namespace 'std::ranges'
> >                 if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
> > filesToIgnore.end()) {
> >                     ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GlobalParams.cc:392:34:
> >  error: no member named 'find' in namespace 'std::ranges'
> >                 if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
> > filesToIgnore.end()) {
> >                     ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:1919:22:
> >  error: no member named 'sort' in namespace 'std::ranges'
> >         std::ranges::sort(widths.excepsV, cmpWidthExcepVFunctor());
> >         ~~~~~~~~~~~~~^
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GlobalParams.cc:740:18:
> >  error: no member named 'replace' in namespace 'std::ranges'
> >     std::ranges::replace(fontName, '-', ' ');
> >     ~~~~~~~~~~~~~^
> > 3 errors generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:399: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/Gfx.o]
> >  Error 1
> > /home/etna/Tmpdir/libreoffice/build/workdir/UnpackedTarball/poppler/poppler/GlobalParams.cc:1123:38:
> >  error: no member named 'find' in namespace 'std::ranges'
> >                     if (std::ranges::find(filesToIgnore, sFilePath) == 
> > filesToIgnore.end()) {
> >                         ~~~~~~~~~~~~~^
> > 2 errors generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:399: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/GfxFont.o]
> >  Error 1
> > 5 errors generated.
> > make[1]: *** 
> > [/home/etna/Tmpdir/libreoffice/solenv/gbuild/LinkTarget.mk:399: 
> > /home/etna/Tmpdir/libreoffice/build/workdir/GenCxxObject/UnpackedTarball/poppler/poppler/GlobalParams.o]
> >  Error 1
> > make: *** [Makefile:296: build] Error 2
> > -----------
> > 
> > By some blind Googling luck, it seems adding the -fexperimental-library 
> > flag to clang++ in CXX and CXXFLAGS worked around the issue, but is there 
> > anyway this can be addressed without having to use the flag?
> > 
> > Also, just a wild guess: does the patchset in 
> > core/external/poppler/clang-std-ranges.patch.1 have anything to do with 
> > this?
> > 
> > Thank you.
> -- 
>  -----Open up your eyes, open up your mind, open up your code -------   
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

Reply via email to