Build PDFium as static library on Linux, with use_custom_libcxx flag

60 views
Skip to first unread message

Александр Рыбалов

unread,
Oct 6, 2025, 12:19:23 PMOct 6
to pdfium
Hello!

I'm trying to build the PDFium library as a static library for my Linux project. I want a purely static library without any dependencies so I can include it in my project. However, on Linux, using use_custom_libcxx=false causes compilation errors. Therefore, I can build the library with just the custom libc++ library, but that means I'd have to also link my application to this custom libc++ library, which I don't want to do.

Please help me resolve this issue.

Александр Рыбалов

unread,
Oct 7, 2025, 5:40:42 AMOct 7
to pdfium
I solved the problem by downgrading the library version. I used the chromium/6000 branch and the depot_tools commit 7f5b53ff8ddd4b1c573b20693e669a9f14ab1a7f. I also needed to set DEPOT_TOOLS_UPDATE=0 in the environment variable to prevent gclient from updating depot_tools. Also, with this version, you need to use Python 3.9; later versions don't have the pipes library.

понедельник, 6 октября 2025 г. в 23:19:23 UTC+7, Александр Рыбалов:

Lei Zhang

unread,
Oct 15, 2025, 3:18:02 PMOct 15
to Александр Рыбалов, pdfium
I'm glad you found a solution, but having to downgrade everything is
still not great. Can you share the complete list of GN args you are
using in your build?
> --
> 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/44f0dcc3-9898-4cf6-abd3-4eb8c6d39498n%40googlegroups.com.

Александр Рыбалов

unread,
Oct 17, 2025, 7:06:03 AMOct 17
to pdfium
is_component_build=false
pdf_is_standalone=true
pdf_is_complete_lib=true
use_custom_libcxx=false
pdf_enable_v8=false
pdf_enable_xfa=false
use_system_zlib=false
use_system_libpng=false
use_system_lcms2=false
use_system_libopenjpeg2=false

use_sysroot doesn't help

четверг, 16 октября 2025 г. в 02:18:02 UTC+7, Lei Zhang:
Reply all
Reply to author
Forward
0 new messages