Community site: login faq

I'm trying to install ArangoDB by following a combination of the instructions at installing software from source (Webfaction Docs) and ArangoDB compiling cookbook and I can't figure out how to compile the sources. I've gotten as far as downloaded and extracted the files to my home directory, and created a temp folder, and can't figure out where to go from there.

Any assistance would be greatly appreciated.


I've managed to install cmake using the following: wget https://cmake.org/files/v3.9/cmake-3.9.1.tar.gz tar xzf cmake-[tab] cd cmake-[tab] ./configure --prefix=$HOME gmake make install

I've also ran cmake .. in the build directory.

Where I'm next caught up is this instruction: cmake -DCMAKE_C_COMPILER=/opt/bin/gcc -DCMAKE_CXX_COMPILER=/opt/bin/g++ ..

It gives me the error that it doesn't know where to find the CMAKE_ASM_COMPILER. I've tried passing in /usr/bin/gcc and /usr/bin/g++ to the above flags as found using the which command, and have tried adding CMAKE_ASM_COMPILER as a flag with no luck.

asked 12 Aug, 00:44

smacd's gravatar image

accept rate: 0%

edited 12 Aug, 05:42

AragonDB 3 will fail on the current GCC version installed and that is not mentioned anywhere on ArangoDB website, so you have to compile and install GCC/G++ CMAKE, and ArangoDB from source. In order to make it work, You can follow those steps:

Install GMP, MPFR, and MPC for building GCC

mkdir -p ~/src cd ~/src wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2 tar xfj gmp-6.1.2.tar.bz2 cd gmp-6.1.2 ./configure --prefix=$HOME make make install cd ~/src wget http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.gz tar xfz mpfr-3.1.5.tar.gz cd mpfr-3.1.5 ./configure --prefix=$HOME make make install cd ~/src wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz tar xfz mpc-1.0.3.tar.gz cd mpc-1.0.3 ./configure --prefix=$HOME --with-mpfr=$HOME make make install

Install GCC

cd ~/src wget http://gcc.parentingamerica.com/releases/gcc-6.4.0/gcc-6.4.0.tar.gz tar xfz gcc-6.4.0.tar.gz cd gcc-6.4.0 ./configure --prefix=$HOME --with-gmp=$HOME --with-mpfr=$HOME --with-mpc=$HOME --disable-multilib make make install

Install Cmake

cd ~/src export PATH=$HOME/bin:$PATH export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64:$LD_LIBRARY_PATH wget https://cmake.org/files/v3.9/cmake-3.9.1.tar.gz tar xfz cmake-3.9.1.tar.gz cd cmake-3.9.1 ./configure --prefix=$HOME make make install

Install ArangoDB

cd ~/src git clone --single-branch --depth 1 git://github.com/arangodb/arangodb.git cd arangodb git submodule update --recursive git submodule update --init --recursive mkdir build cd build cmake -DCMAKE_C_COMPILER=$HOME/bin/gcc -DCMAKE_CXX_COMPILER=$HOME/bin/g++ -DCMAKE_INSTALL_PREFIX:PATH=$HOME .. make make install

The above packages will be installed to ~/bin, and please note that the process will take couple of hours, and we suggest doing that in 'screen' session to avoid any interruption.

permanent link

answered 12 Aug, 05:52

ahmadz's gravatar image

ahmadz ♦♦
accept rate: 100%

edited 13 Aug, 23:15

Thanks for the help @ahmadz. unfortunately ArangoDB 2.8 is not an acceptable solution, as it's missing a lot of critical features for the application that I'm building.

When you say you're looking into issue regarding make, are we talking about timelines of a few days, or a few months? I'm not in any huge rush to get this application online, as it's still in development, however if I can't figure something out here I'd have to look elsewhere for hosting.

(12 Aug, 15:22) smacd smacd's gravatar image

I've made it a further trough the build process this time. I've deleted the build folder and re-ran cmake with cmake -DCMAKE_C_COMPILER=/opt/bin/gcc -DCMAKE_CXX_COMPILER=/opt/bin/g++ ... which worked fine, however I've ran into issues about half way through with an error in the make command, I'm guessing this is probably what you were referring to in your post?

(12 Aug, 16:44) smacd smacd's gravatar image

Likely, can you post the current error you are receiving?

(13 Aug, 04:29) johns ♦♦ johns's gravatar image

/home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp: In member function ‘void arangodb::ExportFeature::writeBatch(int, {anonymous}::VPackArrayIterator, const string&)’: /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:506:69: error: no matching function for call to ‘regex_replace(std::string&, std::regex, const char [3])’ value = std::regex_replace(value, std::regex("\""), "\"\""); ^ /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:506:69: note: candidates are: In file included from /usr/include/c++/4.8.2/regex:62:0, from /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:38: /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, ^ /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed: /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:506:69: note: deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’) value = std::regex_replace(value, std::regex("\""), "\"\""); ^ In file included from /usr/include/c++/4.8.2/regex:62:0, from /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:38: /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(const basic_string<_Ch_type>& __s, ^ /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed: /home/subscript/arangodb-3.2.1/arangosh/Export/ExportFeature.cpp:506:69: note: mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [3]’ value = std::regex_replace(value, std::regex("\""), "\"\""); ^ make[2]: *** [arangosh/CMakeFiles/arangoexport.dir/Export/ExportFeature.cpp.o] Error 1 make[1]: *** [arangosh/CMakeFiles/arangoexport.dir/all] Error 2 make: *** [all] Error 2

(13 Aug, 06:53) smacd smacd's gravatar image

@smacd, i was able to compile and install the latest version of ArangoDB, please see the updated answer for the steps.

(13 Aug, 23:16) ahmadz ♦♦ ahmadz's gravatar image

Thank you very much @ahmadz for looking into this and getting this working. I've followed all the steps above, in order, including removing and re-installing cmake again, and redownloading ArangoDB using the methods you've shown above and I'm now hitting a different compiling error even earlier on the make process. After hitting the error below I tried changing the git branch to specifically get the latest stable release tag instead of just the development branch, as well as tried downloading the release as a zip, and all 3 methods error out at the same place.

ACTION src_v8_gyp_v8_base_target_run_mkpeephole /home/subscript/src/arangodb-3 .2.1/build/3rdParty/V8/v5.7.0.0/x64.release/obj.target/v8_base/geni/bytecode-pee phole-table.cc /home/subscript/src/arangodb-3.2.1/build/3rdParty/V8/v5.7.0.0/x64.release/mkpeep hole: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /ho me/subscript/src/arangodb-3.2.1/build/3rdParty/V8/v5.7.0.0/x64.release/mkpeephol e) /home/subscript/src/arangodb-3.2.1/build/3rdParty/V8/v5.7.0.0/x64.release/mkpeep hole: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /ho me/subscript/src/arangodb-3.2.1/build/3rdParty/V8/v5.7.0.0/x64.release/mkpeephol e) make[3]: *** [/home/subscript/src/arangodb-3.2.1/build/3rdParty/V8/v5.7.0.0/x64. release/obj.target/v8_base/geni/bytecode-peephole-table.cc] Error 1 make[2]: *** [3rdParty/V8/v8_build-prefix/src/v8_build-stamp/v8_build-build] Err or 2 make[1]: *** [3rdParty/V8/CMakeFiles/v8_build.dir/all] Error 2 make: *** [all] Error 2

Not sure what I'm doing wrong? I had simultaneously reached out to the ArangoDB dev team and they had mentioned that it apparently requires gcc 5, however I've noticed that you had me download and compile gcc 6 and everything seemed to work fine?

(14 Aug, 14:56) smacd smacd's gravatar image

@smacd arangodb is picking libstdc++ from the the root lib64 directory. You need to clean up your build directory, execute 'export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64:$LD_LIBRARY_PATH' and then run the cmake, make, make install again.

(14 Aug, 15:05) ahmadz ♦♦ ahmadz's gravatar image

Thanks, I'll try that now. I'm also noticing that when I check gcc -v its saying gcc is version 4.8.5? Shouldn't this say 6.4.0 after having built gcc from source? Do I need to delete all my existing binaries before doing this? If so, are there other binaries I should be deleting?

Here is my current current $HOME/bin directory:

aot-compile gcc-nm gjavah x86_64-pc-linux-gnu-c++ c++ gcc-ranlib gkeytool x86_64-pc-linux-gnu-g++ ccmake gcj gnative2ascii x86_64-pc-linux-gnu-gcc cmake gcj-dbtool gorbd x86_64-pc-linux-gnu-gcc-6.4.0 cpack gcjh grmic x86_64-pc-linux-gnu-gcc-ar cpp gcov grmid x86_64-pc-linux-gnu-gcc-nm ctest gcov-dump grmiregistry x86_64-pc-linux-gnu-gcc-ranlib g++ gcov-tool gserialver x86_64-pc-linux-gnu-gcj gappletviewer gfortran gtnameserv x86_64-pc-linux-gnu-gfortran gc-analyze gij jcf-dump gcc gjar jv-convert gcc-ar gjarsigner rebuild-gcj-db

(14 Aug, 15:12) smacd smacd's gravatar image

Thanks for all your help @ahmadz. I've got ArangoDB successfully compiled and am just trying to figure out how to get all the configuration options to play nicely in WebFaction's environment.

(14 Aug, 18:57) smacd smacd's gravatar image
showing 5 of 9 show 4 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Aug, 00:44

question was seen: 83 times

last updated: 14 Aug, 18:57