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

bzip2 1.0.6-8838f21f8e build failure #12606

Closed
nanoric opened this issue Jul 28, 2020 · 4 comments · Fixed by #12569
Closed

bzip2 1.0.6-8838f21f8e build failure #12606

nanoric opened this issue Jul 28, 2020 · 4 comments · Fixed by #12569
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@nanoric
Copy link
Contributor

nanoric commented Jul 28, 2020

Host Environment

  • OS:: Docker, image: mcr.microsoft.com/windows/servercore:1809-amd64
  • Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x64 (Visual Studio 2019 Community)
  • vcpkg(git rev-parse HEAD): 458c20e94b9f558b523f187ce403bd062e131cdb

To Reproduce
Steps to reproduce the behavior:
vcpkg.exe install bzip2:x64-windows ( boost requires this )

Failure logs

Computing installation plan...
The following packages will be built and installed:
    bzip2[core]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: bzip2:x64-windows
Building package bzip2[core]:x64-windows...
Could not locate cached archive: C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives\5e\5e6ac1aaa01b56516e190c568eccc654d1dfbed8.zip

-- Using cached C:/vcpkg/downloads/bzip2-1.0.6.tar.gz
-- Cleaning sources at C:/vcpkg/buildtrees/bzip2/src/1.0.6-8838f21f8e.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vcpkg/downloads/bzip2-1.0.6.tar.gz
-- Applying patch fix-import-export-macros.patch
-- Applying patch fix-windows-include.patch
-- Using source at C:/vcpkg/buildtrees/bzip2/src/1.0.6-8838f21f8e.clean
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:279 (find_program):
  Could not find PKGCONFIG using the following names: pkg-config
Call Stack (most recent call first):
  ports/bzip2/portfile.cmake:51 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:79 (include)


Error: Building package bzip2:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: bzip2:x64-windows
  Vcpkg version: 2020.06.15-nohash

Additionally, attach any relevant sections from the log files above.

Additional context
Dockerfile:

FROM mcr.microsoft.com/windows/servercore:1809-amd64

# Choco
RUN powershell -ExecutionPolicy Unrestricted -Command $env:chocolateyUseWindowsCompression = 'true'; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Visual Studio 2019 Community
RUN mkdir C:\\TEMP
COPY ./vs_community__1592069024.1584505823.exe C:/TEMP
RUN C:/TEMP/vs_community__1592069024.1584505823.exe --quiet --wait --norestart --nocache \
    --add Microsoft.VisualStudio.Workload.NativeDesktop \
    --add Microsoft.VisualStudio.Component.VC.CLI.Support \
    --add Microsoft.VisualStudio.Component.VC.ATLMFC \
    --add Microsoft.VisualStudio.Component.VC.ATL \
	--add Microsoft.VisualStudio.Component.Windows10SDK.18362 \
    --add Microsoft.Component.VC.Runtime.UCRTSDK \
	--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64	\
 || IF "%ERRORLEVEL%"=="3010" EXIT 0
 
# Enable Proxy
COPY ./proxy C:/proxy
RUN C:/proxy/enable_global_proxy

# Msys2
RUN choco install -y --accept-license msys2 --params "/NoUpdate /InstallDir:C:/msys64" || exit 0
RUN cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *\
  && setx PATH "C:/msys64/usr/bin;%PATH%"
RUN pacman -S --noconfirm vim unzip nasm yasm

# Python3
RUN choco install -y --accept-license python3 --params "/InstallDir:C:\python3"\
  && cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *\
  && cp C:/python3/python.exe C:/python3/python3.exe


# Git
RUN choco install -y --accept-license git --params "/GitOnlyOnPath /NoShellIntegration /NoGuiHereIntegration /NoCredentialManager"\
  && cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *

# CMake
RUN choco install --force -y --accept-license cmake --installargs "ADD_CMAKE_TO_PATH=System DESKTOP_SHORTCUT_REQUESTED=0 ALLUSERS=1"\
  && cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *
  
# vcpkg dependency: 7z, nuget, powershell-core
RUN choco install --force -y --accept-license 7zip.install nuget.commandline powershell-core --packageparameters '"/CleanUpPath"' \
  && cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *\
  && setx PATH "c:\program files\7-zip\;%PATH%" 

# vcpkg
WORKDIR C:/
RUN git clone https://github.com/microsoft/vcpkg\
  && cd vcpkg\
  && bootstrap-vcpkg.bat\
  && vcpkg integrate install \
  && setx VCPKG_CMAKE_TOOLCHAIN_FILE C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
  && setx VCPKG_ROOT C:/vcpkg \
  && mkdir C:\vcpkg\downloads\ \
  && cd C:\vcpkg\downloads \
  && curl -sL https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip --output PowerShell-6.2.1-win-x86.zip \
  && curl -sL https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 --output  7-zip.commandline.18.1.0.nupkg\
  && curl -sL https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe --output nuget.exe

# common libs
WORKDIR C:/vcpkg
RUN vcpkg --triplet x64-windows install --clean-after-build\
    boost

RUN vcpkg --triplet x64-windows install --clean-after-build\
    openssl
	
RUN vcpkg --triplet x64-windows install --clean-after-build\
	spdlog
	
RUN vcpkg --triplet x64-windows install --clean-after-build\
	tbb yaml-cpp gtest range-v3 fmt date scnlib
	
RUN vcpkg --triplet x64-windows install --clean-after-build\
    --head cppzmq cli11

RUN C:/proxy/disable_global_proxy

# VC Redist
RUN choco install --force -y --accept-license vcredist2010 \
  && cd C:/Users/Administrator/AppData/Local/Temp\
  && del /S /Q *

##############################
# Finalize
WORKDIR C:/
ADD ./call_vcvars64.bat C:/

# some tools
COPY tools/ C:/tools
RUN setx PATH "C:/tools;%PATH%"

ENTRYPOINT ["CMD.exe", "/S", "/C", "call C:/call_vcvars64.bat && powershell.exe -NoLogo -ExecutionPolicy Bypass"]

CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

@PhoebeHui PhoebeHui self-assigned this Jul 28, 2020
@JackBoosY JackBoosY added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Jul 28, 2020
@PhoebeHui
Copy link
Contributor

@nanoric, PR #12569 would fix this issue, could you test if it works for you?

@JPTIZ
Copy link

JPTIZ commented Jul 28, 2020

@nanoric, PR #12569 would fix this issue, could you test if it works for you?

For me it seemed to fix the issue, but still can't build bzip2 (actually I'm building freetype, but it depends on bzip), with a different output (see this CI log).

@PhoebeHui
Copy link
Contributor

@JPTIZ, the second issue would be fixed by PR #12603, sorry for blocking you.

@JPTIZ
Copy link

JPTIZ commented Jul 28, 2020

@JPTIZ, the second issue would be fixed by PR #12603, sorry for blocking you.

Oh, nice to hear :) Well, for now I did a workaround by checking out a previous working commit and it seemed to work, so no worries, not being blocked right now (but still wanted to let you know about the issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants