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

[folly] build successfully, but CMake project report error messages #13196

Closed
abratio opened this issue Aug 28, 2020 · 1 comment · Fixed by #13278
Closed

[folly] build successfully, but CMake project report error messages #13196

abratio opened this issue Aug 28, 2020 · 1 comment · Fixed by #13278
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@abratio
Copy link

abratio commented Aug 28, 2020

Host Environment

  • OS: Windows
  • Compiler: Visual Studio Community 2017

To Reproduce
Steps to reproduce the behavior:
./vcpkg install folly:x64-windows

Computing installation plan...
The following packages are already installed:
    folly[core,zlib]:x64-windows
Package folly:x64-windows is already installed

Total elapsed time: 330.3 us

The package folly:x64-windows provides CMake targets:

    find_package(folly CONFIG REQUIRED)
     target_link_libraries(main PRIVATE Folly::folly Folly::folly_deps Folly::follybenchmark Folly::folly_test_util)

CMakelists.txt:

cmake_minimum_required(VERSION 3.17)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_TOOLCHAIN_FILE "D:/bin/vcpkg-2017/scripts/buildsystems/vcpkg.cmake")
project(folly_example1)
set(CMAKE_PREFIX_PATH "D:/bin/vcpkg-2017/packages")
find_package(folly CONFIG REQUIRED)
include_directories(${INCLUDE_DIRECTORIES} ${folly_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE Folly::folly Folly::folly_deps Folly::follybenchmark Folly::folly_test_util)

Failure logs

[main] 正在配置文件夹: folly
[proc] 执行命令: "C:\Program Files (x86)\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Hd:/verify/folly -Bd:/verify/folly/build -G "Visual Studio 15 2017" -T host=x64 -A x64
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is MSVC 19.16.27043.0
[cmake] -- The CXX compiler identification is MSVC 19.16.27043.0
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
[cmake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - works
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
[cmake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - works
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Looking for pthread.h
[cmake] -- Looking for pthread.h - not found
[cmake] -- Found Threads: TRUE  
[cmake] -- Found folly: D:/bin/vcpkg-2017/packages/folly_x64-windows
[cmake] -- Configuring done
[cmake] CMake Error at D:/bin/vcpkg-2017/scripts/buildsystems/vcpkg.cmake:349 (_add_executable):
[cmake]   Target "folly_example1" links to target "ZLIB::ZLIB" but the target was not
[cmake]   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
[cmake]   an ALIAS target is missing?
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:10 (add_executable)
[cmake] 
[cmake] 
[cmake] CMake Error at D:/bin/vcpkg-2017/scripts/buildsystems/vcpkg.cmake:349 (_add_executable):
[cmake]   Target "folly_example1" links to target "ZLIB::ZLIB" but the target was not
[cmake]   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
[cmake]   an ALIAS target is missing?
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:10 (add_executable)
[cmake] 
[cmake] 
[cmake] CMake Error at D:/bin/vcpkg-2017/scripts/buildsystems/vcpkg.cmake:349 (_add_executable):
[cmake]   Target "folly_example1" links to target "ZLIB::ZLIB" but the target was not
[cmake]   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
[cmake]   an ALIAS target is missing?
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:10 (add_executable)
[cmake] 
[cmake] 
[cmake] CMake Error at D:/bin/vcpkg-2017/scripts/buildsystems/vcpkg.cmake:349 (_add_executable):
[cmake]   Target "folly_example1" links to target "ZLIB::ZLIB" but the target was not
[cmake]   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
[cmake]   an ALIAS target is missing?
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:10 (add_executable)
[cmake] 
[cmake] 
[cmake] -- Generating done
[cmake] CMake Generate step failed.  Build files cannot be regenerated correctly

Additional context
git log of my vcpkg:
99212d6 - (HEAD -> master, origin/master, origin/HEAD) [clapack] Ignore check of lapack:x64-osx in the baseline (#13148)

@JackBoosY JackBoosY self-assigned this Aug 28, 2020
@JackBoosY
Copy link
Contributor

Confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants