Navigation Menu

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

Dependency too heavy #14603

Closed
playgithub opened this issue Nov 17, 2020 · 3 comments
Closed

Dependency too heavy #14603

playgithub opened this issue Nov 17, 2020 · 3 comments
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@playgithub
Copy link
Contributor

playgithub commented Nov 17, 2020

I'm trying to port poppler
It depends on clang-format
vcpkg install llvm[clang-tools-extra]
clang-format is small, but for dependencies, it builds for hours

λ vcpkg install llvm[clang-tools-extra]
Computing installation plan...
The following packages will be built and installed:
    llvm[clang,clang-tools-extra,core,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,target-x86,tools]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: llvm:x64-windows
Building package llvm[clang,clang-tools-extra,core,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,target-x86,tools]:x64-windows...
Could not locate cached archive: 
%localappdata%\vcpkg\archives\4c\4c9803c9697ac545a97a8cbb5bbe8485f2c767d2.zip
-- Note: llvm only supports static library linkage. Building static library.
-- Downloading https://github.com/llvm/llvm-project/archive/llvmorg-10.0.0.tar.gz...
-- Extracting source /vcpkg-root/downloads/llvm-llvm-project-llvmorg-10.0.0.tar.gz
-- Applying patch 0001-allow-to-use-commas.patch
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0003-fix-vs2019-v16.6.patch
-- Applying patch 0004-fix-dr-1734.patch
-- Applying patch 0005-fix-tools-path.patch
-- Using source at /vcpkg-root/buildtrees/llvm/src/org-10.0.0-cfac4b4b0f.clean
-- Downloading https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-amd64.zip...
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel

Installed successfully, vcpkg-root\buildtrees\llvm takes 102GB (109,870,017,874 bytes) 😭

Something like vcpkg-root\downloads\tools is better in the case, i.e. simply download clang-foramt.exe as a tool.

@NancyLi1013 NancyLi1013 added the category:question This issue is a question label Nov 17, 2020
@JackBoosY
Copy link
Contributor

Sorry for that but we hope that all binaries will be built, which also matches the behavior of open source.

@playgithub
Copy link
Contributor Author

playgithub commented Nov 17, 2020

Give a hint warning about the size is helpful.
Then I might choose to download LLVM clang installer (172MB) from the official site, and make clang-format be in PATH.

@JackBoosY JackBoosY reopened this Nov 27, 2020
@JackBoosY JackBoosY added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly and removed category:question This issue is a question labels Nov 27, 2020
@JackBoosY
Copy link
Contributor

elseif(VAR MATCHES "CLANG")
set(PROGNAME clang)
set(SUBDIR "clang-10.0.0")
if(CMAKE_HOST_WIN32)
set(PATHS
# Support LLVM in Visual Studio 2019
"$ENV{LLVMInstallDir}/x64/bin"
"$ENV{LLVMInstallDir}/bin"
"$ENV{VCINSTALLDIR}/Tools/Llvm/x64/bin"
"$ENV{VCINSTALLDIR}/Tools/Llvm/bin"
"${DOWNLOADS}/tools/${SUBDIR}-windows/bin"
"${DOWNLOADS}/tools/clang/${SUBDIR}/bin")
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITEW6432})
else()
set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITECTURE})
endif()
if(HOST_ARCH_ MATCHES "64")
set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe")
set(ARCHIVE "LLVM-10.0.0-win64.7z.exe")
set(HASH 3603a4be3548dabc7dda94f3ed4384daf8a94337e44ee62c0d54776c79f802b0cb98fc106e902409942e841c39bc672cc6d61153737ad1cc386b609ef25db71c)
else()
set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win32.exe")
set(ARCHIVE "LLVM-10.0.0-win32.7z.exe")
set(HASH 8494922b744ca0dc8d075a1d3a35a0db5a9287544afd5c4984fa328bc26f291209f6030175896b4895019126f5832045e06d8ad48072b549916df29a2228348b)
endif()
endif()
set(BREW_PACKAGE_NAME "llvm")
set(APT_PACKAGE_NAME "clang")

We can refer to clang to find clang-format.

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

No branches or pull requests

3 participants