Grive / grive

an open source Linux client for Google Drive
http://www.lbreda.com/grive/start
GNU General Public License v2.0
1.59k stars 378 forks source link

Build fails on 32-bit Debian Wheezy #199

Open vitalif opened 11 years ago

vitalif commented 11 years ago

g++ (Debian 4.7.2-5) 4.7.2 fails to find Json constructors on a 32-bit machine.

[ 81%] Built target grive [ 86%] Built target btest Linking CXX executable grive ../libgrive/libgrive.a(State.cc.o): In functiongr::v1::State::Write(boost::filesystem3::path const&) const': State.cc:(.text+0x1778): undefined reference to gr::Json::Json<long>(long const&)' State.cc:(.text+0x17fa): undefined reference togr::Json::Json(unsigned long const&)' State.cc:(.text+0x18cd): undefined reference to gr::Json::Json<long>(long const&)' collect2: error: ld returned 1 exit status make[2]: *** [grive/grive] Error 1 make[1]: *** [grive/CMakeFiles/grive_executable.dir/all] Error 2 make: *** [all] Error 2

It builds without problem if I change Json::Json( const boost::int32_t& l ) to Json::Json( const long& l ) and Json::Json( const boost::uint32_t& l ) to Json::Json( const unsigned long& l )

Not sure how to avoid this error more correctly... Also can I ask you - what for you're using one template constructor with many "template<>" implementations instead of just many overloaded constructors for different types?

nilclass commented 11 years ago

This is the same issue as #193. Applying the patch from there solved it for me.