New issue
Advanced search Search tips

Issue 784165 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug


Participants' hotlists:
Hotlist-1


Sign in to add a comment

Error in building pdfium as standalone

Reported by illusionist.neo@gmail.com, Nov 12 2017

Issue description

Chrome Version (from the about:version page): pdfium commit 9fa5036245c34ce8c420531c5b02e699a861bc18
Is this the most recent version: yes
OS + version: Ubuntu 16.04
CPU architecture (32-bit / 64-bit): 64-bit
Window manager: NONE
URLs (if relevant): NONE
Behavior in Linux Firefox: NONE
Behavior in Windows Chrome (if you have access to it): NONE

What steps will reproduce the problem?
(1) Sync the latest third_party/pdfium tree
(2) run gn args out/pdfium with following arguments

is_debug = true
pdf_use_skia = true
pdf_use_skia_paths = false
pdf_enable_xfa = true  # Set false to remove XFA support (implies JS support).
pdf_enable_v8 = true  # Set false to remove Javascript support.
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.

(3) Error is thrown. Build configs are returned with error.

What is the expected result?

No Error with building configs.

What happens instead?

This will give the following error.

Waiting for editor on "/home/user/chromium/src/out/pdfium/args.gn"...
Generating files...
ERROR at //third_party/pdfium/BUILD.gn:2119:7: Can't load input file.
      "//samples",
      ^----------
Unable to load:
  /home/user/chromium/src/samples/BUILD.gn
I also checked in the secondary tree for:
  /home/user/chromium/src/build/secondary/samples/BUILD.gn

Another error given after correcting the above issue:

Waiting for editor on "/home/user/chromium/src/out/pdfium/args.gn"...
Generating files...
ERROR Unresolved dependencies.
//third_party/pdfium:fuzzers(//build/toolchain/linux:clang_x64)
  needs //testing/libfuzzer:libfuzzer(//build/toolchain/linux:clang_x64)


Thanks.
 
I already have the patch to fix it. I would like to submit it as soon as you guys mark is bug.

Thanks.
Components: Internals>Plugins>PDF
Owner: dsinclair@chromium.org
Dan, can you take a look at this? I am not able to reproduce it myself, but I am not sure I am doing it correctly.
The existence of "//third_party/pdfium" means this is likely not a standalone PDFium checkout. Please check the instructions for how to make a standalone PDFium checkout properly:

https://pdfium.googlesource.com/pdfium/+/master/README.md#get-the-code
Its not a standard pdfium checkout. If you looks at the paths in the error I posted "/home/user/chromium/src", I synched the chromium.

I tried to generate build file for pdfium with `gn args out/pdfium` from chromium root folder.

As far as I can see, this problem is related to relative paths. If you look at the first error, "//samples" is not present, which is correct, it's not present in the root chromium directory, but in sub directory third_party/pdfium. So, I think, "//samples" should be just "samples".
Can you first explain what you want to do exactly? Why do you want to set pdf_is_standalone = true in a non-standalone checkout in the first place?

The intended use of the pdf_is_standalone GN variable is:

1) If you have a standalone PDFium checkout, you can optionally set it to true to build the samples.
2) If you don't have a standalone PDFium checkout, then leave it set to false. (Since embedders care primarily about using libpdf.a in their application, and not so much about the sample applications that are part of PDFium.)
Ok. I think that sounds reasonable. Thanks!!!
So can we close the bugs as WontFix? Or is there something else we can do here to improve?
I think we can close this bug. Thanks for the help. Much appreciated. 
Status: WontFix (was: Unconfirmed)
Sure thing.

Sign in to add a comment