pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: poppler build issues after 22.01.0 update



On Wed, Jan 19, 2022 at 11:30 PM Thomas Klausner <wiz%netbsd.org@localhost> wrote:
>
> On Wed, Jan 19, 2022 at 08:42:06PM +0100, Claes Nästén wrote:
> > Had issues building poppler on Solaris, should apply to other users of
> > GCC 7 and 8 having the
> > <filesystem> header that might be lacking on the system provided GCC
> > of NetBSD 9 (I thought
> > I saw that somewhere?)
> >
> > Anyway, attached a patch that if compiled using GCC will skip the use
> > of std::filesystem and
> > use the old unlink behaviour instead of having to sort out the link of
> > the extra library required.
> >
> > This patch check against > 8,
> > https://en.cppreference.com/w/cpp/filesystem says 9.1 but the
> > CMake module I found for the check claimed 9.0.
> >
> > This could of course be extended to check for clang version but clang
> > in pkgsrc should be
> > more than recent enough.
>
> I've built this package successfully on NetBSD 9.1.
> poppler has a check:
>
> #if __has_include(<filesystem>)
> #    include <filesystem>
> #else
>
> and my NetBSD 9 does not provide a "filesystem" header.
>

And that's why it works for you!

>
> Why does this check fail for you?
>

The filesystem header is available, however a special library needs to be linked
to get access to the functionality.

From the cppreference link from the previous mail:

"Using this library may require additional compiler/linker options.
GNU implementation prior
to 9.1 requires linking with -lstdc++fs and LLVM implementation prior
to LLVM 9.0 requires
linking with -lc++fs."

I've noted that other checks do not check for 9.1, but 9.0 instead.
The GCC (GCC 8 from pkgsrc)
provides the header, and will link if the extra lib is provided. Took
the easy way out skipping the
extra library.

/Claes


Home | Main Index | Thread Index | Old Index