Missing fast_float v6.1.4 in PKGBUILD for libpdfium-nojs 6778
fatal error: third_party/fast_float/src/include/fast_float/fast_float.h: .....
Git Clone URL: | https://aur.archlinux.org/libpdfium-nojs.git (read-only, click to copy) |
---|---|
Package Base: | libpdfium-nojs |
Description: | Open-source PDF rendering engine. |
Upstream URL: | https://pdfium.googlesource.com/pdfium/ |
Keywords: | pdf pdfium |
Licenses: | BSD |
Conflicts: | libpdfium-bin |
Provides: | libpdfium |
Submitter: | selmf |
Maintainer: | selmf |
Last Packager: | selmf |
Votes: | 22 |
Popularity: | 0.000001 |
First Submitted: | 2017-07-30 18:14 (UTC) |
Last Updated: | 2024-05-09 10:52 (UTC) |
Missing fast_float v6.1.4 in PKGBUILD for libpdfium-nojs 6778
fatal error: third_party/fast_float/src/include/fast_float/fast_float.h: .....
Same problem here since some time. Just to let you know.
AUR packages marked as outdated: libpdfium-nojs openvpn-dco-dkms opera pkgtools
libpdfium-nojs: local package (6668.r4.e59b248dc4-1) is newer than the AUR one (6367.r1.7b90b15a21-1)
I've just intalled this package (megasync dependency) and the version seems to be 6422.r2.94407286f4-1, not 6367.r1.7b90b15a21-1. I'm not an expert, I don't know if there is a mistake of if the version number is irrelevant.
@YetAnotherAli I've updated the package with a workaround for the issue. It should build without modifications again.
@selmf Thank you very much. Everything worked exactly as you said.
@YetAnotherAli it seems that pdfium upstream messed up the dependencies for the current stable branch. I did some initial checks and it looks like the build setup is referencing a version of the chromium build environment that is newer than the version they pull via DEPS.
I'm still undecided on how to best adress this, but as a workaround you can switch to a beta build by changing the chrome_version in the PKGBUILD to the beta channel. The correct line for this is already present, you just have to comment the stable and uncomment the beta chrome_version.
Failure in build: Undefined identifier at enable_safe_libstdcxx.
Only found these two links referencing something similar: https://github.com/bblanchon/pdfium-binaries/actions/runs/8323881636 https://github.com/bblanchon/pdfium-binaries/actions/runs/8323949160
@selmf - gotcha. when copying and pasting the pkgbuild earlier, i saw the partition_alloc flag was set to false and the thought did occur to me that with the flag being false, there was no need to bring in the source. but, i went with what i saw as an attempt to hook in the partition_alloc source, perhaps for later inclusion of partalloc vs malloc. in any case, your new push works out of the box, so all's good.
@jghodd Thanks for testing. My first attempt to fix this had some leftover artifacts from my attempts to make partition_alloc work, which I did not notice because I forgot to test with a clean build.
Revision two, which I pushed yesterday, does not need any references to partition_alloc because it is disabled via the build system. I did test this on a clean build, so it should work.
@michaldybczak & @selmf - here's the PKGBUILD.
# Maintainer: Felix Kauselmann <licorn@gmail.com>
pkgname=libpdfium-nojs
pkgver=5359.r0.9d2c662f55
pkgrel=2
pkgdesc="Open-source PDF rendering engine."
arch=('x86_64')
url="https://pdfium.googlesource.com/pdfium/"
license=('BSD')
depends=('freetype2' 'lcms2' 'libjpeg' 'openjpeg2' 'icu')
conflicts=('libpdfium-bin')
provides=('libpdfium')
makedepends=('git' 'python' 'gn' 'ninja')
source=("git+https://pdfium.googlesource.com/pdfium"
"git+https://chromium.googlesource.com/chromium/src/build.git"
"git+https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git"
"git+https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp"
"libpdfium.pc"
)
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'feb270967925a0844b1b9a9e15288eb3')
pkgver() {
cd $srcdir/pdfium
# Version = branch name/number + number of commits since branch creation
# + short head
printf "%s.r%s.%s" $(git rev-parse --abbrev-ref HEAD | cut -d '/' -f2)\
$(git rev-list --count main..) $(git rev-parse --short HEAD)
}
prepare() {
cd "$srcdir/pdfium"
ln -sf $srcdir/build build
ln -sf $srcdir/abseil-cpp third_party/abseil-cpp
mkdir -p $srcdir/pdfium/base/allocator
ln -sf $srcdir/partition_allocator base/allocator/partition_allocator
# Pdfium is developed alongside Chromium and does not provide releases
# Upstream recommends using Chromium's dev channels instead
# Extract pdfium branch name used in stable channel from omahaproxy and do
# a checkout
git checkout "chromium/$(curl https://omahaproxy.appspot.com/linux?channel=stable | cut -d'.' -f 3)"
# git checkout "chromium/$(curl https://omahaproxy.appspot.com/linux?channel=beta | cut -d'.' -f 3)"
# git checkout "chromium/$(curl https://omahaproxy.appspot.com/linux?channel=dev | cut -d'.' -f 3)"
# Extract build repo revision needed from DEPS file and do a checkout
cd "$srcdir/pdfium/build"
git checkout $(awk '/build_revision/ {print substr($2,2,40)}' $srcdir/pdfium/DEPS) -q
# Extract abseil-cpp repo revision needed from DEPS file and do a checkout
cd "$srcdir/pdfium/third_party/abseil-cpp"
git checkout $(awk '/abseil_revision/ {print substr($2,2,40)}' $srcdir/pdfium/DEPS) -q
# Patch abseil build to be static
sed -i 's/component(/static_library(/' BUILD.gn
sed -i 's/is_component_build(/false/' BUILD.gn
cd "$srcdir/pdfium/base/allocator/partition_allocator"
git checkout $(awk '/partition_allocator_revision/ {print substr($2,2,40)}' $srcdir/pdfium/DEPS) -q
# Use system provided icu library (unbundling)
mkdir -p "$srcdir/pdfium/third_party/icu"
ln -sf "$srcdir/build/linux/unbundle/icu.gn" "$srcdir/pdfium/third_party/icu/BUILD.gn"
# Download and decode shim header script needed to unbundle icu (gittiles is weird)
mkdir -p "$srcdir/pdfium/tools/generate_shim_headers/"
echo "Downloading generate_shim_headers script from Chromium."
curl https://chromium.googlesource.com/chromium/src/+/main/tools/generate_shim_headers/generate_shim_headers.py?format=TEXT \
| base64 --decode > "$srcdir/pdfium/tools/generate_shim_headers/generate_shim_headers.py"
echo "Done."
# Create fake gclient_args.gni file to satisfy include list for build/config/compiler/compiler.gni
touch "$srcdir/build/config/gclient_args.gni"
# Exclude test fonts from build
cd "$srcdir/pdfium/testing/"
sed -i '/"\/\/third_party\/test_fonts",/s/^/#/g' BUILD.gn
}
build() {
cd "$srcdir/pdfium"
local _flags=(
'is_clang=false'
'use_sysroot=false'
'is_debug=false'
'symbol_level=0'
'pdf_enable_v8=false'
'pdf_enable_xfa=false'
'treat_warnings_as_errors=false'
'use_system_libjpeg=true'
'use_system_zlib=true'
'pdf_bundle_freetype=false'
'use_system_freetype=true'
'use_system_lcms2=true'
'use_system_libpng=true'
'use_custom_libcxx=false'
'pdf_is_standalone = true'
'use_system_libopenjpeg2 = true'
'is_component_build = true'
'use_gold = false'
'pdf_use_partition_alloc = false'
)
gn gen out/Release --args="${_flags[*]}"
ninja -C out/Release pdfium
# set pdfium version in pc file
sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/libpdfium.pc"
}
package() {
cd "$srcdir/pdfium"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D public/*.h --target-directory="${pkgdir}/usr/include/pdfium"
install -D public/cpp/* --target-directory="${pkgdir}/usr/include/pdfium/cpp"
install -D docs/* --target-directory="${pkgdir}/usr/share/doc/pdfium"
install -Dm755 out/Release/libpdfium.so --target-directory="${pkgdir}/usr/lib"
install -Dm644 ${srcdir}/libpdfium.pc --target-directory=${pkgdir}/usr/lib/pkgconfig
}
Pinned Comments
selmf commented on 2021-05-24 11:20 (UTC)
Important: This package depends on libicuuc and needs to be rebuild if the icu package is updated on your system!