Configuring arangodb failed in CentOS 5 - arangodb

I need to porting ArangoDB to centos 5 system, I have updated python to 2.7.13 and cmake to 3.91, but during cmake executing, below error message appeared
-- Will compile in hand-optimized assembler code for CRC32.
CMake Error at arangod/CMakeLists.txt:448 (target_compile_features):
target_compile_features The compiler feature "cxx_constexpr" is not known
to CXX compiler
"GNU"
version 4.1.2.
-- building for git revision:
-- Configuring incomplete, errors occurred!
does someone know how about this error?

ArangoDB requires a compiler which supports C++ 11 standard. You will need gcc 4.8 and above. The above error is informing you that your compiler does not recognise the constexpr keyword. Also please note that Centos 5 has expired as of March 2017 (https://www.centos.org/forums/viewtopic.php?t=57398) and should really not be operated anymore. However, if there really is no way around Centos 5, here is a docker container offering gcc 4.8 in Centos 5.

Related

Buildroot: cmake can't find my compiler to build a CMake project if I install cmake on my host

Running on Ubuntu 22.04 as my host build machine.
If I install cmake with sudo apt update then sudo apt install cmake or sudo apt install catkin (since catkin includes cmake), my Buildroot build using cmake no longer can find my compiler. Why?
After running make in my buildroot project, the compiler is unknown:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/gabriel/dev/repos/my_repo/output/my_board/host/bin/ccache
-- Check for working C compiler: /home/gabriel/dev/repos/my_repo/output/my_board/host/bin/ccache - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"/home/gabriel/dev/repos/my_repo/output/my_board/host/bin/ccache"
is not able to compile a simple test program.
It fails with the following output:
...
So, uninstalling cmake from my host via sudo apt remove cmake removes this problem, but then I get a new error when I run make in my Buildroot project:
CMake Error at CMakeLists.txt:8 (find_package):
By not providing "FindTinyXML2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "TinyXML2",
but CMake did not find one.
Could not find a package configuration file provided by "TinyXML2" with any
of the following names:
TinyXML2Config.cmake
tinyxml2-config.cmake
Add the installation prefix of "TinyXML2" to CMAKE_PREFIX_PATH or set
"TinyXML2_DIR" to a directory containing one of the above files. If
"TinyXML2" provides a separate development package or SDK, be sure it has
been installed.
...but at least it can find my compiler now. Here is the output just prior to the error above, showing it now can find my gcc-11 "C compiler" and g++-11 "CXX compiler":
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/gabriel/dev/repos/my_repo/output/my_board/host/bin/ccache - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/gabriel/dev/repos/my_repo/output/my_board/host/bin/ccache - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/gabriel/dev/repos/my_repo/output/my_board/build/host-rospack-2.6.2/devel
-- Using CMAKE_PREFIX_PATH: /home/gabriel/dev/repos/my_repo/output/my_board/host//opt/ros/indigo/;/home/gabriel/dev/repos/my_repo/output/my_board/host/usr
-- This workspace overlays: /home/gabriel/dev/repos/my_repo/output/my_board/host//opt/ros/indigo/
-- Found PythonInterp: /home/gabriel/dev/repos/my_repo/output/my_board/host/usr/bin/python (found version "3.8.2")
-- Using PYTHON_EXECUTABLE: /home/gabriel/dev/repos/my_repo/output/my_board/host/usr/bin/python
-- Using default Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/gabriel/dev/repos/my_repo/output/my_board/build/host-rospack-2.6.2/test_results
-- Found gtest: gtests will be built
CMake Warning at /home/gabriel/dev/repos/my_repo/output/my_board/host/opt/ros/indigo/share/catkin/cmake/test/nosetests.cmake:96 (message):
nosetests not found, Python tests can not be run (try installing package
'python3-nose')
Call Stack (most recent call first):
/home/gabriel/dev/repos/my_repo/output/my_board/host/opt/ros/indigo/share/catkin/cmake/all.cmake:147 (include)
/home/gabriel/dev/repos/my_repo/output/my_board/host/opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:4 (find_package)
-- catkin 0.6.19
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: filesystem program_options system
-- Found PythonLibs: /home/gabriel/dev/repos/my_repo/output/my_board/host/usr/lib/libpython3.8.so (found suitable version "3.8.2", minimum required is "3.8")
What's going on here? I expect it to find my compiler in both cases, but it won't if I have cmake locally installed, and I expect it to find the tinyxml2 package, but it won't, even though tinyxml2 is locally installed, as I explain here.
ros-cmake-modules contains FindTinyXML2.cmake and FindTinyXML.cmake modules. Have you installed the ros-cmake-modules package with sudo apt install ros-cmake-modules ?
Your CMAKE_PREFIX_PATH is /home/gabriel/dev/repos/my_repo/output/my_board/host//opt/ros/indigo/ and the operating system of your host build machine is Ubuntu 22.04. Ubuntu version and ROS version are co-dependent, so you have to choose a pair. ROS Noetic is the version of ROS that is compatible with Ubuntu 22.04.
You might be able to get ROS Indigo to work in Ubuntu 18.04 if you install it from source, but you'll most likely run into issues. This is because ROS distros target a specific Ubuntu version (or sometimes 2 versions). If you use a different Ubuntu version, most dependencies will have different versions as well and this will most likely lead to annoying issues. For Ubuntu 18.04, you're better off running ROS Melodic. source
In a comment to this answer you wrote that your current build system is on Ubuntu 18.04 which is going to be end of life in April, so you're moving to Ubuntu 22.04. ROS Noetic is the version of ROS that is compatible with Ubuntu 22.04 or alternatively you can install ROS 2 Humble on Ubuntu 22.04 instead of Noetic by following the instructions at Ubuntu (Debian) ROS 2 Documentation: Humble documentation.

Installing/compiling OpenFOAM on a server without admin privileges

I'm trying to install/compile OpenFOAM on a remote server. As I don't have the admin privileges I have to compile it from scratch. Following the instructions here, when I try to run
source ~/OpenFOAM/OpenFOAM-v1712/etc/bashrc
I get the error:
No completion added for /home/foobar/OpenFOAM/OpenFOAM-v1712/platforms/linux64GccDPInt32Opt/bin
I checked the ~/OpenFOAM/OpenFOAM-v1712/etc/bashrc definitely exists and it is intact. I also checked the /home/foobar/OpenFOAM/OpenFOAM-v1712/ folder and there are no such thing as platforms folder! I searched and the only place I could see a similar error message is here where the issue is old Bash. I tried bash --version returning version 4.3.48(1)-release (x86_64-pc-linux-gnu) which is more than 4.2 as seems to be required.
My system information:
When I run the uname -a command on the server this is what I get
Linux foobar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Looking into the possible required dependencies mentioned in this page, I checked the installed packages using the command apt list --installed | grep -i packageName, The packages installed are:
build-essential, flex, bison, cmake, zlib1g-dev, libboost-system-dev, libboost-thread-dev, libopenmpi-dev, openmpi-bin, gnuplot, libreadline-dev, libqt4-dev, libqt4-opengl-dev, freeglut3-dev,
And the ones not installed are:
libncurses-dev, libxt-dev, libqtwebkit-dev, libcgal-dev
which according to the installation page are not essential I suppose.
and checking the versions of the libraries installed:
mpirun --version --> (Open MPI) 1.10.2
gcc --version --> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
cmake --version --> 3.5.1
I would appreciate if could let me know
What is the problem and how I can solve it?
if not solvable, what are the alternative methods for me to have the OpenFOAM installed/compiled on the said server.
This is really embracing as it was just a wrong error! I was informed here that I could have ignored the error and go forward with compiling. Of course I couldn't compile the ParaVIEW/paraFoam as dependencies lack, but it is just a headless server without any GUI. So if you got this error just ignore it and go forwards with the compiling with:
./Allwmake
I have reported the issue here so they can fix it.
P.S. I reported this issue almost 9 month ago and now there is a new confusing message instead of the old one!
No completion added for /home/foobar/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin
... incorrect platform, or not yet compiled?

Running binaries compiled in RHEL 7 gcc 4.7 in RHEL 6

I have a bunch of libraries built in RHEL 7 using gcc 4.7. Is the following possible
1) Can the binary be executed in RHEL 6 host without re-compiling ?
2) The shared objects produced in RHEL 7 hosts with gcc 4.7 be used
on a RHEL 6 with gcc 4.4 compiler ?
What are the caveats here ?
If you won't link your binary statically, your problem would be shared libraries:
gcc usually links C programs with:
glibc -- implementation for C runtime library. RHEL 6 and 7 have different versions of that library. glibc uses symbol tagging, i.e.:
myaut#panther:/tmp> readelf -s /lib64/libc.so.6 | grep ' open#'
1679: 00000000000d8a70 90 FUNC WEAK DEFAULT 12 open##GLIBC_2.2.5
So if your program with link with function which has newer tag that is present in RHEL6, you won't be able to run your program.
libgcc_s is a GCC runtime that mostly contains functions that are not available on hardware platform (i.e. 32-bit binaries doesn't support 64-bit long long arithmetic, so they require library to do that), put it seem to be optional.
Finally, GCC 4.4 and 4.7 have compatible ABIs, so you shouldn't run into trouble due to different compilers.
If you use the GCC compiler included with the Red Hat Developer Toolset, RH guarantees that an app compiled on a major RHEL version will also run on the +1 version, e.g compile on RHEL 6 and run on either RHEL 6 or 7.
There's v4, but also GCC 5 and working on 6.
See http://developers.redhat.com/products/developertoolset/overview/

Installing an old version of gcc on linux-redhat

In order to compile an old-compiler I am using the gcc that is installed in my machine (gcc version 4.4.6).
The gcc v 4.4.6 compiler isn’t supporting some syntaxs that are in the old-compiler files and is issuing errors like : lvalue required as left operand, error: attempt to use poisoned...and so on.
the last time someone has compiled that old compiler they used gcc version 2.96.
So I downloaded some older version of gcc (3.0 – didn’t found 2.96) and try to build binaries from it.
However – my machines are x86_64 and the 3.0 compiler issuing an error :
Configuration x86_64-redhat-linux-gnu not supported
naturally - no x86_64 existed way back in those days.
any advise will be welcome.
update :
I have installed on vertualBox an old redhat version (5.7) that came with an old gcc compiler (3.4.6) and tried to compile the cross compiler.My host is - i386-redhat-linux. Now , I didn't get this message and the compilation of the cross compiler started, BUT, when it came to compile unwind-dw2.c file I got the next assembler error :
/tmp/ccAk3sX0.s: Assembler messages:
/tmp/ccAk3sX0.s:259: Error: unrecognized instruction `addi r11,low(r0,.L47),r11'
/tmp/ccAk3sX0.s:736: Error: unrecognized instruction `addi r3,low(r0,.L327),r3'
/tmp/ccAk3sX0.s:1226: Error: unrecognized instruction `addi r3,low(r0,.L317),r3'
/tmp/ccAk3sX0.s:1739: Error: unrecognized instruction `addi r3,low(r0,.L412),r3'
So I am stuck again ...
Install a really old Linux distribution in a virtual machine.
In your case it's easier to install old distribution than to to ply with the current one.
But if you have plenty of time you can try to find and install all needed dependencies. By the way risking with stability of current OS installation.

How to install/update gcc-4.6 on openSUSE 11.2 (x86_64)?

I met an err when I installed JikesRVM, that is,
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.4/libstdc++.so when searching for -lstdc++
So I am trying to install/update it to a later version. Now, the machine already has
gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839]
I am new to openSUSE, could you help?
Thanks!
You need to install 32 bit support for the GNU C/C++ compiler since JikesRVM on x86_64 currently supports only the 32 bit architecture.
To install this support in OpenSuSE 11.2 type
sudo zypper install gcc44-32bit gcc-32bit libstdc++44-devel-32bit
The first two provide runtime support for the C language and the 32-bit version of libgcc, the GCC low level runtime library. The third provides the 32-bit version of libstdc++, both the static import library and the dynamic library. It is the static libstdc++.a that was missing for JikesRVM.
To verify that the 32bit C++ build system is installed correctly you can test it with the following
echo "int main(){}" | g++ -x c++ -m32 -
Note Official support for OpenSuSE 11.2 has ended. Evergreen support will be available through 2013. Yet it is reasonable to update to 11.3 or a later version soon.

Resources