unable to build pdfium

24 views
Skip to first unread message

blem

unread,
Oct 13, 2025, 2:50:58 PMOct 13
to pdfium
I followed the instructions on building pdfium as listed here https://pdfium.googlesource.com/pdfium/+/chromium/3061/README.md

my args are 

is_debug = true
is_component_build = false
pdf_is_complete_lib = true     # one big .a
pdf_use_skia = true
pdf_enable_xfa = false
pdf_enable_v8 = false
use_sysroot = false
clang_use_chrome_plugins = false

However, I am getting the error below. Am I missing something?

gen/build/modules/linux-x64/module.modulemap:31:12: error: header '../../../../../../../../../../../../usr/include/x86_64-linux-gnu/asm/errno.h' not found
   31 |     header "../../../../../../../../../../../../usr/include/x86_64-linux-gnu/asm/errno.h"
      |            ^
1 error generated.
[1125/3065] CXX obj/third_party/icu/icuuc_private/caniter.o
ninja: build stopped: subcommand failed.

B.

Helmut Januschka

unread,
Oct 14, 2025, 2:56:43 AMOct 14
to pdfium
have you tried using: use_sysroot = true ?

if you are on debian this might also help (with use_sysroot = false ) help:

sudo apt-get install -y linux-libc-dev libc6-dev build-essential pkg-config
gn clean out/Default
gn gen out/Default

geisserml

unread,
Oct 14, 2025, 9:33:39 AMOct 14
to pdfium
I think the OP is looking at quite an outdated version of the documentation.
The Readme at `chromium/3061` indeed says "use_sysroot = false  # Currently must be false on Linux."
This has long since changed, and the easiest solution may be to build with the default `use_sysroot = true` if you don't mind using the external sysroot.
Otherwise, this probably points at missing base system headers/packages, as @hjanuschka also mentions.
Try conducting a "whatprovides" search with your package manager on the missing path(s) to figure out what packages exactly you need to install.
e.g. on my install of Fedora, `dnf whatprovides '*/asm/errno.h'` points at the "kernel-headers" package.

Lei Zhang

unread,
Oct 15, 2025, 3:16:06 PMOct 15
to pdfium
The OP references origin/chromium/3061 from early 2017. Is the build
really for that PDFium branch, or is something more modern?

It would also be helpful to mention what Linux distro is in use here,
as the packaging system differs.
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pdfium/5ba1821a-b096-4c8a-8902-5ada344c5adfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages