-
Notifications
You must be signed in to change notification settings - Fork 6
Building on Amazon Linux
John Cipriano edited this page Sep 11, 2016
·
1 revision
sudo yum groupinstall -y "Development Tools"
sudo yum install -y git-all
sudo yum install -y python
sudo yum install -y libjpeg-turbo-devel
sudo yum install -y freetype-devel
I've chosen to put it in /opt/depot_tools, which requires chowning that dir since /opt is owned by root.
cd /opt
sudo mkdir depot_tools
sudo chown ec2-user depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo 'export PATH=/opt/depot_tools:"$PATH"' >> ~/.bashrc
mkdir ~/repo && cd ~/repo
gclient config --unmanaged https://github.com/gradescope/pdfium.git
cd pdfium
git checkout pandafium
gclient sync
build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
gn gen out/Lambda
gn args out/Lambda # (this will open an editor, settings follow)
We're disabling JS and XFA support. We're also disabling building with clang to avoid dependency hell.
use_goma = false # Googlers only.
is_debug = false # Enable debugging features.
pdf_use_skia = false # Set true to enable experimental skia backend.
pdf_is_standalone = true # Set for a non-embedded build.
is_component_build = false # Disable component build (must be false)
clang_use_chrome_plugins = false # Currently must be false.
use_sysroot = false # Currently must be false on Linux.
pdf_enable_xfa = false # Set false to remove XFA support (implies JS support).
pdf_enable_v8 = false # Set false to remove Javascript support.
is_clang = false # Compile with gcc
ninja -C out/Lambda
If you run into issues with missing libs, look in BUILD.gn
, which will have been built, in the block starting with executable("pandafium")
. You may have to set libs = [ "/usr/lib64/libjpeg.a"]
.