4paradigm / OpenMLDB

OpenMLDB is an open-source machine learning database that provides a feature platform computing consistent features for training and inference.
https://openmldb.ai
Apache License 2.0
1.59k stars 321 forks source link

glog patch failed when BUILD_SHARED_LIBS #3857

Closed vagetablechicken closed 7 months ago

vagetablechicken commented 7 months ago

If the patch failed in glog cmakelists when BUILD_SHARED_LIBS=ON, it report:

CMake Error: install(EXPORT "glog-targets" ...) includes target "glog" which requires target "gflags_nothreads_shared" that is not in any export set.
CMake Error in contrib/glog/CMakeLists.txt:
  export called with target "glog" which requires target
  "gflags_nothreads_shared" that is not in this export set, but in multiple
  other export sets:
  /xxx/OpenMLDB2/build/contrib/gflags/gflags-nonamespace-targets.cmake,
  /xxx/OpenMLDB2/build/contrib/gflags/gflags-targets.cmake.

  An exported target cannot depend upon another target which is exported
  multiple times.  Consider consolidating the exports of the
  "gflags_nothreads_shared" target to a single export.

It's not the dup targets in contrib/gflags, the root cause is glog origin cmake will find the gflags in .deps, then be dup with contrib/glfags.