2

I want to build make a library but show the following error after 'make'

how can I do to fix the error?

ekeroc@ekeroc-desktop:~/gattlib/build$ make
[  1%] Building C object dbus/CMakeFiles/gattlib.dir/gattlib.c.o
In file included from /usr/lib/gcc/arm-linux-gnueabihf/5/include-fixed/syslimits.h:7:0,
                 from /usr/lib/gcc/arm-linux-gnueabihf/5/include-fixed/limits.h:34,
                 from /usr/lib/arm-linux-gnueabihf/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /home/ekeroc/gattlib/dbus/gattlib.c:24:
/usr/lib/gcc/arm-linux-gnueabihf/5/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from /usr/include/glib-2.0/glib/galloca.h:32:0,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /home/ekeroc/gattlib/dbus/gattlib.c:24:
/usr/include/glib-2.0/glib/gtypes.h:35:18: fatal error: time.h: No such file or directory
compilation terminated.
dbus/CMakeFiles/gattlib.dir/build.make:82: recipe for target 'dbus/CMakeFiles/gattlib.dir/gattlib.c.o' failed
make[2]: *** [dbus/CMakeFiles/gattlib.dir/gattlib.c.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'dbus/CMakeFiles/gattlib.dir/all' failed
make[1]: *** [dbus/CMakeFiles/gattlib.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
ekeroc@ekeroc-desktop:~/gattlib/build$ ^C
jww
  • 97,681
  • 90
  • 411
  • 885
柯權哲
  • 36
  • 1
  • 2
  • 1
    Install `build-essential` or whatever that package is called? – melpomene Jun 04 '17 at 19:59
  • You should probably show the output of the compile rather than allowing Cmake to hide it. Hiding it takes away critical information, like options and paths. Also see [GCC build problem (#include_next limits.h)](https://stackoverflow.com/q/871952/608639) and [No include path in which to find limits.h: GCC build limits.h (#include_next limits.h)](https://stackoverflow.com/q/41588244/608639) – jww Jun 04 '17 at 22:08
  • https://stackoverflow.com/questions/31600600/compilation-error-stddef-h-no-such-file-or-directory – Mahabubur Rahman Aug 12 '20 at 18:05

0 Answers0