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

[MSVC] Download curl will hang when building TarsCpp #241

Open
QuellaZhang opened this issue Jun 6, 2022 · 2 comments
Open

[MSVC] Download curl will hang when building TarsCpp #241

QuellaZhang opened this issue Jun 6, 2022 · 2 comments

Comments

@QuellaZhang
Copy link
Contributor

Download curl will hang when building TarsCpp on MSVC and we've had this issue a few times recently, it's an unstable and reproducible issue. I'm not sure if this is TarsCpp's problem or CMake's problem (I can confirm that we haven't upgraded CMake recently).

Environment:
cmake version 3.22.0
VS2019 16.11.11
OS: windows server 2019
TarsCpp version: 4b9042c

Repro steps:

  1. Open VS2019 x86 native tools command
  2. Save the following steps to build.cmd and execute it
  3. I see it hang about build TarsCpp for 10 times
set /A count=0

:while
set /A count+=1
echo %count%
call :build
if %ERRORLEVEL% NEQ 0 (exit /b 1001) else (
    goto :while
)

:build
pushd F:\gitP\TarsCloud\TarsCpp
git rev-parse --git-dir
git clean -xdf
git fetch --recurse-submodules=no --force
git reset --hard 4b9042c
git remote prune origin
git submodule sync
git submodule foreach git reset --hard
git submodule foreach git clean -xdf
git submodule update --init --recursive

mkdir F:\gitP\TarsCloud\TarsCpp\build_x86
cd F:\gitP\TarsCloud\TarsCpp\build_x86
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 ..
msbuild /m /p:Platform=Win32 /p:Configuration=Release tars-cpp.sln /t:Rebuild > build.log

Error:
-- Downloading...
dst='F:/gitP/TarsCloud/TarsCpp/download/curl-7.69.1.tar.gz'
timeout='none'
inactivity timeout='none'
-- Using src='http://cdn.tarsyun.com/src/curl-7.69.1.tar.gz'
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
-- [download 3% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 6% complete]
-- [download 7% complete]
-- [download 8% complete]
-- [download 9% complete]
-- [download 10% complete]
-- [download 11% complete]

Hang for hours until it timeout.

@ruanshudong
Copy link
Contributor

It seems to be a cmake bug on Windows platform. Can you try another version?

@QuellaZhang
Copy link
Contributor Author

QuellaZhang commented Nov 15, 2022

@ruanshudong We have finally updated the version of CMake recently, but this issue still exists. I had this problem after building TarsCpp 3 times in a loop.

F:>cmake --version
cmake version 3.24.3

image

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