Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling in Ubuntu 14.04 throws error #91

Closed
kidambisrinivas opened this issue Sep 25, 2014 · 8 comments
Closed

Compiling in Ubuntu 14.04 throws error #91

kidambisrinivas opened this issue Sep 25, 2014 · 8 comments

Comments

@kidambisrinivas
Copy link

@kidambisrinivas kidambisrinivas commented Sep 25, 2014

Hi,

Thanks for the great tool. It's an ideal tool for my use case requiring a direct replacement for redis hash with high scalability. May I check with you if the installation of this in Ubuntu 14.04 is just compiling using 'storage_engine=leveldb make'. If so, I get this error when I run a make:

g++ -c -Wall -g -O2 -fPIC -D__STDC_FORMAT_MACROS -DARDB_VERSION='"0.8.2"' -I./ -I./common -I/home/user/projects/ds/ardb/src/../deps/cpp-btree -I/home/user/projects/ds/ardb/src/../deps/lua/src -I/home/user/projects/ds/ardb/src/../deps/snappy-1.1.2 -I/home/user/projects/ds/ardb/src/../deps/leveldb-1.16.0/include engine/leveldb_engine.cpp -o engine/leveldb_engine.o
engine/leveldb_engine.cpp: In member function ‘virtual void ardb::LevelDBLogger::Logv(const char_, _va_list_tag)’:
engine/leveldb_engine.cpp:48:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len < sizeof(logbuf))
^
echo ">>>>> Building JEMALLOC" &&
cd /home/user/projects/ds/ardb/src/../deps &&
tar jxf /home/user/projects/ds/ardb/src/../deps/jemalloc-3.6.0.tar.bz2 &&
cd /home/user/projects/ds/ardb/src/../deps/jemalloc-3.6.0 &&
patch < ../../jemalloc.patch &&
autoconf configure.ac > configure 2> autoconf.out &&
./configure > configure.out &&
make build_lib_static &&
echo "<<<<< Done building JEMALLOC"

Building JEMALLOC
patching file configure.ac
make[1]: *** [/home/user/projects/ds/ardb/src/../deps/jemalloc-3.6.0/lib/libjemalloc.a] Error 127
make[1]: Leaving directory `/home/user/projects/ds/ardb/src'
make: *** [all] Error 2

EDIT: If this might help
OS: Ubuntu 14.04 LTS
CPU: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Kernel: Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
gcc: gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

Am running the build as a non-root user.

If I'm doing something wrong here, please help me with the correct way to build, install and run in ubuntu 14.04.

@kidambisrinivas kidambisrinivas changed the title Ubuntu 14.04 make throws error Compiling in Ubuntu 14.04 throws error Sep 25, 2014
@yinqiwen
Copy link
Owner

@yinqiwen yinqiwen commented Sep 25, 2014

It seems that you have not install 'patch' command in your machine.

@kidambisrinivas
Copy link
Author

@kidambisrinivas kidambisrinivas commented Sep 25, 2014

Thanks for the quick reply. I just checked my system. It has 'patch' installed in it.

EDIT: If this might help: GNU patch 2.7.1

@yinqiwen
Copy link
Owner

@yinqiwen yinqiwen commented Sep 25, 2014

Is 'autoconf ' installed too?

@kidambisrinivas
Copy link
Author

@kidambisrinivas kidambisrinivas commented Sep 25, 2014

Oh...no. Thanks for the solution. After I installed autoconf, I still get this error and a lot of warnings, but it continues to compile. The warnings are similar to this:

warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (cursor >= options.limit_option.offset)

It compiled and am able to run and access it via CLI. Do I have to do something specific to avoid these warnings?

@yinqiwen
Copy link
Owner

@yinqiwen yinqiwen commented Sep 25, 2014

It is just compiler warnings, not error, I have a plan to remove all warnings in future.
If you feel uncomfortable with the warnings, you can remove the compile flag '-Wall' in src/Makefile.

@kidambisrinivas
Copy link
Author

@kidambisrinivas kidambisrinivas commented Sep 25, 2014

Yup sure. That's great. I just wanted to know if the warnings have any long-term repercussions. Am fine with them as they are docile. :)

Thank you for your time and quick help.

@amnond
Copy link

@amnond amnond commented May 17, 2015

Saved me some time too, thank you :)

@luweijie007
Copy link

@luweijie007 luweijie007 commented Feb 18, 2016

Saved me some time too ,and too much warn output 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.