Compiling SciDB on ScientificLinux6.2


#1

Hello,

I’m trying to compile SciDB-12.3.0 on ScientificLinux-6.2 (a RedHat like distribution), and i’ve got some minor problems that i’ve already fixed (see below).

But i’ve still got some problems that i can’t fix easilly :

1. libpqxx

libpqxx doesn’t seem to be packaged for RedHat-like distributions, and

give nothing (here /opt/scidb is issued from your rpm file : scidb-RelWithDebInfo-12.3.0.4813-Snowdrop-final-RedHat-5.4-x86_64.rpm ), so i suppose that on RedHat, lipqxx is statically linked with scidb (like it is done for log4cxx) ?

But it doesn’t seem to be taken in charge by your cmake files :

(*.0 file is the scidb original source file, and the other is mine)

[code]diff ./src/system/catalog/CMakeLists.txt.0 ./src/system/catalog/CMakeLists.txt
32c32
< target_link_libraries(catalog_lib pqxx)

target_link_libraries(catalog_lib ${LIBPQXX_LIBRARY})[/code]
In the first case, it seems it was libpqxx.so which should be linked ? So how do you do to build it on RedHat, which doesn’t propose nativelly this libpqxx.so ?
In addition, ./cmake/Modules/FindLibPQXX.cmake doesn’t seems to take static linking in charge.

2. rpm building with cpack (make package) :

Furthermore, i use cmake 2.6-patch 4, and i’ve got next problem while trying to package scidb (make package) :

[code][scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ cat ./_CPack_Packages/Linux/RPM/rpmbuild.err

  • umask 022
  • cd /opt/src/scidb-12.3.0.4813-Snowdrop-final/_CPack_Packages/Linux/RPM/BUILD
  • LANG=C
  • export LANG
  • unset DISPLAY
  • LANG=C
  • export LANG
  • unset DISPLAY
  • exit 0
  • umask 022
  • cd /opt/src/scidb-12.3.0.4813-Snowdrop-final/_CPack_Packages/Linux/RPM/BUILD
  • ‘[’ /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64 ‘!=’ / ‘]’
  • rm -rf /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64
    ++ dirname /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64
  • mkdir -p /home/scidb/rpmbuild/BUILDROOT
  • mkdir /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64
  • LANG=C
  • export LANG
  • unset DISPLAY
  • /bin/true
    error: File not found by glob: /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64/*
    File not found by glob: /home/scidb/rpmbuild/BUILDROOT/scidb-12.3.0.4813_Snowdrop_final-1.x86_64/*[/code]

I tried to use cmake2.8, but errors also appears (cmake variables relatives to Boost version remains empty)

Thanks in advance for your help on these problems.

ALREADY FIXED PROBLEMS (for building on ScientificLinux) :

1. Take into account of Scientific Linux distrib :

diff ./cmake/Modules/LinuxDistroVersion.cmake.0 ./cmake/Modules/LinuxDistroVersion.cmake
33c33
<         string(REGEX MATCH "^(Red Hat|[a-zA-Z]*|Fedora|CentOS) ([\\.0-9]*).*" ISSUE_STRING ${ISSUE_STRING})
---
>         string(REGEX MATCH "^(Red Hat|Scientific Linux|[a-zA-Z]*|Fedora|CentOS) ([\\.0-9]*).*" ISSUE_STRING ${ISSUE_STRING})
41a42,46
>         if(${DISTRO_NAME} STREQUAL "Scientific Linux")
>             set(DISTRO_NAME "ScientificLinux")
>             string(REGEX MATCH "([0-9][.][0-9])" ISSUE_STRING ${ISSUE_STRING})
>             set(DISTRO_VER ${CMAKE_MATCH_1})
>         endif()
61c66
<         if(ISSUE_STRING MATCHES "SUSE" OR DISTRO_NAME STREQUAL "Fedora" OR DISTRO_NAME STREQUAL "RedHat" OR DISTRO_NAME STREQUAL "CentOS")
---
>         if(ISSUE_STRING MATCHES "SUSE" OR DISTRO_NAME STREQUAL "Fedora" OR DISTRO_NAME STREQUAL "RedHat" OR DISTRO_NAME STREQUAL "ScientificLinux" OR DISTRO_NAME STREQUAL "CentOS")
diff ./tests/harness/CMakeLists.txt.0 ./tests/harness/CMakeLists.txt
58c58
< if(NOT (${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]"))
---
> if(NOT (${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "ScientificLinux-[0-9][.][0-9]"))[/code]

[code]
diff ./src/capi/CMakeLists.txt.0 ./src/capi/CMakeLists.txt
99c99
< 	if(NOT (${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "SUSE"))
---
> 	if(NOT (${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "ScientificLinux-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "SUSE"))
[/code]

[b]2. update of dependencies in ./dependencies.json :[/b]

[code]diff ./dependencies.json.0 ./dependencies.json
114a115,142
> "ScientificLinux":
> {
>     "packaging_tool":"rpm",
>     "scidb":
>     {
>         "#": { "libscidbclient": ">= ${scidbver}" },
>         "postgresql-libs": ">= ${targetver}",        
>         "python-paramiko": ">= ${targetver}",
>         "python-crypto": ">= ${targetver}"        
>     },
> 
>     "libscidbclient":
>     {
>         "bzip2-libs": ">= ${targetver}",
>         "zlib": ">= ${targetver}"
>     },
> 
>     "libscidbclient_python":
>     {
>         "#": { "libscidbclient": ">= ${scidbver}" },
>         "python": ">= ${targetver}"
>     },
> 
>     "scidb-dbg": { "#": { "scidb": ">= ${scidbver}" } },
>     "libscidbclient-dbg": { "#": { "libscidbclient": ">= ${scidbver}" } },
>     "libscidbclient_python-dbg": { "#": { "libscidbclient_python": ">= ${scidbver}" } }
> },
>

3. static link of libpqxx :

new ./cmake/Modules/FindLibPQXX.cmake (inspired from ./cmake/Modules/FindLog4CXX.cmake)

[code]########################################

BEGIN_COPYRIGHT

This file is part of SciDB.

Copyright © 2008-2011 SciDB, Inc.

SciDB is free software: you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation, either version 3 of the License, or

(at your option) any later version.

SciDB is distributed “AS-IS” AND WITHOUT ANY WARRANTY OF ANY KIND,

INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,

NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. See

the GNU General Public License for the complete license terms.

You should have received a copy of the GNU General Public License

along with SciDB. If not, see http://www.gnu.org/licenses/.

END_COPYRIGHT

########################################

Try to find libpqxx

Once done this will define

LIBPQXX_FOUND - TRUE if libpqxx found

LIBPQXX_INCLUDE_DIRS - Where to find libpqxx include sub-directory

LIBPQXX_LIBRARIES - List of libraries when using libpqxx

Use -DLIBPQXX_USE_STATIC_LIBS=ON when cmake to enable static linkage of libpqxx

check cache

IF(LIBPQXX_INCLUDE_DIRS)
SET(LIBPQXX_FIND_QUIETLY TRUE)
ENDIF(LIBPQXX_INCLUDE_DIRS)

SET( _LIBPQXX_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF( LIBPQXX_USE_STATIC_LIBS )
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF( LIBPQXX_USE_STATIC_LIBS )

find includes and libraries

FIND_PATH(LIBPQXX_INCLUDE_DIRS pqxx/connection.hxx)
FIND_LIBRARY(LIBPQXX_LIBRARY pqxx)

SET( CMAKE_FIND_LIBRARY_SUFFIXES ${_LIBPQXX_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})

standard handling

INCLUDE(FindPackageHandleStandardArgs)

message("DEBUG libpqxx FIND_PACKAGE_HANDLE_STANDARD_ARGS : " ${LibPQXX} " " ${LIBPQXX_LIBRARY} " " ${LIBPQXX_INCLUDE_DIRS})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibPQXX DEFAULT_MSG LIBPQXX_LIBRARY LIBPQXX_INCLUDE_DIRS)

IF(LIBPQXX_FOUND)
SET(LIBPQXX_LIBRARIES ${LIBPQXX_LIBRARY})
ELSE(LIBPQXX_FOUND)
SET(LIBPQXX_LIBRARIES)
ENDIF(LIBPQXX_FOUND)

mark cache

MARK_AS_ADVANCED(LIBPQXX_LIBRARIES LIBPQXX_INCLUDE_DIRS)
message(STATUS “LIBPQXX - ${LIBPQXX_LIBRARIES}”)[/code]

[code]diff ./tests/unit/CMakeLists.txt.0 ./tests/unit/CMakeLists.txt
26c26
< target_link_libraries(unit_tests pqxx)

target_link_libraries(unit_tests ${LIBPQXX_LIBRARY}) [/code]
diff ./src/system/catalog/CMakeLists.txt.0 ./src/system/catalog/CMakeLists.txt
32c32
< target_link_libraries(catalog_lib pqxx)
---
> target_link_libraries(catalog_lib ${LIBPQXX_LIBRARY})[/code]

[b]4. Change of version name  :[/b]

"-" char cause a rpmbuild error with message : "Illegal '-' char in version: ...", so i replaced them with "_"

[code]diff ./CMakeLists.txt.0 ./CMakeLists.txt
30c30
< set(SCIDB_VERSION_CODENAME "Snowdrop-final")
---
> set(SCIDB_VERSION_CODENAME "Snowdrop_final")
35c35
< set(PACKAGE_NAME "scidb-${SCIDB_SHORT_VERSION}")
---
> set(PACKAGE_NAME "scidb_${SCIDB_SHORT_VERSION}")
137c137
< if(${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "SUSE")
---
> if(${DISTRO_NAME_VER} MATCHES "RedHat-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "ScientificLinux-[0-9][.][0-9]" OR ${DISTRO_NAME_VER} MATCHES "SUSE")
139a140
>     set(LIBPQXX_USE_STATIC_LIBS ON)

[code]
diff install.cmake.0 install.cmake
29c29
< set(CPACK_PACKAGE_VERSION ${SCIDB_VERSION_MAJOR}.${SCIDB_VERSION_MINOR}.${SCIDB_VERSION_PATCH}.${SCIDB_REVISION}-${SCIDB_VERSION_CODENAME})

set(CPACK_PACKAGE_VERSION ${SCIDB_VERSION_MAJOR}.${SCIDB_VERSION_MINOR}.${SCIDB_VERSION_PATCH}.${SCIDB_REVISION}_${SCIDB_VERSION_CODENAME})[/code]

#2

Creating a build environment for SciDB under Red Hat version 6 or Red Hat version 6-like distros is possible. We currently only have official support for the older Red Hat 5.4 release. However, we are aware of developers who have successfully built under Red Hat version 6.

  • Your first question about libpqxx: Do you have this library installed on your build machine? If you do a yum install of postgresql90-libs RPM you should get this library.
  • You will also need to install the boost packages; this is a requirement for building SciDB. yum install under SL 6 may already have latest versions of Boost.
  • You must use cmake 2.8.3 of newer – please check that you have something recent for this. Else, you should download, build and install from cmake sources. This is not difficult.

Again, most of the complexity is in ensuring that the correct versions of required packages are present on the system before doing a SciDB build.

If these are not helpful in resolving your build issues, please provide some more information (e.g, error logs from particular build commands) and we will investigate further.


#3

Thanks for your quick help. Nevertheless, I thinks all required package are installed, because launching “make” command succeed. It’s make package which now fails.

1. postgresql90-libs doesn’t seem to be available on ScientificLinux6 (despite 'ive enabled three well-know additional repositories : atrms, epel and rpm-forge) :

[root@localhost ~]# yum install postgresql90-libs Loaded plugins: refresh-packagekit, security Setting up Install Process No package postgresql90-libs available. Error: Nothing to do

and my version of postgresql-libs doesn’t contain any pqxx libs

rpm -ql postgresql-libs-8.4.12-1.el6_2.x86_64 /usr/lib64/libecpg.so.6 /usr/lib64/libecpg.so.6.1 /usr/lib64/libecpg_compat.so.3 /usr/lib64/libecpg_compat.so.3.1 /usr/lib64/libpgtypes.so.3 /usr/lib64/libpgtypes.so.3.1 /usr/lib64/libpq.so.5 /usr/lib64/libpq.so.5.2 /usr/share/doc/postgresql-libs-8.4.12 ...

That’s why i had of course previously manually installed libpqxx as described here (launching “make” command on scidb sources failed before doing that) :

cd /opt/tarballs sudo wget http://pqxx.org/download/software/libpqxx/libpqxx-3.1.tar.gz cd /opt/src tar -xvf /opt/tarballs/libpqxx-3.1.tar.gz cd /opt/tarballs/libpqxx-3.1 ./configure --prefix=/opt/ --enable-shared make sudo make install

And i’ve also modified scidb-12.3.0.4813-Snowdrop-final/cmake/Modules/FindLibPQXX.cmake in order to allow linking with a static library.
This seems to work fine for me : with cmake-2.6 “make” command succeed. This is “make package” wich fails.

2. According that “make” succeed, i think Boost is already installed :

Furthermore :

rpm -qa "*boost*" boost-test-1.41.0-11.el6_1.2.x86_64 boost-1.41.0-11.el6_1.2.x86_64 boost-filesystem-1.41.0-11.el6_1.2.x86_64 boost-devel-1.41.0-11.el6_1.2.x86_64 boost-date-time-1.41.0-11.el6_1.2.x86_64 boost-signals-1.41.0-11.el6_1.2.x86_64 boost-system-1.41.0-11.el6_1.2.x86_64 boost-program-options-1.41.0-11.el6_1.2.x86_64 boost-iostreams-1.41.0-11.el6_1.2.x86_64 boost-serialization-1.41.0-11.el6_1.2.x86_64 boost-python-1.41.0-11.el6_1.2.x86_64 boost-regex-1.41.0-11.el6_1.2.x86_64 boost-thread-1.41.0-11.el6_1.2.x86_64 boost-wave-1.41.0-11.el6_1.2.x86_64 boost-graph-1.41.0-11.el6_1.2.x86_64

Are something boost libraries missing ?

3. Here’s my output with cmake 2.6-patch 4 : all seems fine but “make package” command will fail producing rpmbuild.err logfile (previously given in my fist post).
(here I use the script on which i’ve added some debug messages and static link support for libpqxx.)

[scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ /usr/bin/cmake . -- 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/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- CMAKE_INSTALL_PREFIX Initialized to default setting to: /opt/scidb/12.3 -- Reading revision from file: 4813 -- Build type (use -DCMAKE_BUILD_TYPE=[RelWithDebInfo]/Debug/Release/Profile/CC): DISTRO_NAME_VER is ScientificLinux-6.2 -- This is Red Hat based distro and we switch on static building for some libs -- Boost version: 1.41.0 -- Found the following Boost libraries: -- system -- program_options -- serialization -- regex -- filesystem -- thread -- Found Protobuf: /usr/include/google/protobuf -- GPB - /usr/lib64/libprotobuf.so find log4cxx: static find log4cxx: static/opt/lib/liblog4cxx.a/usr/lib64/libapr-1.so/usr/lib64/libaprutil-1.so/usr/lib64/libexpat.a DEBUG log4cxx FIND_PACKAGE_HANDLE_STANDARD_ARGS : /opt/lib/liblog4cxx.a/usr/lib64/libapr-1.so/usr/lib64/libaprutil-1.so/usr/lib64/libexpat.a /opt/include -- Found Log4CXX: /opt/lib/liblog4cxx.a;/usr/lib64/libapr-1.so;/usr/lib64/libaprutil-1.so;/usr/lib64/libexpat.a -- LOG4CXX - /opt/lib/liblog4cxx.a;/usr/lib64/libapr-1.so;/usr/lib64/libaprutil-1.so;/usr/lib64/libexpat.a -- Found Doxygen: /usr/bin/doxygen DEBUG libpqxx FIND_PACKAGE_HANDLE_STANDARD_ARGS : /opt/lib/libpqxx.a /opt/include -- Found LibPQXX: /opt/lib/libpqxx.a -- LIBPQXX - /opt/lib/libpqxx.a -- Found LibPQ: /usr/bin/pg_config -- Found LibPQ: /usr/lib64 -- checking for module 'cppunit' -- found cppunit, version 1.12.1 -- Found LibRT: /usr/lib64/librt.so -- Found PythonLibs: /usr/lib64/python2.6/config/libpython2.6.so -- 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 -- LIBREADLINE_STATIC is ON -- Found LibReadline: /usr/lib64/libreadline.so -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found XSLTPROC: /usr/bin/xsltproc -- Found FOP: /usr/bin/fop -- Could NOT find docbook.xsl (missing: DOCBOOK_XSL_FILE) -- Found PythonInterp: /usr/bin/python2.6 -- Looking for malloc_stats -- Looking for malloc_stats - found -- SWIG 2 and Python found. Python module will built -- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/Constants.cpp.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/Constants.cpp -- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/System.h.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/System.h -- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/util/scidb-sample.conf.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/bin/packaging_only/scidb-sample.conf -- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/doc/api/Doxyfile.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/doc/api/Doxyfile -- Documentation will not be generated automatically. Use -DSCIDB_DOC_TYPE={NONE,FULL,API} to set type of generated documentation. Use make doc to generate FULL documentation manually. -- CTest cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work. -- Dependencies which will be used during packaging component libscidbclient: zlib >= 1.2.3, bzip2-libs >= 1.0.5 -- Dependencies which will be used during packaging component scidb: postgresql-libs >= 8.4.12, libscidbclient >= 12.3, python-crypto >= 2.0.1, python-paramiko >= 1.7.6 -- Dependencies which will be used during packaging component libscidbclient_python: python >= 2.6.6, libscidbclient >= 12.3 -- Dependencies which will be used during packaging component libscidbclient-dbg: libscidbclient >= 12.3 -- Dependencies which will be used during packaging component scidb-dbg: scidb >= 12.3 -- Dependencies which will be used during packaging component libscidbclient_python-dbg: libscidbclient_python >= 12.3 -- Configuring done -- Generating done -- Build files have been written to: /opt/src/scidb-12.3.0.4813-Snowdrop-final

All seems fine, and “make” succeed, but “make package” fails with next message :

...
[ 98%] Built target operators
[100%] Built target fits
Run CPack packaging tool...
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: SciDB
CPack: - Install project: SciDB
CPack: Compress package
CPack: Finalize package
CPack Error: Problem copying the package: /opt/src/scidb-12.3.0.4813-Snowdrop-final/_CPack_Packages/Linux/RPM/scidb-RelWithDebInfo-12.3.0.4813_Snowdrop_final-ScientificLinux-6.2-x86_64.rpm to /opt/src/scidb-12.3.0.4813-Snowdrop-final/scidb-RelWithDebInfo-12.3.0.4813_Snowdrop_final-ScientificLinux-6.2-x86_64.rpm
CPack Error: Error when generating package: scidb
make: *** [package] Error 1[/code]

Furthermore, here's my output with cmake 2.8.8 :

[code][scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ rm CMakeCache.txt
[scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ /usr/bin/cmake28  .
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CMAKE_INSTALL_PREFIX Initialized to default setting to: /opt/scidb/12.3
-- Found Subversion: /usr/bin/svn (found version "1.6.11") 
-- Found Git: /usr/bin/git (found version "1.7.1") 
-- Reading revision from file: 4813
-- Build type (use -DCMAKE_BUILD_TYPE=[RelWithDebInfo]/Debug/Release/Profile/CC): 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23") 
DISTRO_NAME_VER is ScientificLinux-6.2
-- This is Red Hat based distro and we switch on static building for some libs
Boost  found.
Found Boost components:
   system;program_options;serialization;regex;filesystem;thread
-- Found Protobuf: /usr/include/google/protobuf  
-- GPB - /usr/lib64/libprotobuf.so
find log4cxx: static
find log4cxx: static/opt/lib/liblog4cxx.a/usr/lib64/libapr-1.so/usr/lib64/libaprutil-1.so/usr/lib64/libexpat.a
DEBUG log4cxx FIND_PACKAGE_HANDLE_STANDARD_ARGS :  /opt/lib/liblog4cxx.a/usr/lib64/libapr-1.so/usr/lib64/libaprutil-1.so/usr/lib64/libexpat.a /opt/include
-- Found Log4CXX: /opt/lib/liblog4cxx.a;/usr/lib64/libapr-1.so;/usr/lib64/libaprutil-1.so;/usr/lib64/libexpat.a  
-- LOG4CXX - /opt/lib/liblog4cxx.a;/usr/lib64/libapr-1.so;/usr/lib64/libaprutil-1.so;/usr/lib64/libexpat.a
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1") 
DEBUG libpqxx FIND_PACKAGE_HANDLE_STANDARD_ARGS :  /opt/lib/libpqxx.a /opt/include
-- Found LibPQXX: /opt/lib/libpqxx.a  
-- LIBPQXX - /opt/lib/libpqxx.a
-- Found LibPQ: /usr/bin/pg_config  
-- Found LibPQ: /usr/lib64  
-- checking for module 'cppunit'
--   found cppunit, version 1.12.1
-- Found LibRT: /usr/lib64/librt.so  
-- Could NOT find SWIG: Found unsuitable version "1.3.40", but required is at least "2.0" (found /usr/bin/swig)
-- Found PythonLibs: /usr/lib64/libpython2.6.so (found version "2.6.6") 
CMake Warning at CMakeLists.txt:183 (message):
  SWIG 2 and Python headers required for building Python API bindings.  You
  can set proper SWIG executable with argument
  -DSWIG_EXECUTABLE=/path/to/swig2.0


-- Found FLEX: /usr/bin/flex  
-- Found BISON: /usr/bin/bison  
-- Found SED: /bin/sed  
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3") 
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.5") 
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- LIBREADLINE_STATIC is ON
-- Found LibReadline: /usr/lib64/libreadline.so  
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found.
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found XSLTPROC: /usr/bin/xsltproc  
-- Found FOP: /usr/bin/fop  
-- Could NOT find docbook.xsl (missing:  DOCBOOK_XSL_FILE) 
-- Found PythonInterp: /usr/bin/python (found version "2.6.6") 
-- Looking for malloc_stats
-- Looking for malloc_stats - found
-- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/Constants.cpp.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/Constants.cpp
-- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/System.h.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/system/System.h
-- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/src/util/scidb-sample.conf.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/bin/packaging_only/scidb-sample.conf
-- Configuring /opt/src/scidb-12.3.0.4813-Snowdrop-final/doc/api/Doxyfile.in as /opt/src/scidb-12.3.0.4813-Snowdrop-final/doc/api/Doxyfile
-- Documentation will not be generated automatically. Use -DSCIDB_DOC_TYPE={NONE,FULL,API} to set type of generated documentation. Use make doc to generate FULL documentation manually.
CMake Error at tests/harness/CMakeLists.txt:26 (if):
  if given arguments:

    "LESS" "2" "AND" "LESS" "46"

  Unknown arguments specified


-- Configuring incomplete, errors occurred!

Here, the error seems to be caused because the information relative to Boost version isn’t found. Nevertheless, Boost seems to be found. This problem prevent Makefiles generation.
I hadn’t this error message with cmake-2.6.

Finally, if i lauch cmake 2.6, keep the CMakeCache.txt, and then launch cmake 2.8, “make package” seems to partially succeed : scidb-RelWithDebInfo-12.3.0.4813_Snowdrop_final-ScientificLinux-6.2-x86_64.rpm is created.

P.S. : For additionnal information, here’s the output message produced by launching cmake28 on original file (with no libpqxx and other patches on *.cmake files) :

[code][scidb@localhost scidb-12.3.0.4813-Snowdrop-final.orig]$ cmake28 .
– The C compiler identification is GNU 4.4.6
– The CXX compiler identification is GNU 4.4.6
– 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/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– CMAKE_INSTALL_PREFIX Initialized to default setting to: /opt/scidb/12.3
– Found Subversion: /usr/bin/svn (found version “1.6.11”)
– Found Git: /usr/bin/git (found version “1.7.1”)
– Reading revision from file: 4813
– Build type (use -DCMAKE_BUILD_TYPE=[RelWithDebInfo]/Debug/Release/Profile/CC):
– Found PkgConfig: /usr/bin/pkg-config (found version “0.23”)
DISTRO_NAME_VER is Scientific-
Boost found.
Found Boost components:
system;program_options;serialization;regex;filesystem;thread
– Found Protobuf: /usr/include/google/protobuf
– GPB - /usr/lib64/libprotobuf.so
– Found Log4CXX: /opt/lib/liblog4cxx.so
– LOG4CXX - /opt/lib/liblog4cxx.so
– Found Doxygen: /usr/bin/doxygen (found version “1.6.1”)
CMake Error at /usr/share/cmake28/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find LibPQXX (missing: LIBPQXX_LIBRARY_DIRS LIBPQXX_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake28/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLibPQXX.cmake:110 (find_package_handle_standard_args)
CMakeLists.txt:154 (find_package)

– Configuring incomplete, errors occurred!
[/code]

Thanks in advance for your help.


#4

I’ve solved the problem with boost, and cmake 2.8 by adding next modification to CMakeLists.txt

[code][scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ diff CMakeLists.txt.0 CMakeLists.txt
26a27,28

set(Boost_DEBUG 1)

30c32
< set(SCIDB_VERSION_CODENAME “Snowdrop-final”)

set(SCIDB_VERSION_CODENAME “Snowdrop_final”)
35c37
< set(PACKAGE_NAME “scidb-${SCIDB_SHORT_VERSION}”)


set(PACKAGE_NAME “scidb_${SCIDB_SHORT_VERSION}”)
144a147,153
if(${DISTRO_NAME_VER} MATCHES “ScientificLinux-[0-9][.][0-9]”)
set(LOG4CXX_USE_STATIC_LIBS ON)
set(PROTOBUF_USE_STATIC_LIBS ON)
set(LIBREADLINE_STATIC ON)
message(STATUS “This is Scientific Linux, a Red Hat based distro and we switch on static building for some libs”)
endif()

149a159,160

boost-cmake is deprecated : see https://svn.boost.org/trac/boost/wiki/CMake

set (Boost_NO_BOOST_CMAKE TRUE)
150a162,164
message("DEBUG " ${Boost_VERSION})
message("DEBUG " ${Boost_MAJOR_VERSION})
[/code]

Please note that :
Boost_USE_STATIC_LIBS should be set to it’s default value, which is OFF, as cmake-2.8 wil only search for *.a files, and not *.so, if it’s setted to ON.
cf. /usr/share/cmake28/Modules/FindBoost.cmake at line 917 :

These modifications allow make and make package to work successfully.

But now i’ve got now a problem with SWIG :

[scidb@localhost scidb-12.3.0.4813-Snowdrop-final]$ cmake28 . ... -- Could NOT find SWIG: Found unsuitable version "1.3.40", but required is at least "2.0" (found /usr/bin/swig) CMake Warning at CMakeLists.txt:196 (message): SWIG 2 and Python headers required for building Python API bindings. You can set proper SWIG executable with argument -DSWIG_EXECUTABLE=/path/to/swig2.0 ...

But SWIG-2.0 rpm doesn’t seems to be available for RHEL6, and consequently for ScientificLinux6.2.

Would you have an idea on how to solve the SWIG problem ? Maybe be installing locally SWIG-2.0 ? Nothing is told about SWIG in doc/build.txt

Thanks in advance for your answer.
Could you take in account my updates to CMakeLists.txt in your next release please ?