GithubHelp home page GithubHelp logo

compile error on Ubuntu about rocksdb HOT 18 CLOSED

facebook avatar facebook commented on April 20, 2024
compile error on Ubuntu

from rocksdb.

Comments (18)

igorcanadi avatar igorcanadi commented on April 20, 2024

What version of g++ are you using? Can you try upgrading to 4.7 or 4.8?

from rocksdb.

kgcrom avatar kgcrom commented on April 20, 2024

I'm using 4.8.1.

kgcrom@lucas:~/sponge$ g++ --version
g++ (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Have you finised compile without above header?

from rocksdb.

dyu avatar dyu commented on April 20, 2024

I'm getting these erros:
db/db_bench.cc:14:27: fatal error: gflags/gflags.h: No such file or directory
compilation terminated.

on ubuntu 13.04 gcc 4.7.3

from rocksdb.

mdcallag avatar mdcallag commented on April 20, 2024

Do you need to install gflags? Is that a dependency we need to document?

On a recent ubuntu 12.10 install I had to do:
sudo apt-get install libgflags-dev


And I also had to add this to db/db_test.cc for the default (debug?) build
to define "truncate".

diff --git a/db/db_test.cc b/db/db_test.cc
index e246798..2f1a1e3 100644
--- a/db/db_test.cc
+++ b/db/db_test.cc
@@ -27,6 +27,7 @@
#include "util/testharness.h"
#include "util/testutil.h"
#include "utilities/merge_operators.h"
+#include <unistd.h>

namespace rocksdb {

On Sun, Nov 17, 2013 at 3:03 AM, David Yu [email protected] wrote:

I'm getting these erros:
db/db_bench.cc:14:27: fatal error: gflags/gflags.h: No such file or
directory
compilation terminated.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28646477
.

Mark Callaghan
[email protected]

from rocksdb.

mdcallag avatar mdcallag commented on April 20, 2024

Yes, need to add "include <unistd.h>" to fix he compile failure

from rocksdb.

vinothchandar avatar vinothchandar commented on April 20, 2024

I am trying to add a storage engine to Voldemort based on rocksdb. Also running into trouble compiling snappy on Ubuntu 12.04 LTS. Seems like the makefile has some hardcoded paths..

$:~/projects/rocksdb/snappy/snappy-1.0.5$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/dhruba/local/externals/java/leveldb/source/snappy-1.0.5/missing --run aclocal-1.11 -I m4
/bin/sh: 0: Can't open /home/dhruba/local/externals/java/leveldb/source/snappy-1.0.5/missing
make: *** [aclocal.m4] Error 12
$:~/projects/rocksdb/snappy/snappy-1.0.5$ grep -Ri "dhruba" Makefile | wc -l
11

It would be great if you guys can put together a guide on building..

from rocksdb.

igorcanadi avatar igorcanadi commented on April 20, 2024

Working on it ;)

from rocksdb.

dhruba avatar dhruba commented on April 20, 2024

https://reviews.facebook.net/

from rocksdb.

igorcanadi avatar igorcanadi commented on April 20, 2024

Can you please try compiling on Ubuntu now? I am able to compile and run on Ubuntu 12.04.

from rocksdb.

dyu avatar dyu commented on April 20, 2024

A complete list of dependencies (required and optional) would be a good start.
The docs has been pretty good so far except for install/build docs :-)

I successfully compiled after installing libgflags-dev (thanks @mdcallag).

from rocksdb.

vinothchandar avatar vinothchandar commented on April 20, 2024

Works now.. Thanks guys!

For others: On a fresh 12.04 LTS, the process is as roughly follows

1. sudo apt-get install libsnappy-dev
2. Upgrade gcc/g++ to 4.8
See http://askubuntu.com/questions/312620/how-do-i-install-gcc-4-8-1-on-ubuntu-13-04
(it is for 13.04. but the process is common I think)
3. sudo apt-get install build-essentials devscripts
4. Install gflags
(its not 1-command if you are < 12.10)
see http://askubuntu.com/questions/312173/installing-gflags-12-04?rq=1


then make, make install in rocksdb and done.

from rocksdb.

mdcallag avatar mdcallag commented on April 20, 2024

I don't think gcc 4.8 is required. I compile with 4.7.2 using Ubuntu 12.10

On Mon, Nov 18, 2013 at 6:52 AM, vinoth chandar [email protected]:

Works now.. Thanks guys!

For others: On a fresh 12.04 LTS, the process is as roughly follows

  1. sudo apt-get install libsnappy-dev

  2. Upgrade gcc/g++ to 4.8
    See http://askubuntu.com/questions/312620/how-do-i-install-gcc-4-8-1-on-ubuntu-13-04
    (it is for 13.04. but the process is common I think)

  3. Install gflags
    (its not 1-command if you are < 12.10)
    see http://askubuntu.com/questions/312173/installing-gflags-12-04?rq=1

    then make, make install in rocksdb and done.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28703440
.

Mark Callaghan
[email protected]

from rocksdb.

kgcrom avatar kgcrom commented on April 20, 2024

@igorcanadi @vinothchandar 👍 with only install build-essentials and upgrade gcc/g++, install gflags

Thank you

from rocksdb.

igorcanadi avatar igorcanadi commented on April 20, 2024

Added INSTALL.md: https://github.com/facebook/rocksdb/blob/master/INSTALL.md

I hope this is resolved. Let us know if you are still having issues.

from rocksdb.

liukai avatar liukai commented on April 20, 2024

👍
@igorcanadi you're awesome!

from rocksdb.

vinothchandar avatar vinothchandar commented on April 20, 2024

+1 or should I say "like" :P .. Thanks for adding the installation instructions guys..

from rocksdb.

biendltb avatar biendltb commented on April 20, 2024

A nice tut:
http://bienuit.wordpress.com/2013/12/04/how-to-install-rocksdb-on-ubuntu-12-04-lts/

from rocksdb.

juneng603 avatar juneng603 commented on April 20, 2024

In case of me, this one doesn't work.

brew tap homebrew/dupes; brew install gcc47 --use-llvm

instead of it, the below line makes me working on it.

brew tap homebrew/version; brew install gcc47 --use-llvm

from rocksdb.

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.