https://bugs.documentfoundation.org/show_bug.cgi?id=172460
Bug ID: 172460
Summary: Bundled poppler fails to build when
"--with-system-poppler=no"
Product: LibreOffice
Version: 24.8.4.2 release
Hardware: All
OS: FreeBSD
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Installation
Assignee: [email protected]
Reporter: [email protected]
Description:
On FreeBSD, when compiling the LibreOffice with poppler (when
--with-system-poppler=no used). During compilation it throws an error about
missing pread64() and lseek64(), where it should be detected automatically:
| poppler/ConfigureChecks.cmake: check_function_exists(pread64 HAVE_PREAD64)
| poppler/ConfigureChecks.cmake: check_function_exists(lseek64 HAVE_LSEEK64)
The *BSD-s systems does not have pread64() or lseek64(). Generally speaking
BSD-s like FreeBSD, OpenBSD, NetBSD does not have "xxx64()" nor "xxx32()"
calls, as far as We know. They use unified "xxx()" - regardless to arch You
compile.
As a workaround, we have decided to create a simple-dirty patch as follows -
attachment (patch-poppler_bsd_support.mk). It adds a simple redefinition at the
beginning of "poppler/goo/gfile.cc" to support "--with-system-poppler=no"
builds:
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#undef HAVE_PREAD64
#undef HAVE_LSEEK64
#endif
We have tried with many versions of LibreOffice 24.8+, 25.x and 26.x - same
issue.
Someone from LibreOffice-dev team should look into this. Please check also
other(all) constants like HAVE_FSEEKO. Especially, when You have already
provided patches like the "external/poppler/poppler-config.patch.1". This issue
is a LibreOffice specific. It does not occur when compiling the poppler
separately (standalone build), as it auto-detects (check_function_exists)
correctly.
This bug probably never came out, because FreeBSD (like many UNIX-like OS
distros) use "--with-system-poppler=yes" as poppler is commonly used, therefore
present in any port/package repo - installed as dependency by packet manager.
No need to compile it within LibreOffice.
Steps to Reproduce:
1. set up "--with-system-poppler=no"
2. Build libreoffice
Actual Results:
During compilation it throws an error about missing pread64() and lseek64()
Expected Results:
The poppler should run configure (set all #define constants) correctly when
compiled within LibreOffice.
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 24.8.4.2
--
You are receiving this mail because:
You are the assignee for the bug.