shogun-toolbox / shogun

Shōgun
http://shogun-toolbox.org
BSD 3-Clause "New" or "Revised" License
3.03k stars 1.04k forks source link

Error compling version.cpp #2550

Closed johnny555 closed 8 years ago

johnny555 commented 10 years ago

When compliling using CMake with python-module switched on under ubuntu 14.04 I get the following error:

[ 98%] Building CXX object src/shogun/CMakeFiles/libshogun.dir/base/Parameter.cpp.o
In file included from /home/username/source/shogun/src/shogun/base/Version.cpp:12:0:
/home/username/source/shogun/src/shogun/lib/versionstring.h:4:26: error: unable to find numeric literal operator ‘operator"" x’
 #define VERSION_REVISION 0x
                          ^
/home/username/source/shogun/src/shogun/base/Version.cpp:22:43: note: in expansion of macro ‘VERSION_REVISION’
 const int32_t Version::version_revision = VERSION_REVISION;
                                           ^
/home/username/source/shogun/src/shogun/base/Version.cpp:23:51: error: expected primary-expression before ‘;’ token
 const int32_t Version::version_year = VERSION_YEAR;
                                                   ^
/home/username/source/shogun/src/shogun/base/Version.cpp:24:53: error: expected primary-expression before ‘;’ token
 const int32_t Version::version_month = VERSION_MONTH;
                                                     ^
/home/username/source/shogun/src/shogun/base/Version.cpp:25:49: error: expected primary-expression before ‘;’ token
 const int32_t Version::version_day = VERSION_DAY;
                                                 ^
/home/username/source/shogun/src/shogun/base/Version.cpp:26:51: error: expected primary-expression before ‘;’ token
 const int32_t Version::version_hour = VERSION_HOUR;
                                                   ^
/home/username/source/shogun/src/shogun/base/Version.cpp:27:55: error: expected primary-expression before ‘;’ token
 const int32_t Version::version_minute = VERSION_MINUTE;
                                                       ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_revision()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:79:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_year()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:84:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_month()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:89:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_day()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:94:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_hour()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:99:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int32_t shogun::Version::get_version_minute()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:104:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/username/source/shogun/src/shogun/base/Version.cpp: In static member function ‘static int64_t shogun::Version::get_version_in_minutes()’:
/home/username/source/shogun/src/shogun/base/Version.cpp:114:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[2]: *** [src/shogun/CMakeFiles/libshogun.dir/base/Version.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/shogun/CMakeFiles/libshogun.dir/all] Error 2
make: *** [all] Error 2
iglesias commented 10 years ago

I can compile just fine on Ubuntu 14.04. Can you please post here what steps are you using (by the way, are you following the quickstart?) to get the source code, configure, and compile?

johnny555 commented 10 years ago

I initally tried to follow: http://www.shogun-toolbox.org/doc/en/current/installation.html

but by cloning the git repo instead. It seems that is out of date as there are is no ./configure file. When I noticed that there were cmake files I created a seperate build directory to run CMake in. I also chose to bundle ARPREC, COLPACK, EIGEN, JSON, NLOPT.

I configured CMake to build the python-modular library, I also had to apt-get install SWIG

Following that I configured, generated Cmake and then make -j4

I didn't notice the QUICKSTART, but other than change the install prefix I dont think I did anything differently.

https://github.com/shogun-toolbox/shogun/wiki/QUICKSTART

iglesias commented 10 years ago

What branch of the repository are you compiling? I guess it is either master or develop. You should go for develop. On 16 Oct 2014 01:05, "johnny555" notifications@github.com wrote:

I initally tried to follow: http://www.shogun-toolbox.org/doc/en/current/installation.html

but by cloning the git repo instead. It seems that is out of date as there are is no ./configure file. When I noticed that there were cmake files I created a seperate build directory to run CMake in. I also chose to bundle ARPREC, COLPACK, EIGEN, JSON, NLOPT.

I configured CMake to build the python-modular library, I also had to apt-get install SWIG

Following that I configured, generated Cmake and then make -j4

I didn't notice the QUICKSTART, but other than change the install prefix I dont think I did anything differently.

https://github.com/shogun-toolbox/shogun/wiki/QUICKSTART

— Reply to this email directly or view it on GitHub https://github.com/shogun-toolbox/shogun/issues/2550#issuecomment-59290904 .

vigsterkr commented 8 years ago

mmm this has been encountered just now by somebody else... :S looking into it, but interestingly enough travis-ci builds are done with ubuntu 14.04 docker images and have not encountered this before there :(