-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build native_pdf_view for windows #289
Comments
The build appears to be failing because it can't download: https://github.com/bblanchon/pdfium-binaries/releases/download/chromium/4638/pdfium-windows-x64.zip Which version do you have set in CMakeLists.txt? We're using:
Side note.. is it possible to update to the latest version? |
For me Changing The CmakeLists.txt helped just change from: to: and the run flutter clean |
which pdfx version do you use? I am using pdfx: ^2.0.1+2 and pdf: ^3.8.0 changing my pfdium version doesnt help and it tried several versions maybe I overlook something [ +62 ms] executing: [D:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H |
fixed by using version 4874 and placing the set pdfium to the start of the cmakelists.txt. set(PDFIUM_VERSION "4874" CACHE STRING "") |
'flutter build windows -v' fails with output:
[ +6 ms] Building Windows application...
[ +16 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S
C:\Users\Art Navsegda\Documents\GitHub\flutternavsegda\charts\windows -B build\windows -G Visual Studio 17 2022
[ +54 ms] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
[+1178 ms] -- The CXX compiler identification is MSVC 19.31.31106.2
[ +55 ms] -- Detecting CXX compiler ABI info
[ +693 ms] -- Detecting CXX compiler ABI info - done
[ +2 ms] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe -
skipped
[ ] -- Detecting CXX compile features
[ +1 ms] -- Detecting CXX compile features - done
[ +16 ms] -- Downloading/updating pdfium
[ +33 ms] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
[ +410 ms] -- Configuring done
[ +41 ms] -- Generating done
[ +9 ms] -- Build files have been written to: C:/Users/Art Navsegda/Documents/GitHub/flutternavsegda/charts/build/windows/pdfium-download
[ +92 ms] Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
[ ] Copyright (C) Microsoft Corporation. All rights reserved.
[ +295 ms] Checking Build System
[ +134 ms] Creating directories for 'pdfium-download'
[ +134 ms] Building Custom Rule C:/Users/Art Navsegda/Documents/GitHub/flutternavsegda/charts/build/windows/pdfium-download/CMakeLists.txt
[ +23 ms] Performing download step (download, verify and extract) for 'pdfium-download'
[ +17 ms] -- Downloading...
[ ] dst='C:/Users/Art
Navsegda/Documents/GitHub/flutternavsegda/charts/build/windows/pdfium-download/pdfium-download-prefix/src/pdfium-windows-x64.zip'
[ +1 ms] timeout='none'
[ ] inactivity timeout='none'
[ ] -- Using src='https://github.com/bblanchon/pdfium-binaries/releases/download/chromium/4638/pdfium-windows-x64.zip'
[ +166 ms] CMake Error at pdfium-download/pdfium-download-prefix/src/pdfium-download-stamp/download-pdfium-download.cmake:170 (message):
[ ] Each download failed!
[ +5 ms] CUSTOMBUILD : error : downloading 'https://github.com/bblanchon/pdfium-binaries/releases/download/chromium/4638/pdfium-windows-x64.zip'
failed [C:\Users\Art Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\pdfium-download.vcxproj]
[ ] status_code: 22
[ ] status_string: "HTTP response code said error"
[ ] log:
[ ] --- LOG BEGIN ---
[ ] timeout on name lookup is not supported
[ ] Trying 140.82.121.4:443...
[ ] Connected to github.com (140.82.121.4) port 443 (#0)
[ ] schannel: disabled automatic use of client certificate
[ ] schannel: ALPN, offering h2
[ ] schannel: ALPN, offering http/1.1
[ ] schannel: ALPN, server accepted to use h2
[ ] Using HTTP2, server supports multiplexing
[ ] Connection state changed (HTTP/2 confirmed)
[ ] Copying HTTP/2 data in stream buffer to connection buffer after upgrade:
[ ] len=0
[ ] Using Stream ID: 1 (easy handle 0x2335c537470)
[ ] GET
[ ] /bblanchon/pdfium-binaries/releases/download/chromium/4638/pdfium-windows-x64.zip
[ ] HTTP/2
[ ] Host: github.com
[ ] user-agent: curl/7.79.1
[ ] accept: /
[ ] HTTP/2 404
[ ] server: GitHub.com
[ ] date: Thu, 14 Apr 2022 12:26:48 GMT
[ ] content-type: text/plain; charset=utf-8
[ ] vary: X-PJAX, X-PJAX-Container, Accept-Encoding, Accept, X-Requested-With
[ ] permissions-policy: interest-cohort=()
[ ] cache-control: no-cache
[ ] strict-transport-security: max-age=31536000; includeSubdomains; preload
[ ] x-frame-options: deny
[ ] x-content-type-options: nosniff
[ ] x-xss-protection: 0
[ ] referrer-policy: no-referrer-when-downgrade
[ ] expect-ct: max-age=2592000,
[ ] report-uri="https://api.github.com/_private/browser/errors"
[ ] content-security-policy: default-src 'none'; base-uri 'self'; connect-src
[ ] 'self'; form-action 'self'; img-src 'self' data:; script-src 'self';
[ ] style-src 'unsafe-inline'
[ ] content-length: 9
[ ] x-github-request-id: CA82:80C2:BBF1:F3DD9:62581327
[ ] CUSTOMBUILD : The requested URL returned error : 404 [C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\pdfium-download.vcxproj]
[ ] stopped the pause stream!
[ ] Connection #0 to host github.com left intact
[ ] --- LOG END ---
[ ] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(245,5): error MSB8066: Custom
build for 'C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-mkdir.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-download.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-update.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-patch.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-configure.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-build.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-install.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\b52f9704fe387c0820be772237b3767d\pdfium-download-test.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\7b6ce0ad031778709e3a1066c14d5717\pdfium-download-complete.rule;C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeFiles\eea0765083cbb54ee3c1c0701ce13824\pdfium-download.rule;C:\Users\Art Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\CMakeLists.txt' exited with code 1. [C:\Users\Art
Navsegda\Documents\GitHub\flutternavsegda\charts\build\windows\pdfium-download\pdfium-download.vcxproj]
[ +27 ms] CMake Error at flutter/ephemeral/.plugin_symlinks/pdfx/windows/DownloadProject.cmake:179 (message):
[ +2 ms] Build step for pdfium failed: 1
[ ] Call Stack (most recent call first):
[ ] flutter/ephemeral/.plugin_symlinks/pdfx/windows/CMakeLists.txt:16 (download_project)
[ ] -- Configuring incomplete, errors occurred!
[ ] See also "C:/Users/Art Navsegda/Documents/GitHub/flutternavsegda/charts/build/windows/CMakeFiles/CMakeOutput.log".
[ +12 ms] Building Windows application... (completed in 3.4s)
[ +1 ms] "flutter windows" took 3,945ms.
[ +3 ms] Unable to generate build files
[ +1 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _runCmakeGeneration (package:flutter_tools/src/windows/build_windows.dart:272:5)
#2 buildWindows (package:flutter_tools/src/windows/build_windows.dart:71:5)
#3 BuildWindowsCommand.runCommand (package:flutter_tools/src/commands/build_windows.dart:57:5)
#4 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
#5 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#6 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
#7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
#8 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#9 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
#10 run.. (package:flutter_tools/runner.dart:62:9)
#11 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#12 main (package:flutter_tools/executable.dart:94:3)
[ +15 ms] ensureAnalyticsSent: 11ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ +1 ms] exiting with code 1
PS C:\Users\Art Navsegda\Documents\GitHub\flutternavsegda\charts> open C:/Users/Art Navsegda/Documents/GitHub/flutternavsegda/charts/build/windows/CMakeFiles/CMakeOutput.log
open : The term 'open' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
'flutter doctor -v' output is:
flutter doctor -v
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.22000.613], locale en-US)
• Flutter version 2.10.4 at C:\tools\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c860cba910 (3 weeks ago), 2022-03-25 00:23:12 -0500
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\Art Navsegda\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
• All Android licenses accepted.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.1.32407.343
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
[√] VS Code (version 1.66.2)
• VS Code at C:\Users\Art Navsegda\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.38.1
[√] Connected device (1 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.613]
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
The text was updated successfully, but these errors were encountered: