1

On a SUSE System (SLES 15) I try to configure MapServer 7.4. with Oracle-Spatial support. Important: The Oracle Database is installed on another server.

I wonder if I need also the Oracle installation on the SLES 15-server or if the Oracle client is enough? So far I installed the client at /usr/lib64/oracle/11.2.0.4.0/client/lib/

I try to configure with:

cmake .. -DCMAKE_PREFIX_PATH=/usr/lib64:/usr/share/gdal:/usr/lib64/oracle/11.2.0.4.0/client/lib -DWITH_ORACLESPATIAL=1 -DWITH_HARFBUZZ=0 -DWITH_GIF=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 -DWITH_FRIBIDI=0

but in the output I always get: CMake Error at CMakeLists.txt:73 (message): ORACLESPATIAL library/component/dependency could not be found.

Does that mean I definitely need an Oracle installation?

1

1 Answer 1

2

Alright, finally I got it.

I declared:

export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export LD_LIBRARY_PATH=${ORACLE_HOME}:/usr/lib

and in my case I got a problem with the ORACLE_INCLUDE_DIR.

I changed in the cmake-directory cmake/FindOracle.cmake:

 if(DEFINED ENV{ORACLE_HOME})    
 27   
 28   set(ORACLE_HOME $ENV{ORACLE_HOME})    
 29   message("ORACLE_HOME=${ORACLE_HOME}")   
 30   
 31   find_path(ORACLE_INCLUDE_DIR
 32     NAMES oci.h
 33     PATHS
 34
 35     /usr/include/oracle/12.2/client64)

And I configured mapserver by:

cmake .. -DCMAKE_BUILD_TYPE='debug' -DCMAKE_INSTALL_PREFIX=/opt/mapserver -DCMAKE_PREFIX_PATH=/usr/lib/oracle/12.2/client64:/usr/include/oracle/12.2/client64:
/usr/lib:/usr/lib64:/usr/share/gdal -DWITH_ORACLESPATIAL=1 -DWITH_PROTOBUFC=0 -DWITH_FCGI=0 -DWITH_CURL=1

and then I got it:

--   * LIBXML2: /usr/lib64/libxml2.so

--   * POSTGIS: /usr/lib64/libpq.so

--   * GEOS: /usr/lib64/libgeos_c.so

--   * FastCGI: disabled

--   * PROTOBUFC: disabled

--   * Oracle Spatial: /usr/lib/oracle/12.2/client64/lib/libclntsh.so;/usr/lib/oracle/12.2/client64/lib/libocci.so;/usr/lib/oracle/12.2/client64/lib/libnnz12.so

--   * Exempi XMP: disabled

--  * Optional features

--   * WMS SERVER: ENABLED

--   * WFS SERVER: ENABLED

--   * WCS SERVER: ENABLED
2
  • If anyone needs to compile gdal with OCI you need to: export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export ORACLE_HOME=/usr/lib/oracle/11.2/client64 sudo sudo vi /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh export ORACLE_HOME=/usr/lib/oracle/11.2/client64 export PATH=$PATH:$ORACLE_HOME/bin Important: ln -s /usr/include/oracle/11.2/client64 $ORACLE_HOME/rdbms/public or: copy oci.h and all the other stuff of the directory /usr/include/oracle/11.2/client64 to $ORACLE_HOME/rdbms/public Commented Feb 1, 2021 at 15:38
  • To get the "oci.h"-File: the oracle-instanclient AND the oracle--instanclient-devel must be installed, e.g. by zypper install oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm Commented Oct 20, 2022 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.