folly icon indicating copy to clipboard operation
folly copied to clipboard

Build error: Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path

Open GOGOYAO opened this issue 1 year ago • 3 comments

Folly code commit is 8c52d79a616f7a89095d3121a7f02394c16c0848 OS is centos 7 gcc 11 my build cmd is sh -x build.sh --extra-cmake-defines='{"CMAKE_PREFIX_PATH":"/usr/include/openssl11", "BUILD_TESTS":"OFF"}' --scratch-path=./bld

Error is

- Configuring done
CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/boost-dYTWiC-P_8TroztsD1CcKTQP7UEUu-4FFJPlq_P3wd8/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/double-conversion-mlR3kATdUFVlaQGXqxfwO2f9tIhjDUHu7wJ4uY605Yc/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/gflags-a31EIfkUqpauiMmBuKDGBFIcLb-KOKIc910d_cxvnGg/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/glog-PLNKLQyYKMODi8qWlOWkApq6gB8NSBxfUbh6vhJ0sxY/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/libevent-r02TC_M7LMX_BG4N0OeoNkPcGknvpDhuVBZTvVF_vSs/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/xz-BUEKyKB8vQPWKIxnIjuJJY15mquzqJUwfza7KMSt-Zo/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/lz4-F2P7UKtQ0x0-7lLTqq_a25THAxHUi-v8DOxhG6f91Sc/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/zstd-el5fAHsBIlJR6KiPZb7Q5E1E_in-oJCP7OYWIkw6hr8/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/snappy-2GtH2Chx7CxgR6DFNh4u2BdSy1zRU0fewBtQnQ3aNcc/include"

  which is prefixed in the source directory.


CMake Error in CMakeLists.txt:
  Target "folly_deps" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/root/workspace/folly/bld/installed/libsodium-X0RtyFKYDgIkaRO_A_SpLQfv00jmIi6gklNaUBCDQE8/include"

  which is prefixed in the source directory.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Command '['/root/workspace/folly/bld/installed/cmake-7Hah9IE55sGi2nFPVmunqf4TjSFiJiAbeVHlur-Xir8/bin/cmake', '/root/workspace/folly', '-DCMAKE_INSTALL_PREFIX=/root/workspace/folly/bld/installed/folly', '-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache', '-DBOOST_LINK_STATIC=ON', '-DBUILD_TESTS=OFF', '-DBUILD_BENCHMARKS=OFF', '-DCMAKE_PREFIX_PATH=/usr/include/openssl11', '-G', 'Ninja']' returned non-zero exit status 1.

GOGOYAO avatar Apr 20 '23 08:04 GOGOYAO

u can put set(CMAKE_INCLUDE_PATH XXXXXXX) set(CMAKE_LIBRARY_PATH XXXXXXXX) before code of " include(folly-deps) " in the folly`s cmakelist.txt

the XXXXXX is your folder of "include" and "lib"

snowattitude avatar Jul 26 '23 02:07 snowattitude

Maybe this can help.

https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source

I met the same problem when I build folly with bazel rules_foreign_cc. After commented out the following part, the error disappeared.

#install(
#  EXPORT folly
#  DESTINATION ${CMAKE_INSTALL_DIR}
#  NAMESPACE Folly::
#  FILE folly-targets.cmake
#  COMPONENT dev
#)

zhaoyulong avatar May 23 '24 03:05 zhaoyulong