Install on Red Hat ES 5.4 (x86_64)


#1

Hello all,

I’m currently trying to build SciDB on our department’s Red Hat Enterprise Server 5.4 cluster, but I’ve run into an error that I can’t figure out:

[ 11%] Building CXX object src/services/network/proto/CMakeFiles/scidb_msg_lib.dir/scidb_msg.pb.cc.o
/home/wisemana/include/google/protobuf/io/coded_stream.h: In member function ‘bool google::protobuf::io::CodedInputStream::ReadLittleEndian32(google::protobuf::uint32*)’:
/home/wisemana/include/google/protobuf/io/coded_stream.h:776: warning: comparison between signed and unsigned integer expressions
/home/wisemana/include/google/protobuf/io/coded_stream.h: In member function ‘bool google::protobuf::io::CodedInputStream::ReadLittleEndian64(google::protobuf::uint64*)’:
/home/wisemana/include/google/protobuf/io/coded_stream.h:791: warning: comparison between signed and unsigned integer expressions
/home/wisemana/include/google/protobuf/wire_format_lite.h: At global scope:
/home/wisemana/include/google/protobuf/wire_format_lite.h:94: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/wire_format_lite.h:117: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/wire_format_lite.h:132: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:303: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:304: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:305: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:306: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:307: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format_lite_inl.h:308: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:322: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/descriptor.h:341: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/descriptor.h:352: error: comma at end of enumerator list
/home/wisemana/include/google/protobuf/descriptor.h:1206: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1223: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1243: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1249: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1257: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1264: error: extra ‘;’
/home/wisemana/include/google/protobuf/descriptor.h:1274: error: extra ‘;’
/home/wisemana/include/google/protobuf/wire_format.h:226: error: comma at end of enumerator list
make[2]: *** [src/services/network/proto/CMakeFiles/scidb_msg_lib.dir/scidb_msg.pb.cc.o] Error 1
make[1]: *** [src/services/network/proto/CMakeFiles/scidb_msg_lib.dir/all] Error 2
make: *** [all] Error 2

Since this is a departmental server, I don’t have root access to install SciDB or its dependencies in the system’s directories. I’m working from the constraint of having to build them all in my home directory. As far as I can tell, this has been successful and the code in the files its complaining about looks correct to me, so I’m at a loss for what the problem might be.

For references sake, here is the output from cmake when I’m configuring the build:

[wisemana@head scidb-0.7.5.1557]$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/wisemana -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DUPDATE_TYPE=svn .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build type (use -DCMAKE_BUILD_TYPE=[RelWithDebInfo]/Debug/Release/Profile/CC): Release
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   system
--   program_options
--   serialization
-- Found protobuf: /home/wisemana/include/google/protobuf
-- Found LOG4CXX: /home/wisemana/lib/liblog4cxx.so
-- Found Doxygen: /usr/bin/doxygen
-- LIBPQXX is found. LIBPQXX_INCLUDE_DIRS=/home/wisemana/include, LIBPQXX_LIBRARY_DIRS=/home/wisemana/lib
-- Found LIBPQ: /home/wisemana/bin/pg_config
-- Found LIBPQ: /home/wisemana/lib
-- checking for module 'cppunit'
--   package 'cppunit' not found
-- Found FLEX: /usr/bin/flex
-- Found BISON: /usr/bin/bison
-- Found SED: /bin/sed
-- Found ZLIB: /usr/lib64/libz.so
-- Found BZip2: /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Configuring /home/wisemana/downloads/scidb-0.7.5.1557/src/common/src/Constants.cpp.in as /home/wisemana/downloads/scidb-0.7.5.1557/src/common/src/Constants.cpp
-- Configuring /home/wisemana/downloads/scidb-0.7.5.1557/src/common/scidb-sample.conf.in as /home/wisemana/downloads/scidb-0.7.5.1557/bin/packaging_only/scidb-sample.conf
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   filesystem
--   thread
--   regex
-- Can not find cppunit library or headers. Unit tests will not build!
-- Configuring /home/wisemana/downloads/scidb-0.7.5.1557/doc/Doxyfile.in as /home/wisemana/downloads/scidb-0.7.5.1557/doc/Doxyfile
-- Dependencies which will be used during packaging: libbz2-1.0 (>=1.0.5), libboost-program-options1.40.0 (>=1.40.0), libboost-serialization1.40.0 (>=1.40.0), libboost-system1.40.0 (>=1.40.0), libpqxx-3.0 (>=3.0.2), libprotobuf6 (>=2.3.0), zlib1g (>=1:1.2.3.3.dfsg), liblog4cxx10 (>=0.10.0)
-- Configuring done
CMake Warning at src/CMakeLists.txt:29 (add_executable):
  Cannot generate a safe linker search path for target scidb because files in
  some directories may conflict with libraries in implicit directories:

    link library [libboost_program_options.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_serialization.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib

  Some of these libraries may not be found correctly.


CMake Warning at src/capi/CMakeLists.txt:32 (add_library):
  Cannot generate a safe linker search path for target scidbclient because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libboost_program_options.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_serialization.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib

  Some of these libraries may not be found correctly.


CMake Warning at utils/iquery/CMakeLists.txt:32 (add_executable):
  Cannot generate a safe linker search path for target iquery because files
  in some directories may conflict with libraries in implicit directories:

    link library [libboost_program_options.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_serialization.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib

  Some of these libraries may not be found correctly.


CMake Warning at tests/harness/CMakeLists.txt:26 (add_executable):
  Cannot generate a safe linker search path for target scidbtest because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libboost_program_options.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_serialization.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_filesystem.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_thread.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_regex.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib

  Some of these libraries may not be found correctly.


CMake Warning at tests/harness/CMakeLists.txt:52 (add_executable):
  Cannot generate a safe linker search path for target scidbtestharness
  because files in some directories may conflict with libraries in implicit
  directories:

    link library [libboost_program_options.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_serialization.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_filesystem.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_thread.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib
    link library [libboost_regex.so] in /usr/lib64 may be hidden by files in:
      /home/wisemana/lib

  Some of these libraries may not be found correctly.


-- Generating done
-- Build files have been written to: /home/wisemana/downloads/scidb-0.7.5.1557

I’m hoping that the warnings are innocuous and are likely caused by my installing boost in my home directory. cmake was not finding the ‘libboost_system’ library in the system installation.

Also, it had been raising this complaint as well:

-- Dependencies during package building will not be used because of file '/home/wisemana/downloads/scidb-0.7.5.1557/cpack-deps/Red-' don't exists!

So I copied the ‘cpack-deps/Ubuntu-10.10’ file to ‘cpack-deps/Red-’. I’ve no idea if the file contains correct requirements for my distribution, though. This is its contents:

libbz2-1.0 (>=1.0.5), libboost-program-options1.40.0 (>=1.40.0), libboost-serialization1.40.0 (>=1.40.0), libboost-system1.40.0 (>=1.40.0), libpqxx-3.0 (>=3.0.2), libprotobuf6 (>=2.3.0), zlib1g (>=1:1.2.3.3.dfsg), liblog4cxx10 (>=0.10.0)

Here is the version information for the compilers involved:

[wisemana@head scidb-0.7.5.1557]$ g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)

[wisemana@head scidb-0.7.5.1557]$ cmake --version
cmake version 2.6-patch 4

Thanks for your time


#2

Hi!

We don’t support Red Hat builds on 0.75, sorry. The list of differences between Ubuntu and Red Hat is small, but sufficiently irritating that we decided to push 0.75 out (to get it into people’s hands) on Ubuntu only and fix the Red Hat issues later.

But a little bird tells me that you got this working yourself. Care to share what you did?

KR

Pb

#3

I built from the trunk (r2388, I think) on RHEL 5.6 (Tikanga).

I’d be happy to post a more detailed recipe beyond the summary below. Is there a wiki for community documentation? I feel like a wiki would be the appropriate place.

I also have a hack/fix for cmake/Modules/FindLibReadline.cmake that is needed on platforms (e.g. RHEL) where “-lreadline” is not enough to link in readline support.

In general, you can install these from yum:
cmake
protobuf, protobuf-devel, protobuf-compiler
cppunit, cppunit-devel
apr, apr-devel, apr-util

And you need to build (configure/make/make install) these on your own:
log4cxx (0.10.0)
boost (1.46.1)
flex (2.5.35)
libpqxx (3.1) (compile with -fPIC)
postgresql [includes libpq] (9.0.3)

You need to put the bin for your freshly-built pg_config in your PATH so that SciDB’s cmake can pick it up. And you need to patch the settings for flex after running cmake, because it insists on choosing the system-installed flex. I don’t know if there’s a way to do this other than via ccmake.

-Daniel


#4

FYI, here’s the diff for the hack/patch for cmake/Modules/FindLibReadline.cmake

Index: cmake/Modules/FindLibReadline.cmake
===================================================================
--- cmake/Modules/FindLibReadline.cmake (revision 2357)
+++ cmake/Modules/FindLibReadline.cmake (working copy)
@@ -37,13 +37,30 @@
 # find includes and libraries
 FIND_PATH(READLINE_INCLUDE_DIRS readline/readline.h)
 FIND_LIBRARY(READLINE_LIBRARY readline)
+FIND_LIBRARY(TERMCAP_LIB termcap)
+FIND_LIBRARY(NCURSES_LIB ncurses)
 
 # standard handling
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(READLINE DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIRS)
 
-IF(READLINE_FOUND)
-  SET(READLINE_LIBRARIES ${READLINE_LIBRARY})
+IF(READLINE_FOUND) 
+  # readline needs one of {termcap,ncurses}.  
+  # Some distros link this dependency into libreadline, but others 
+  # (RHEL) leave the developer to do this explicitly.
+  #
+  # FIXME: Should detect this with:
+  # INCLUDE (CheckCXXSourceCompiles)
+  # CHECK_CXX_SOURCE_COMPILES(source variable)
+  IF(TERMCAP_LIB)  # Prefer termcap since it's smaller
+    SET(READLINE_LIBRARIES ${READLINE_LIBRARY} ${TERMCAP_LIB})
+  ELSE(TERMCAP_LIB)
+    IF(NCURSES_LIB)
+      SET(READLINE_LIBRARIES ${READLINE_LIBRARY} ${NCURSES_LIB})
+    ELSE(NCURSES_LIB)
+      SET(READLINE_LIBRARIES ${READLINE_LIBRARY})
+    ENDIF(NCURSES_LIB)
+  ENDIF(TERMCAP_LIB)
 ELSE(READLINE_FOUND)
   SET(READLINE_LIBRARIES)
 ENDIF(READLINE_FOUND)