[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#915319: Missing definition for struct timespec



Hi,

I think the build is unable to verify that samba provides
smbc_set_context and smbc_option_set because it can't find the
definition for `struct timespec`.  Here is an excerpt from
CMakeError.log:

```
Determining if the smbc_set_context exist failed with the following output:
Change Dir: /build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_3c66e/fast"
make[3]: Entering directory '/build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_3c66e.dir/build.make CMakeFiles/cmTC_3c66e.dir/build
make[4]: Entering directory '/build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3c66e.dir/CheckSymbolExists.c.o
/usr/bin/cc  -I/usr/include/samba-4.0  -g -O2 -fdebug-prefix-map=/build/kde-runtime-7OuCXd/kde-runtime-17.08.3=. -fstack-protector-strong -Wformat -We
rror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-imp
licit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common    -o C
MakeFiles/cmTC_3c66e.dir/CheckSymbolExists.c.o   -c /build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbol
Exists.c
In file included from /build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:
/usr/include/samba-4.0/libsmbclient.h:168:18: error: field ‘btime_ts’ has incomplete type
  struct timespec btime_ts;
                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:172:18: error: field ‘mtime_ts’ has incomplete type
  struct timespec mtime_ts;
                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:176:18: error: field ‘atime_ts’ has incomplete type
  struct timespec atime_ts;
                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:180:18: error: field ‘ctime_ts’ has incomplete type
  struct timespec ctime_ts;
                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:1117:38: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition
 or declaration
                               struct timeval *tbuf);
                                      ^~~~~~~
/usr/include/samba-4.0/libsmbclient.h:1936:41: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition
 or declaration
 int smbc_utimes(const char *url, struct timeval *tbuf);
                                         ^~~~~~~
make[4]: *** [CMakeFiles/cmTC_3c66e.dir/build.make:66: CMakeFiles/cmTC_3c66e.dir/CheckSymbolExists.c.o] Error 1
make[4]: Leaving directory '/build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
make[3]: *** [Makefile:121: cmTC_3c66e/fast] Error 2
make[3]: Leaving directory '/build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'

File /build/kde-runtime-7OuCXd/kde-runtime-17.08.3/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <libsmbclient.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef smbc_set_context
  return ((int*)(&smbc_set_context))[argc];
#else
  (void)argc;
  return 0;
#endif
}
```

I don't know how to fix this, though.

-- 
Matt


Reply to: