paulocoutinhox / pdfium-lib

PDFium - Project to compile PDFium library to multiple platforms.

Home Page:https://pdfviewer.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build for iOS but failed

PeipeiQ opened this issue · comments

when I run python3 make.py run build-ios. The error throws:
"""

Validating data...
Building libraries...
Generating files to arch "arm" and configuration "release"...
ERROR at //build/config/ios/rules.gni:982:1: Unexpected token '}'
}
^
See //BUILD.gn:312:1: whence it was called.
test("pdfium_embeddertests") {
^-----------------------------
Traceback (most recent call last):
File "/Users/qiupei/bytedance/pdfium-lib/make.py", line 243, in
main(args)
File "/Users/qiupei/bytedance/pdfium-lib/make.py", line 118, in main
ios.run_task_build()
File "/Users/qiupei/bytedance/pdfium-lib/modules/ios.py", line 310, in run_task_build
check_call(command, shell=True)
File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'gn gen out/ios-arm-release --args='target_os="ios" target_cpu="arm" use_goma=false is_debug=false pdf_use_skia=false pdf_use_skia_paths=false pdf_enable_xfa=false pdf_enable_v8=false is_component_build=false clang_use_chrome_plugins=false pdf_is_standalone=false ios_deployment_target="9.0" ios_enable_code_signing=false use_xcode_clang=true pdf_is_complete_lib=true enable_ios_bitcode=true arm_use_neon=false symbol_level=0'' returned non-zero exit status 1.
"""
How can I resolved it?

Hi,

Do you execute patch method before?

What is the sequence of command that you executed?

Thanks.

Yes, I have executed 'python3 make.py run patch-ios'. But show
"""

Validating data...
Patching...
Skipped: Build GN
Skipped: Deprecated Warning
Skipped: Lib JPEG
Skipped: iOS Automatically Manage Certs
Skipped: Compiler
Skipped: Carbon
Skipped: Carbon - Font
Applied: iOS Simulator
Skipped: 32bits constexpr
Skipped: ARM Neon
Skipped: Core FXGE

FINISHED!
"""

Hi,

I think that you have a different version of pdfium git hash (https://github.com/paulo-coutinho/pdfium-lib/blob/master/modules/config.py#L9).

Because the patch is for a specific version.

Based on your log you can see a problem that all patches was applied, but "iOS Simulator" the script is trying patch again.

Your problem is in file "BUILD.gn", that was patched in wrong line, because this it isn't parsed by ninja tool.

I recommend you delete "build" folder and try all again, but save all output data and paste here.

Hi,

I made a new release with some fixes. Can you try?

If the problem still, reopen pls.

Thanks.

The newest release works! Thanks