Skip to content

v2023.11.13.00

tagged this 11 Nov 01:06
Summary:
When gflags is installed on the system the edencommon getdeps build fails with

```
ninja: error: 'gflags-NOTFOUND', needed by 'eden/common/utils/test/process_info_cache_test', missing and no known rule to make it
```

There is more context above the error:
```
  IMPORTED_LOCATION not set for imported target "gflags" configuration
  "RelWithDebInfo".
```

So the issue is that IMPORTED_LOCATION is not set for gflags. We do explicitly
set IMPORTED_LOCATION in certain cases in FindGflags:
https://github.com/facebook/folly/blob/main/build/fbcode_builder/CMake/FindGflags.cmake#L102

I see in the log that gflags get's found twice:

```
-- Found gflags from package config /usr/lib64/cmake/gflags/gflags-config.cmake
-- Found Glog: /usr/lib64/libglog.so
-- Found gflags as a dependency of glog::glog, include=/usr/include, libs=gflags
```

I think the gflags found as a dep of glog maybe doesn't trigger
IMPORTED_LOCATION to be set correctly. Not really sure why. But flipping the
order of the imports seems to unbreak the build. For now that will do to
unblock.

fixes #1163

Reviewed By: chadaustin

Differential Revision: D51220413

fbshipit-source-id: 682dd2fba8d6993c5936b141a8a0e488b03e6cfd
Assets 2