Open h-vetinari opened 4 months ago
Or perhaps our generated export.h
(not part of the sources) does not correctly define GLOG_EXPORT
?
Also, the problem does not appear on windows.
@xhochy, any thoughts here?
Yes, I know the issue. I'll push a fix later. This is special to arrow.
This is not specific to arrow it seems. It also happens in https://github.com/conda-forge/arcticdb-feedstock/pull/177:
$PREFIX/include/glog/logging.h:60:4: error: #error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
60 | # error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
| ^~~~~
Rather than set INTERFACE_COMPILE_DEFINITIONS "GLOG_USE_GLOG_EXPORT"
on consumers (as in https://github.com/apache/arrow/pull/40230), why don't we do
target_compile_definitions(
glog
INTERFACE
GLOG_USE_GLOG_EXPORT
)
in this feedstock? That seems like a much more scalable solution to me.
I think this breakage comes down to the issue that the all the projects have custom FindGlog.cmake
files that take preference over the official one. At least for Arrow and Folly, this was the underlying issue. In Arrow, it was easy to redirect to the official one (if there is one), in folly, I didn't understand their build system.
Trying to compile arrow 15 (and below) with glog 0.7 runs into:
and then a very long stream of errors.
The release notes don't point to any such hard breaking changes, and looking at the code, it seems that we'd now need to unconditionally set
GLOG_USE_GLOG_EXPORT
.Indeed, glog's CMakeLists.txt unconditionally puts this symbol in the interface of
libglog
, which makes it all the more surprising that this isn't working out of the box.Not sure if there's a bug in 0.7 or in the packaging, or somewhere else. In particular, arrow's usage of glog is be "CMake-native" and AFAICT should respect
target_compile_definitions
.