Skip to content
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

Build fails on Windows 10 #11

Open
Dessyreqt opened this issue Oct 24, 2023 · 5 comments
Open

Build fails on Windows 10 #11

Dessyreqt opened this issue Oct 24, 2023 · 5 comments

Comments

@Dessyreqt
Copy link

Everything seems to check out fine then when it goes to build the CMake file, it fails. See the output below. Are there external dependencies that I'm missing here?

D:\github\eddex\aseprite-windows-docker-build\deps\skia\aseprite\build>cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=C:\deps\skia -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib -G Ninja ..
CMake Deprecation Warning at CMakeLists.txt:17 (cmake_policy):
  The OLD behavior for policy CMP0046 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:32 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:32 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

D:\github\eddex\aseprite-windows-docker-build\deps\skia\aseprite\build>ninja aseprite
ninja: error: loading 'build.ninja': The system cannot find the file specified.
@eddex
Copy link
Owner

eddex commented Oct 25, 2023

It looks like you're not using Docker but are running the script on your local machine, correct?

In that case you also need to install the Ninja build system manually, you can get it here: https://github.com/ninja-build/ninja/releases

I removed the download and installation of Ninja from the script, because Ninja is already included in the base Docker image used in the Dockerfile.

In any case, I would recommend you to use Docker if you want to use this repository, otherwise you might want to follow the steps in the official installation guide: https://github.com/aseprite/aseprite/blob/main/INSTALL.md

@Dessyreqt
Copy link
Author

That is user error, I actually already have ninja on my system from having built Aseprite a couple of years ago but it is no longer working with the current version. In any case I meant to run start.bat and not build.bat.

Running start.bat consistently gives this output:

C:\deps\skia>call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=x64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.3.1
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
"build aseprite"
Cloning into 'aseprite'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 5308 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
The system cannot find the path specified.
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
A subdirectory or file build already exists.
CMake Warning:
  Ignoring extra path from command line:

   ".."


CMake Error: The source directory "C:/" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
ninja: error: loading 'build.ninja': The system cannot find the file specified.

The command 'cmd /S /C C:\build.bat' returned a non-zero code: 1
Copy Aseprite from Docker container
Unable to find image 'eddex/aseprite:latest' locally
docker: Error response from daemon: pull access denied for eddex/aseprite, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Error response from daemon: No such container: aseprite
Error response from daemon: No such container: aseprite
Error response from daemon: No such container: aseprite
Done

Not sure if I have something misconfigured, I'm using Windows containers in Docker, I don't know if there is other configuration I didn't setup properly.

@eddex
Copy link
Owner

eddex commented Oct 25, 2023

The error suggests that there was an issue when cloning the aseprite git repository

error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 5308 bytes of body are still expected

When looking for this issue, I found this stackoverflow question: https://stackoverflow.com/questions/46232906/git-clone-error-rpc-failed-curl-56-openssl-ssl-read-ssl-error-syscall-errno

Apparently this error can happen if you have a slow internet connection. Other answers suggest that you might need to change your git config to increase the http.postBuffer. You can try to add git config --global http.postBuffer 524288000 after line 13 in build.bat and see if this helps.

@Dessyreqt
Copy link
Author

It's definitely not a slow connection, unless gigabit symmetrical has been massively obsoleted... I updated the build.bat as you've suggested, and here is the output starting from the first error:

Cloning into 'C:/aseprite/third_party/harfbuzz'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 7486 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/harfbuzz.git' into submodule path 'C:/aseprite/third_party/harfbuzz' failed
Failed to clone 'third_party/harfbuzz'. Retry scheduled
Cloning into 'C:/aseprite/third_party/json11'...
Cloning into 'C:/aseprite/third_party/libarchive'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 8193 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/libarchive.git' into submodule path 'C:/aseprite/third_party/libarchive' failed
Failed to clone 'third_party/libarchive'. Retry scheduled
Cloning into 'C:/aseprite/third_party/libpng'...
Cloning into 'C:/aseprite/third_party/libwebp'...
Cloning into 'C:/aseprite/third_party/lua'...
Cloning into 'C:/aseprite/third_party/pixman'...
Cloning into 'C:/aseprite/third_party/qoi'...
Cloning into 'C:/aseprite/third_party/simpleini'...
Cloning into 'C:/aseprite/third_party/tinyexpr'...
Cloning into 'C:/aseprite/third_party/zlib'...
Cloning into 'C:/aseprite/third_party/harfbuzz'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 7606 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/harfbuzz.git' into submodule path 'C:/aseprite/third_party/harfbuzz' failed
Failed to clone 'third_party/harfbuzz' a second time, aborting
Already up to date.
warning: unable to rmdir 'src/psd': Directory not empty
warning: unable to rmdir 'third_party/cityhash': Directory not empty
warning: unable to rmdir 'third_party/qoi': Directory not empty
M       laf
M       src/clip
M       src/flic
M       src/observable
M       src/tga
M       src/undo
M       third_party/IXWebSocket
M       third_party/benchmark
M       third_party/cmark
M       third_party/curl
M       third_party/fmt
M       third_party/freetype2
M       third_party/giflib
M       third_party/json11
M       third_party/libpng
M       third_party/libwebp
M       third_party/lua
M       third_party/pixman
M       third_party/simpleini
M       third_party/tinyexpr
M       third_party/zlib
Note: switching to 'v1.2.40'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c0a872ee5 Update laf submodule to fix #3433
Cloning into 'C:/aseprite/third_party/harfbuzz'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 8034 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/harfbuzz.git' into submodule path 'C:/aseprite/third_party/harfbuzz' failed
Failed to clone 'third_party/harfbuzz'. Retry scheduled
Cloning into 'C:/aseprite/third_party/libarchive'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 7181 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/libarchive.git' into submodule path 'C:/aseprite/third_party/libarchive' failed
Failed to clone 'third_party/libarchive'. Retry scheduled
Cloning into 'C:/aseprite/third_party/harfbuzz'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 2055 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/aseprite/harfbuzz.git' into submodule path 'C:/aseprite/third_party/harfbuzz' failed
Failed to clone 'third_party/harfbuzz' a second time, aborting
CMake Deprecation Warning at CMakeLists.txt:17 (cmake_policy):
  The OLD behavior for policy CMP0046 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is MSVC 19.33.31629.0
-- The CXX compiler identification is MSVC 19.33.31629.0
CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/CMakeRCInformation.cmake:27 (include):
  include could not find requested file:

    C:/aseprite/laf/cmake/c_flag_overrides.cmake
Call Stack (most recent call first):
  C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/Platform/Windows-MSVC.cmake:496 (enable_language)
  C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/Platform/Windows-MSVC.cmake:474 (__windows_compiler_msvc_enable_rc)
  C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/Platform/Windows-MSVC-C.cmake:5 (__windows_compiler_msvc)
  C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/CMakeCInformation.cmake:48 (include)
  CMakeLists.txt:32 (project)


-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.23/Modules/CMakeCXXInformation.cmake:89 (include):
  include could not find requested file:

    C:/aseprite/laf/cmake/cxx_flag_overrides.cmake
Call Stack (most recent call first):
  CMakeLists.txt:32 (project)


-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:36 (message):
  Your Aseprite repository is incomplete, initialize submodules using:

    git submodule update --init --recursive


-- Configuring incomplete, errors occurred!
See also "C:/aseprite/build/CMakeFiles/CMakeOutput.log".
ninja: error: loading 'build.ninja': The system cannot find the file specified.

The command 'cmd /S /C C:\build.bat' returned a non-zero code: 1
Copy Aseprite from Docker container
Unable to find image 'eddex/aseprite:latest' locally
docker: Error response from daemon: pull access denied for eddex/aseprite, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Error response from daemon: No such container: aseprite
Error response from daemon: No such container: aseprite
Error response from daemon: No such container: aseprite
Done

Still getting curl errors... and across multiple runs it seems to always start with the third_party/harfbuzz submodule. Any thoughts? I appreciate the time spent looking into this.

@eddex
Copy link
Owner

eddex commented Oct 26, 2023

Looks like it already got a bit further this time. I never had this issue myself and therefore can't reproduce it, but here are some more suggestions from the stackoverflow post.

  1. Try to set config --global core.compression 0 (as suggested by this answer)
    You can do this right after the git config --global http.postBuffer 524288000 command in build.bat
  2. Try to connect to a VPN or disconnect from your VPN if you're using one (as suggested by this answer)
  3. Set git config --global http.sslVerify "false" (as suggested by this answer)
    Again place the command after the others in build.bat
  4. If this doesn't help, we can try to clone using SSH instead. I'll need some time to set this up and test it, will get back to you later.

Let me know if any of the suggestions helped :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants