des-testbed / libara

A framework for the implementation and evaluation of routing algorithms based on the Ant Colony Optimization (ACO) metaheuristic.
GNU General Public License v3.0
19 stars 11 forks source link

libARA does not compile on MacOSX #130

Open mfrey opened 9 years ago

mfrey commented 9 years ago

If you try to compile libARA on MacOSX 10.9 this results in the following error

$ make
Compiling src//core/AbstractARAClient.cpp
In file included from src//core/AbstractARAClient.cpp:5:
In file included from include/AbstractARAClient.h:8:
In file included from include/ARAMacros.h:14:
In file included from include/Address.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:131:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/chrono:279:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctime:56:9: error: no member named
      'clock_t' in the global namespace
using ::clock_t;
      ~~^
mfrey commented 9 years ago

The issue is more or less obvious. We have our own notion of time in libARA which is defined in Time.h (and corresponding class Time). Unfortunately, the MacOSX file system is case insensitive, meaning that this conflicts with the existing time.h in /usr/include. Basically we have to rename the header and class to something else in order to avoid this conflict!