earthenterprise
earthenterprise copied to clipboard
Build Instructions for Centos6 debug are incorrect
Currently, the build instructions for CentOS 6 are incorrect. The issues that need to be corrected in BUILD_RHEL_CentOS.md
- when installing gcc 4.8,
source /opt/rh/devtoolset-2/enable
should be executed in the same manner as RHEL6 - when installing Gtest,
envsubst
is not available by default and must be installed viasudo yum -y install gettext gettext-devel gettext-libs
The build instructions should be modified to reflect this.
Also, when performing a debug build (scons -j8 internal=1 build
):
-
scons
does not recognize the correct version of gcc (or gcc at all), perhaps pertaining to thesource
command above -
scons
is not able to find gtest (gtest-all.cc
)
@justrandyc this is the issue I mentioned eariler, I provided as much information as I have
The gcc 4.8 issue is a red herring. I didn't do the source on centos6 and my gcc was fine, the correct issue is below.
The gtest issue around envsubst I agree with, it should indeed be called out as a dependency and installed prior to building/installing the gtest package.
I also noticed several places where a "sudo" would be appropriate to add to the instructions
Edited I got it to build.
I followed the instructions (including the RHEL6 Source command)) but did some steps after the Installing Additional Packages step:
1st: I installed gcc-c++ (sudo yum install gcc-c++
)
Even though it is installed in devtoolset-2, it looks for g++ in /usr/bin. And when scons doesn't find it, it passes a NoneType around in python, and causes it to error out (calls its rfind method, which doesn't exist). But when it is in /usr/bin, we get around that.
2nd: I installed gettext to get the envsubst command (sudo yum install gettext
) as Basil said.
This is needed to properly install GTest.
3: I installed doxygen (sudo yum install doxygen
).
This is needed for gdal apparently.
4: I Installed swig (sudo yum install swig
)
I don' know if it was just missing intentionally.
5: I added env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME']=1
right after the declaration of env
in both earthenterprise/earth_enterprise/SConstruct and earthenterprise/earth_enterprise/src/SConstruct
This avoids an issue with a static object trying to be added to a shared object.
None of this represents how to fix the issues, but at least we can build if necessary.
Found a similar issue on RHEL6. Was able to build after installing doxygen, swig, and gcc-c++.
Just ran into one of these problems trying to do a release build on CentOS 6. I was following the updated instructions in PR #1134 , and scons could not find /usr/src/gtest/src/gtest-all.cc
right out of the gate. gtest appeared to build and install correctly.
I was not able to get past this issue with release=1
, and switched to insternal=1
, which somehow gets past this(?).
The complete output of my build is below:
earth_enterprise]$ scons -j8 release=1 build
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cd src; scons -j8 release=1 third_party
scons: Reading SConscript files ...
OS is not Ubuntu
Checking for C library gtest... (cached) no
Checking for C header file libpng12/png.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [NATIVE-REL-x86_64/src/gtest-all.so] Source `/usr/src/gtest/src/gtest-all.cc' not found, needed by target `NATIVE-REL-x86_64/src/gtest-all.so'.
scons: building terminated because of errors.
scons: *** [build] Error 2
scons: building terminated because of errors.