Issue 855 in pdfium: Component Build Fails for Official Build

111 views
Skip to first unread message

ryan_wi… via monorail

unread,
Aug 10, 2017, 9:33:12 AM8/10/17
to pdfiu...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 855 by ryan_wi...@reyrey.com: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855

I am trying to build a pdfium release shared library for windows 32-bit using VS 2017. It builds if is_official_build is false, but fails if it is true.

args.gn:

pdf_is_standalone = true
is_component_build = true
is_official_build = true
treat_warnings_as_errors = false
is_debug = false
pdf_enable_xfa = false
pdf_enable_v8 = true
pdf_use_win32_gdi = true
icu_use_data_file = false
v8_use_external_startup_data = false
target_cpu = "x86"

ninja: Entering directory `out/Release'
[1/910] cmd /c D:/pdfium/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py delete-file ./genmacro.exe.pdb && D:/pdfium/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False link.exe /nologo /OUT:./genmacro.exe /PDB:./genmacro.exe.pdb @./genmacro.exe.rsp
FAILED: genmacro.exe genmacro.exe.pdb
cmd /c D:/pdfium/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py delete-file ./genmacro.exe.pdb && D:/pdfium/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False link.exe /nologo /OUT:./genmacro.exe /PDB:./genmacro.exe.pdb @./genmacro.exe.rsp
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
LINK : error LNK1218: warning treated as error; no output file generated
ninja: build stopped: subcommand failed.



--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

lic… via monorail

unread,
Aug 11, 2017, 8:59:40 AM8/11/17
to pdfiu...@googlegroups.com

Comment #1 on issue 855 by lic...@gmail.com: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c1

treat_warnings_as_errors = false


LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
LINK : error LNK1218: warning treated as error; no output file generated

Something doesn't add up here. First warning could be a problem the pdf_source_set template, try replacing it with static_library in BUILD.gn

ryan_wi… via monorail

unread,
Aug 11, 2017, 12:37:08 PM8/11/17
to pdfiu...@googlegroups.com

Comment #2 on issue 855 by ryan_wi...@reyrey.com: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c2

The issue was not with pdf_source_set. Changing those back to static_library had no impact. I was finally able to get to build by adding:
fatal_linker_warnings = false
I think this bug should still stay open though because we should not have to set treat_warnings_as_errors and fatal_linker_warnings to false for official component builds. What we need to do is add /INCREMENTAL:NO to these so that we don't get the warning in the first place.

thes… via monorail

unread,
May 17, 2018, 1:37:26 PM5/17/18
to pdfiu...@googlegroups.com

Comment #3 on issue 855 by the...@chromium.org: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c3

Whoops, this bug never got triaged. Is this still a problem?

thes… via monorail

unread,
Jul 6, 2018, 3:32:40 PM7/6/18
to pdfiu...@googlegroups.com

Comment #4 on issue 855 by the...@chromium.org: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c4

I suspect these two args are incompatible:


is_component_build = true
is_official_build = true

When I built it, the failure occurred in v8 code. So another workaround is to turn off v8.

ryan_wi… via monorail

unread,
Jul 25, 2018, 2:50:11 PM7/25/18
to pdfiu...@googlegroups.com

Comment #5 on issue 855 by ryan_wi...@reyrey.com: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c5

00334675c18a0203f313cceb670c970a77280f49 added support for building a shared library and was reverted in 7e805d1a6f3bf7ddd04b2c1ce857a2cf6d9ff873. I don't think it has been revisited, so it is no longer possible to test this.

thes… via monorail

unread,
Apr 21, 2020, 1:11:17 AM4/21/20
to pdfiu...@googlegroups.com
Updates:
Labels: Needs-Feedback

Comment #7 on issue 855 by the...@chromium.org: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c7

I think component builds should work now. Official + component builds work if pdf_enable_v8 is set to false. Can you verify this?

thes… via monorail

unread,
Apr 21, 2020, 1:11:59 AM4/21/20
to pdfiu...@googlegroups.com

Comment #8 on issue 855 by the...@chromium.org: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c8

Note, I tested with Clang and not MSVC.

thes… via monorail

unread,
Jun 18, 2020, 4:05:52 PM6/18/20
to pdfiu...@googlegroups.com
Updates:
Status: Archive

Comment #9 on issue 855 by the...@chromium.org: Component Build Fails for Official Build
https://bugs.chromium.org/p/pdfium/issues/detail?id=855#c9

Archiving since it's been a while without feedback.
Reply all
Reply to author
Forward
0 new messages