| Summary: | Compilation failure: ‘struct stat’ has no member named ‘st_birthtime’ | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Pavel Nikulin <pavel> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | berto, bugs-noreply, clopez, lantw44 |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Pavel Nikulin
2020-03-10 05:33:19 PDT
The code that is failing to build for you should not be compiled on Linux because its inside a pre-processor block of "if HAVE(STAT_BIRTHTIME)". And CMake should detect that and don't define HAVE_STAT_BIRTHTIME to true. Can you check in the file CMakeCache.txt file inside your build the value of HAVE_STAT_BIRTHTIME? If it is defined to true (1), then we need to look at what caused cmake to define that to true. The check that defines this is in the file Source/cmake/OptionsCommon.cmake in the call WEBKIT_CHECK_HAVE_STRUCT(HAVE_STAT_BIRTHTIME "struct stat" st_birthtime sys/stat.h) that calls the macro defined in Source/cmake/WebKitFeatures.cmake which ends calling cmake function check_struct_has_member() which its available at least since cmake 3.0 https://cmake.org/cmake/help/v3.0/module/CheckStructHasMember.html Can you paste here the output of the following command: grep -C25 -r HAVE_STAT_BIRTHTIME ${build-directory}/CMake* ? it should show the value that cmake picked for this, as well as how it performed the check CMakeCache.txt
//Test HAVE_STAT_BIRTHTIME_value
HAVE_STAT_BIRTHTIME_value:INTERNAL=1
CMakeOutput.log
CMakeFiles/CMakeOutput.log:Performing C SOURCE FILE Test HAVE_STAT_BIRTHTIME_value succeeded with the following output:
CMakeFiles/CMakeOutput.log-Change Dir: /var/tmp/portage/net-libs/webkit-gtk-2.26.4/work/webkit-gtk-2.26.4_build/CMakeFiles/CMakeTmp
CMakeFiles/CMakeOutput.log-
CMakeFiles/CMakeOutput.log-Run Build Command(s):/usr/bin/ninja cmTC_3e055
CMakeFiles/CMakeOutput.log-[1/2] Building C object CMakeFiles/cmTC_3e055.dir/src.c.o
CMakeFiles/CMakeOutput.log-[2/2] Linking C executable cmTC_3e055
CMakeFiles/CMakeOutput.log-
CMakeFiles/CMakeOutput.log-Source file was:
CMakeFiles/CMakeOutput.log-
CMakeFiles/CMakeOutput.log-#include <sys/stat.h>
CMakeFiles/CMakeOutput.log-
CMakeFiles/CMakeOutput.log-int main()
CMakeFiles/CMakeOutput.log-{
CMakeFiles/CMakeOutput.log- (void)sizeof(((struct stat *)0)->st_birthtime);
CMakeFiles/CMakeOutput.log- return 0;
CMakeFiles/CMakeOutput.log-}
That's very weird as I have no st_birthtime in my stat.h or any include file. I tried compiling the test with g++ manually, and it fails as it should. I suspect something from the side of gentoo portage intervenes. Either distcc or ccache. Will try purging the cache and compiling locally. Confirming, DistCC is playing tricks. It compiles without it |