centos 6 compilation error installing grive

Issues related to applications and software problems
Post Reply
neuronetv
Posts: 76
Joined: 2012/01/08 21:53:07

centos 6 compilation error installing grive

Post by neuronetv » 2017/03/16 16:45:17

running centos 6.8 final 64 bit server (command line only), trying to install grive from git (https://github.com/Grive/grive) so I can mount google drive. Problem is I keep hitting an error during complation:
1) I have boost boost_1_63_0 installed, I've also tried boost_1_55_0.
2) I have yajl 2.1.1 installed too.
I get grive and cmake . runs fine but during make the console throws:

Code: Select all

/grive/libgrive/src/base/State.cc: In member function ‘void gr::State::FromLocal(const boost::filesystem::path&, gr::Resource*, gr::Val&)’:
/root/grive/libgrive/src/base/State.cc:98: error: ‘struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ has no member named ‘string’
make[2]: *** [libgrive/CMakeFiles/grive.dir/src/base/State.cc.o] Error 1
make[1]: *** [libgrive/CMakeFiles/grive.dir/all] Error 2
make: *** [all] Error 2
so I went into /root/grive/libgrive/src/base/State.cc and changed line 98 to remove 'string()' and then ran make again but I got:

Code: Select all

/grive/libgrive/src/base/Resource.cc: In member function ‘void gr::Resource::FromLocal(gr::Val&)’:
/root/grive/libgrive/src/base/Resource.cc:280: error: ‘struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ has no member named ‘string’
/root/grive/libgrive/src/base/Resource.cc: In function ‘std::ostream& gr::operator<<(std::ostream&, gr::Resource::State)’:
/root/grive/libgrive/src/base/Resource.cc:749: warning: comparison between signed and unsigned integer expressions
make[2]: *** [libgrive/CMakeFiles/grive.dir/src/base/Resource.cc.o] Error 1
make[1]: *** [libgrive/CMakeFiles/grive.dir/all] Error 2
make: *** [all] Error 2
unfortunately the readme and installation instructions all centre around ubuntu and debian but I'm using centos. Can anybody help me get past this error?

User avatar
TrevorH
Forum Moderator
Posts: 28550
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: centos 6 compilation error installing grive

Post by TrevorH » 2017/03/16 18:12:39

I suspect that you are either missing a bunch of -devel packages or that the code is just too new for CentOS 6. On CentOS 7 there is a grive2 package in the EPEL repository. You could download the SRPM for that from EPEL and then use mock to rebuild it for CentOS 6 - that way, since it is a properly set up EPEL package, teh spec file ought to contain enough BuildRequires: lines to tell mock whicih pre-req packages are required in order to build it and it will do all that work for you. As a side effect you will also get a nicely packaged build and you won't run into problems with source builds overwriting things on your system that shouldn't be.

Also, don't build as root !! One mistake in a Makefile can wipe out your entire system. Build as a normal user and when you need to do the make install part, then use sudo to do so.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

neuronetv
Posts: 76
Joined: 2012/01/08 21:53:07

Re: centos 6 compilation error installing grive

Post by neuronetv » 2017/03/17 07:30:15

ok thanks for your advice, I had a feeling maybe centos 6 wasn't modern enough to handle this package. I think I may have to rebuild the machine with centos 7 if epel has grive.

neuronetv
Posts: 76
Joined: 2012/01/08 21:53:07

Re: centos 6 compilation error installing grive

Post by neuronetv » 2017/03/18 22:25:22

update: yes I've built a centos 7 machine and grive was really easy this time
yum install grive2, then a couple of extra commands and it'a all good to go. Thanks again for your advice TrevorH

Post Reply

Return to “CentOS 6 - Software Support”