Open11

tdfをビルドする

mimikunmimikun
cargo build --release
warning: file `/home/mimikun/ghq/github.com/itsjunetime/tdf/./benches/for_profiling.rs` found to be present in multiple
build targets:
  * `bin` target `for_profiling`
  * `bench` target `for_profiling`
   Compiling poppler-sys-rs v0.24.0
   Compiling gobject-sys v0.20.4
   Compiling cairo-sys-rs v0.20.0
   Compiling rand v0.8.5
warning: poppler-sys-rs@0.24.0:
error: failed to run custom build command for `poppler-sys-rs v0.24.0`

Caused by:
  process didn't exit successfully: `/home/mimikun/ghq/github.com/itsjunetime/tdf/target/release/build/poppler-sys-rs-555f60d344106460/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=/home/mimikun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poppler-sys-rs-0.24.0/Cargo.toml
  cargo:rerun-if-env-changed=POPPLER_GLIB_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:warning=
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags poppler-glib poppler-glib >= 23.7

  The system library `poppler-glib` required by crate `poppler-sys-rs` was not found.
  The file `poppler-glib.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent
directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `poppler-glib.pc`.

warning: build failed, waiting for other jobs to finish...
mimikunmimikun
tdf on  main is 📦 v0.1.0 via 🦀 v1.84.0-nightly as 🧙
❯ sudo apt search libpoppler-dev
Sorting... Done
Full Text Search... Done
libpoppler-dev/jammy-updates,jammy-security,now 22.02.0-2ubuntu0.5 amd64 [installed]
  PDF rendering library -- development files


tdf on  main is 📦 v0.1.0 via 🦀 v1.84.0-nightly as 🧙
❯ sudo apt search libpoppler-glib-dev
Sorting... Done
Full Text Search... Done
libpoppler-glib-dev/jammy-updates,jammy-security,now 22.02.0-2ubuntu0.5 amd64 [installed]
  PDF rendering library -- development files (GLib interface)
mimikunmimikun

poppler をソースからビルドする。
テストデータ?が必要なので、それも一緒にcloneする。

ghq get https://anongit.freedesktop.org/git/poppler/poppler.git
ghq get https://anongit.freedesktop.org/git/poppler/test.git

mimikunmimikun

ビルドのコマンドを打つ。
cat INSTALL でビルドのマニュアルを読める。

#ghq cd poppler
mkdir build
cd build
cmake ..
mimikunmimikun

エラー。

❌1 ❯ cmake ..
CMake Warning at CMakeLists.txt:162 (find_package):
  Could not find a configuration file for package "Gpgmepp" that is
  compatible with requested version "1.19".

  The following configuration files were considered but not accepted:

    /lib/x86_64-linux-gnu/cmake/Gpgmepp/GpgmeppConfig.cmake, version: 1.16.0
    /usr/lib/x86_64-linux-gnu/cmake/Gpgmepp/GpgmeppConfig.cmake, version: 1.16.0

Call Stack (most recent call first):
  CMakeLists.txt:170 (find_soft_mandatory_package)


CMake Error at CMakeLists.txt:164 (MESSAGE):
  Could not find the 1.19 version of Gpgmepp.  If you're not interested in
  the features it provides set the cmake ENABLE_GPGME option to OFF
Call Stack (most recent call first):
  CMakeLists.txt:170 (find_soft_mandatory_package)


-- Configuring incomplete, errors occurred!
See also "/home/mimikun/ghq/anongit.freedesktop.org/git/poppler/poppler/build/CMakeFiles/CMakeOutput.log".
mimikunmimikun

aptで入るのはv1.16で古い。

sudo apt install libgpgmepp-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libgpgmepp-dev is already the newest version (1.16.0-1.2ubuntu4.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mimikunmimikun

これもソースからビルドする。
探せばあるのだろうが、伝統的なデザインのWebページだったので見つけられなかった。
仕方ないのでGitHubのミラーからcloneする。
GitHubは革新的なデザインなので見やすい。

ghq get https://github.com/gpg/gpgme.git