GithubHelp home page GithubHelp logo

Comments (11)

vitalif avatar vitalif commented on June 18, 2024

You need yajl 2.x, not 1.x. I've never tried to build grive with older yajl.
About the boost "/usr/lib64/lib64/libboost_date_time.a" error... I suspect it could be a bug of centos package, because grive just uses system cmake boost module.

from grive2.

do11 avatar do11 commented on June 18, 2024

Thanks, I installed yajl from the git repo.

# git clone git://github.com/lloyd/yajl
# cd  yajl/
# ./configure
# make
# make install
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libyajl.so.2.1.1
-- Installing: /usr/local/lib/libyajl.so.2
-- Installing: /usr/local/lib/libyajl.so
-- Installing: /usr/local/lib/libyajl_s.a
-- Installing: /usr/local/include/yajl/yajl_parse.h
-- Installing: /usr/local/include/yajl/yajl_gen.h
-- Installing: /usr/local/include/yajl/yajl_common.h
-- Installing: /usr/local/include/yajl/yajl_tree.h
-- Installing: /usr/local/include/yajl/yajl_version.h
-- Installing: /usr/local/share/pkgconfig/yajl.pc
-- Installing: /usr/local/bin/json_reformat
-- Removed runtime path from "/usr/local/bin/json_reformat"
-- Installing: /usr/local/bin/json_verify
-- Removed runtime path from "/usr/local/bin/json_verify"

This was not enough, though, becasue cmake still doesn't see yajl, probably because pkg-config doesn't see it, so I forced to trick it:

# yum erase yajl-devel
# ln -s /usr/local/share/pkgconfig/yajl.pc /usr/share/pkgconfig/yajl.pc

Do you think it possible to tell cmake to find yajl in /usr/local/ ?

Anyway, now cmake sees yajl, but there is still boost error:

root@/home/cloud/grive2/build# cmake ..
-- Found libgcrypt: -lgcrypt -ldl -lgpg-error
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   regex
--   system
-- checking for module 'yajl'
--   found yajl, version 2.1.1
CMake Error at /usr/lib64/boost/Boost.cmake:536 (message):
  The imported target "boost_date_time-static" references the file

     "/usr/lib64/lib64/libboost_date_time.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib64/boost/Boost.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib64/boost/BoostConfig.cmake:28 (include)
  /usr/share/cmake/Modules/FindBoost.cmake:177 (find_package)
  grive/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/cloud/grive2/build/CMakeFiles/CMakeOutput.log".

...I wonder why it tries to find libboost_date_time.a, because, there is only libboost_date_time.so

root@/home/cloud/grive2/build# rpm -ql boost-date-time
/usr/lib64/libboost_date_time-mt.so.5
/usr/lib64/libboost_date_time.so.5
/usr/share/doc/boost-date-time-1.41.0
/usr/share/doc/boost-date-time-1.41.0/LICENSE_1_0.txt

from grive2.

do11 avatar do11 commented on June 18, 2024

I googled how to workaround it, but still there's another problem:

root@/home/cloud/grive2/build# cmake -DBoost_NO_BOOST_CMAKE=BOOL:ON ..
-- Found libgcrypt: -lgcrypt -ldl -lgpg-error
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   regex
--   system
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cloud/grive2/build
root@/home/cloud/grive2/build# make
Scanning dependencies of target grive
[  2%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Entry.cc.o
[  4%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/ResourceTree.cc.o
[  6%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/State.cc.o
/home/cloud/grive2/libgrive/src/base/State.cc: In member function 'void gr::State::FromLocal(const boost::filesystem::path&, gr::Resource*)':
/home/cloud/grive2/libgrive/src/base/State.cc:81: 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

What this could be? Too old boost?

from grive2.

vitalif avatar vitalif commented on June 18, 2024

set PKG_CONFIG_PATH=/usr/lib:/usr/local/lib to make pkg-config look in both locations (although I think it should be lib64 on centos)

from grive2.

vitalif avatar vitalif commented on June 18, 2024

yes, it may be the problem of old boost... it seems i->path().filename() is just std::string there. you can try to workaround the issue by changing i->path().filename().string() to i->path().filename()...

from grive2.

do11 avatar do11 commented on June 18, 2024

Thanks again, its worked!

root@/home/cloud/grive2/build# export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/share/pkgconfig
root@/home/cloud/grive2/build# rm /usr/share/pkgconfig/yajl.pc # removed my hack
root@/home/cloud/grive2/build# cmake ..
-- Found libgcrypt: -lgcrypt -ldl -lgpg-error
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   regex
--   system
-- Boost version: 1.41.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cloud/grive2/build

Boost workaround worked too:

root@/home/cloud/grive2/build# vim /home/cloud/grive2/libgrive/src/base/State.cc
...
[  6%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Resource.cc.o
/home/cloud/grive2/libgrive/src/base/Resource.cc: In member function 'void gr::Resource::FromLocal(const gr::DateTime&)':
/home/cloud/grive2/libgrive/src/base/Resource.cc:252: 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/Resource.cc.o] Error 1
make[1]: *** [libgrive/CMakeFiles/grive.dir/all] Error 2
make: *** [all] Error 2
...
root@/home/cloud/grive2/build# vim /home/cloud/grive2/libgrive/src/base/Resource.cc

Second fix is same, removing string(). After that make finished w/o errors. But,

root@/home/cloud/grive2/build# grive
grive: error while loading shared libraries: libyajl.so.2: cannot open shared object file: No such file or directory
root@/home/cloud/grive2/build# ldd /usr/local/bin/grive
        linux-vdso.so.1 =>  (0x00007fff4dbff000)
        libboost_program_options-mt.so.5 => /usr/lib64/libboost_program_options-mt.so.5 (0x00007f2b2bb1c000)
        libyajl.so.2 => not found
        libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f2b2b8c7000)

Fix:

root@/home/cloud/grive2/build# echo /usr/local/lib > /etc/ld.so.conf.d/usr-local-lib.conf
root@/home/cloud/grive2/build# ldconfig
root@/home/cloud/grive2/build# grive
Please run grive with the "-a" option if this is the first time you're accessing your Google Drive!

Big thanks for the help!

ps. Wow that wasn't easy install. ;-) Maybe you could make troubleshooting page for standard errors.

from grive2.

vitalif avatar vitalif commented on June 18, 2024

Oh... ld.so.conf modification was probably required because yajl should be also installed into /usr/local/lib64 under centos... because it's very strange that /usr/local was not present in the ld config...
Other fixes are probably also centos6-related, so centos6 rpm spec would be the proper place to contain all workarounds.
There is some older spec in package/fedora16/grive.spec, maybe you could modify it to make a centos6 package and submit a pullrequest? :)

from grive2.

vitalif avatar vitalif commented on June 18, 2024

(I personally have no installed centos6 at the moment... in fact no rpm-based distros at all :))

from grive2.

do11 avatar do11 commented on June 18, 2024

Nor centos6, nor centos7 have /usr/local/lib into ld.so.conf* by default. And yajl is installed there because I did normal make install for yajl's git cloned src, for it not to conflict with system wide centos6's, older, yajl-1.0.7, which is used by libvirt (which I use). I think proper way is to create package like yajl2 for centos6 (which install into usual places), but this is additional work, and it seems, ofc, not related to you, except, that your package is not working (for very popular distro).

Btw, centos7 contains yajl-2.0.4, but I didn't try grive2 there, though.

Also, FYI, centos6 have by default boost-1.41.0, and boost148 (i.e. 1.48.0) as additional package in EPEL. Centos7 default is boost-1.53.0.

from grive2.

do11 avatar do11 commented on June 18, 2024

Btw, you didn't mention in README that cmake is also requirement.

I tried to compile grive2 on CentOS 7, JFF:

root@el7:~/grive2/build# yum install cmake libgcrypt-devel libcurl-devel expat-devel yajl-devel 
root@el7:~/grive2/build# yum install boost boost-devel
root@el7:~/grive2/build# cmake ..
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found libgcrypt: -lgcrypt -ldl -lgpg-error
-- Found CURL: /usr/lib64/libcurl.so (found version "7.29.0")
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.1.0")
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   unit_test_framework
--   regex
--   system
-- Found libbfd: /usr/lib64/libbfd.so
-- Found libiberty: /usr/lib64/libiberty.a
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- checking for module 'yajl'
--   found yajl, version 2.0.4
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   program_options
-- Configuring done
-- Generating done
-- Build files have been written to: /root/grive2/build
root@el7:~/grive2/build# make
...
[100%] Built target grive_executable
root@el7:~/grive2/build# ./grive/grive
Please run grive with the "-a" option if this is the first time you're accessing your Google Drive!

👍

from grive2.

vitalif avatar vitalif commented on June 18, 2024

Nor centos6, nor centos7 have /usr/local/lib into ld.so.conf* by default.

Maybe /usr/local/lib64 is included?

Btw, you didn't mention in README that cmake is also requirement.

...and also git and c++ compiler :) I've already stated it here http://yourcmc.ru/wiki/Grive2 and maybe you're right and I should add it in README...

from grive2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.