'::clock_t' has not been declared

Post Reply
uzimith
Posts: 1
Joined: Sat Dec 06, 2014 9:31 am

'::clock_t' has not been declared

Post by uzimith »

I tried to compile OpenVibe in Fedora 20 x64 Server on Virtual Box.
$ vagrant init chef/fedora-20
$ vagrant up
$ vagrant ssh
$ git clone git://scm.gforge.inria.fr/openvibe/openvibe.git
$ cd openvibe/scripts/
$ ./linux-install_dependencies
$ ./linux-build
However, I got this error.
[ 5%] [ 5%] Building CXX object modules/system/CMakeFiles/openvibe-module-system.dir/src/Time.cpp.o
Built target test_fs
[ 6%] Built target openvibe-module-ebml
In file included from /vagrant/openvibe/modules/system/src/Time.cpp:7:0:
/usr/include/c++/4.8.3/ctime:60:11: ???: '::clock_t' has not been declared
using ::clock_t;
^
/usr/include/c++/4.8.3/ctime:61:11: ???: '::time_t' has not been declared
using ::time_t;
^
/usr/include/c++/4.8.3/ctime:62:11: ???: '::tm' has not been declared
using ::tm;
^
/usr/include/c++/4.8.3/ctime:64:11: ???: '::clock' has not been declared
using ::clock;
^
/usr/include/c++/4.8.3/ctime:65:11: ???: '::difftime' has not been declared
using ::difftime;
^
/usr/include/c++/4.8.3/ctime:66:11: ???: '::mktime' has not been declared
using ::mktime;
^
/usr/include/c++/4.8.3/ctime:67:11: ???: '::time' has not been declared
using ::time;
^
/usr/include/c++/4.8.3/ctime:68:11: ???: '::asctime' has not been declared
using ::asctime;
^
/usr/include/c++/4.8.3/ctime:69:11: ???: '::ctime' has not been declared
using ::ctime;
^
/usr/include/c++/4.8.3/ctime:70:11: ???: '::gmtime' has not been declared
using ::gmtime;
^
/usr/include/c++/4.8.3/ctime:71:11: ???: '::localtime' has not been declared
using ::localtime;
^
/usr/include/c++/4.8.3/ctime:72:11: ???: '::strftime' has not been declared
using ::strftime;
^
[ 6%] make[2]: *** [modules/system/CMakeFiles/openvibe-module-system.dir/src/Time.cpp.o] Error 1
make[1]: *** [modules/system/CMakeFiles/openvibe-module-system.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Built target openvibe-module-socket
[ 6%] Built target test_thresholdDataComparison
make: *** [all] Error 2
Why did this happen?

Actually, I could compile when I comment out "#include <ctime>" on the file "openvibe/modules/system/src/Time.cpp"
And, I got the same error in Ubuntu Server 64-bit 14.04.(ubuntu/trusty64-juju) and latest Debian (chef/debian-7.4).

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: '::clock_t' has not been declared

Post by jtlindgren »

Hi, the server branches of the distros are not supported (i.e. we don't test builds on them).

I can't reproduce your problem with the desktop version of FC20 x86_64 (Heisenbug).

I suppose there is some difference in their build systems.

Since the error comes from Fedora header and not OpenViBE code, I'm wondering if can you build anything that has

#include <ctime>

in it? Like a hello world?

Edit: similar issues here,

http://ubuntuforums.org/showthread.php?t=342143
http://www.wanderinghill.com/wp/?p=21


Cheers,
Jussi

Post Reply