Re: [gdal-dev] Build OGR with Oracle support
Normand Savard wrote: Mateusz Loskot wrote: I maintain macros detecting Oracle (autotools at http://github.com/mloskot/workshop/tree/) which are used in GDAL and I'm interested in improving it, so feel free to report any problems Mateusz, I'm wondering if a switch could be add to detect libnnzxx.so location instead of having to specify $LD_LIBRARY_PATH or by setting the library path in /etc/ld.so.conf.d/oracle.conf and running ldconfig as root (as stated by Andreas)? Norm I just noticed today that I replied to Mateusz only. Sorry for that. Replying to the list as well now. Norm ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Build OGR with Oracle support
Normand Savard wrote: Mateusz Loskot wrote: I maintain macros detecting Oracle (autotools at http://github.com/mloskot/workshop/tree/) which are used in GDAL and I'm interested in improving it, so feel free to report any problems Mateusz, I'm wondering if a switch could be add to detect libnnzxx.so location instead of having to specify $LD_LIBRARY_PATH or by setting the library path in /etc/ld.so.conf.d/oracle.conf and running ldconfig as root (as stated by Andreas)? Normand, All the elements you complain about are just a standard way tell loader where to findshared libraries. I don't think it's a good idea. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Build OGR with Oracle support
Andreas Neumann wrote: ok - the problem could now be solved by setting the library path in /etc/ld.so.conf.d/oracle.conf and running ldconfig as root. Then all the libraries could be found. Somehow the LD_LIBRARY_PATH variable was constantly ignored, although it was set and could be queried with echo $LD_LIBRARY_PATH. It was interesting that LD_LIBRARY_PATH worked as root, but not as a regular user, but the method with ldconfig worked for all users. Thank you for all of your help! Andreas, Check if directory with libnnz has +x privileges for your non-root users. IOW, check if you can step into this directory as non-root user. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Build OGR with Oracle support
Hi, I was trying to get OCI support on my Ubuntu server and followed your instructions. I am struggling with the libnnz10.so: libnnz10.so is present and I also set the LD_LIBRARY_PATH accordingly. But the configure script still fails. In the config.log I get the following messages: /usr/bin/ld: warning: libnnz10.so, needed by /usr/local/lib/instantclient_10_2/libclntsh.so, not found (try using -rpath or -rpath-link) /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_ModifyCipherSuites' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosCipherSpecToStr' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_Initialize' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosgpc_GetProtocolVer' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztwOpenWallet' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `A_X931RandomInit' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosGetSupportedCipher' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_ServiceWriteQueue' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_DisableClientAuthentication' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztiGetSecInfo' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_Write' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzduui2_destroy_ui' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `_intel_fast_memset' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztGetSubjectName' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzgbllsm_location_shared_memory' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_setThrUse' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzteMyCert' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzteDestroyPersona' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_RetrievePersonaCopy' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosSCCS_SetCRLCacheSize' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztnGCL_Get_Certificate_List' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_setCRLFile' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `A_X931RandomContextDestroy' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_OToolkitContext' .. more messages .. .. collect2: ld returned 1 exit status configure:24161: $? = 1 configure: failed program was: | | /* confdefs.h. */ | #define PACKAGE_NAME | #define PACKAGE_TARNAME | #define PACKAGE_VERSION | #define PACKAGE_STRING | #define PACKAGE_BUGREPORT | #define STDC_HEADERS 1 .. more messages .. .. Any idea why it can't find libnnz10.so despite it being present and the LD_LIBRARY_PATH set? Here are my configure-params: ./configure --with-python --with-perl --with-php --with-curl --with-expat --with-pg=/usr/local/pgsql/bin/pg_config --with-xerces --with-grass=/usr/local/grass-6.4.0RC2/ --with-oci-include=/usr/local/lib/instantclient_10_2/sdk/include --with-oci-lib=/usr/local/lib/instantclient_10_2 Thanks, Andreas On Thu, June 18, 2009 10:18 pm, Normand Savard wrote: Mateusz Loskot wrote: ./configure generates a log file called config.log. If something goes wrong, there should be some diagnostic in this file. It would be helpful if you could share it, for instance, here: http://pastebin.com/ This will help to find what's the problem. Maateusz, You were right, this help a lot. I succeeded to build OGR with Oracle 10g and 11g but for those who may come on a similar issue in the future, I'm posting the process I went through. I downloaded oracle-instantclient-basic-10.2.0.4-1.i386.zip (library) oracle-instantclient-devel-10.2.0.4-1.i386.zip (headers) or instantclient-basic-linux32-11.1.0.7.zip (library) instantclient-sdk-linux32-11.1.0.7.zip (headers) As suggested I checked the config.log (see 1) and noticed that there was a link problem (-lclntsh). I went to the instantclient directory to check for libclntsh.so, but it was not there. So I added a link to libclntsh.so.11.1. I redid the configure and checked the config.log again (see 2). I noticed that libnnz11.so library was not found. I went to the instantclient directory but the library was present. Since I use the fgs-dev environment the libraries are not in a traditional path so the linker could not find it. To solve this issue, I added the path to where the library was installed to $LD_LIBRARY_PATH. There was a problem with libaio.so.1 library. For this
Re: [gdal-dev] Build OGR with Oracle support
Mateusz Loskot wrote: Andreas Neumann wrote: /usr/bin/ld: warning: libnnz10.so, needed by /usr/local/lib/instantclient_10_2/libclntsh.so, not found (try using -rpath or -rpath-link) The path above and the path below are different. -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\ lntsh Are you sure you configure against one version of Oracle stuff? From what I can see, you have two versions. Mateusz, Maybe I misinterpreted Andreas' email but I think he's trying to compile GDAL/OGR with OCI (Oracle Instantclient) outside of fgs-dev. Can you confirm Andreas? Norm ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Build OGR with Oracle support
Andreas Neumann wrote: Hi, I was trying to get OCI support on my Ubuntu server and followed your instructions. I am struggling with the libnnz10.so: libnnz10.so is present and I also set the LD_LIBRARY_PATH accordingly. But the configure script still fails. In the config.log I get the following messages: /usr/bin/ld: warning: libnnz10.so, needed by /usr/local/lib/instantclient_10_2/libclntsh.so, not found (try using -rpath or -rpath-link) /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_ModifyCipherSuites' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosCipherSpecToStr' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_Initialize' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosgpc_GetProtocolVer' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztwOpenWallet' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `A_X931RandomInit' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosGetSupportedCipher' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_ServiceWriteQueue' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_DisableClientAuthentication' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztiGetSecInfo' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_Write' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzduui2_destroy_ui' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `_intel_fast_memset' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztGetSubjectName' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzgbllsm_location_shared_memory' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_setThrUse' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzteMyCert' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzteDestroyPersona' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_RetrievePersonaCopy' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzosSCCS_SetCRLCacheSize' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nztnGCL_Get_Certificate_List' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_setCRLFile' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `A_X931RandomContextDestroy' /usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to `nzos_OToolkitContext' .. more messages .. .. collect2: ld returned 1 exit status configure:24161: $? = 1 configure: failed program was: | | /* confdefs.h. */ | #define PACKAGE_NAME | #define PACKAGE_TARNAME | #define PACKAGE_VERSION | #define PACKAGE_STRING | #define PACKAGE_BUGREPORT | #define STDC_HEADERS 1 .. more messages .. .. Any idea why it can't find libnnz10.so despite it being present and the LD_LIBRARY_PATH set? Here are my configure-params: ./configure --with-python --with-perl --with-php --with-curl --with-expat --with-pg=/usr/local/pgsql/bin/pg_config --with-xerces --with-grass=/usr/local/grass-6.4.0RC2/ --with-oci-include=/usr/local/lib/instantclient_10_2/sdk/include --with-oci-lib=/usr/local/lib/instantclient_10_2 Andrea, I was thinking of one other thing. It is good to set LD_LIBRARY_PATH variable but you have to export it. For instance, for FGS I needed to do something like this: export LD_LIBRARY_PATH=$FGS_BUILD_HOME/$oci_ARCHIVE_DIR:$LD_LIBRARY_PATH Norm ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Build OGR with Oracle support
Normand, Just a quick complimentary reference: Instant Client allows you to run your applications without installing the standard Oracle client or having an ORACLE_HOME. OCI, OCCI, Pro*C, ODBC, and JDBC applications work without modification, while using significantly less disk space than before. Even SQL*Plus can be used with Instant Client. No recompile, no hassle. [http://www.oracle.com/technology/tech/oci/instantclient/index.html] But of course, running is one thing, compiling is another. Regards, Ivan Normand Savard wrote: Mateusz Loskot wrote: ./configure generates a log file called config.log. If something goes wrong, there should be some diagnostic in this file. It would be helpful if you could share it, for instance, here: http://pastebin.com/ This will help to find what's the problem. Maateusz, You were right, this help a lot. I succeeded to build OGR with Oracle 10g and 11g but for those who may come on a similar issue in the future, I'm posting the process I went through. I downloaded oracle-instantclient-basic-10.2.0.4-1.i386.zip (library) oracle-instantclient-devel-10.2.0.4-1.i386.zip (headers) or instantclient-basic-linux32-11.1.0.7.zip (library) instantclient-sdk-linux32-11.1.0.7.zip (headers) As suggested I checked the config.log (see 1) and noticed that there was a link problem (-lclntsh). I went to the instantclient directory to check for libclntsh.so, but it was not there. So I added a link to libclntsh.so.11.1. I redid the configure and checked the config.log again (see 2). I noticed that libnnz11.so library was not found. I went to the instantclient directory but the library was present. Since I use the fgs-dev environment the libraries are not in a traditional path so the linker could not find it. To solve this issue, I added the path to where the library was installed to $LD_LIBRARY_PATH. There was a problem with libaio.so.1 library. For this particular issue I had to install libaio-dev on my system (Ubuntu: apt-get install). It works fine after that. Thank you to both of you. Norm 1)config.log configure:23653: checking for Oracle OCI headers in /home/fgs/fgs-dev/built/ins\ tantclient_11_1/sdk/include configure:23696: g++ -c -fPIC -g -DDEBUG -I/home/fgs/fgs-dev/built/instantcli\ ent_11_1/sdk/include conftest.cpp 5 configure:23702: $? = 0 configure:23715: result: yes configure:23740: checking for Oracle OCI libraries in /home/fgs/fgs-dev/built/i\ nstantclient_11_1 configure:23743: result: norm: -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\ lntsh configure:23745: result: norm: -I/home/fgs/fgs-dev/built/instantclient_11_1/sdk\ /include configure:23781: g++ -o conftest -fPIC -g -DDEBUG -I/home/fgs/fgs-dev/built/i\ nstantclient_11_1/sdk/include -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\ lntsh conftest.cpp -L/home/fgs/fgs-dev/built/jpeg -L/home/fgs/fgs-dev/built/jpe\ g/lib -ljpeg -L/home/fgs/fgs-dev/built/libgeotiff/lib -lgeotiff -L/home/fgs/fgs\ -dev/built/tiff/lib -ltiff -L/home/fgs/fgs-dev/built/libpng -L/home/fgs/fgs-dev\ /built/libpng/lib -lpng -lpq -L/home/fgs/fgs-dev/built/postgresql/lib -lpq -lz \ -L/home/fgs/fgs-dev/built/zlib -L/home/fgs/fgs-dev/built/zlib/lib -lm -lrt -ld\ l 5 /usr/bin/ld: cannot find -lclntsh collect2: ld returned 1 exit status configure:23787: $? = 1 configure: failed program was: | | /* confdefs.h. */ | #define PACKAGE_NAME | #define PACKAGE_TARNAME 2) config.log configure:23740: checking for Oracle OCI libraries in /home/fgs/fgs-dev/built/i\ nstantclient_11_1 configure:23743: result: norm: -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\ lntsh configure:23745: result: norm: -I/home/fgs/fgs-dev/built/instantclient_11_1/sdk\ /include configure:23781: g++ -o conftest -fPIC -g -DDEBUG -I/home/fgs/fgs-dev/built/i\ nstantclient_11_1/sdk/include -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\ lntsh conftest.cpp -L/home/fgs/fgs-dev/built/jpeg -L/home/fgs/fgs-dev/built/jpe\ g/lib -ljpeg -L/home/fgs/fgs-dev/built/libgeotiff/lib -lgeotiff -L/home/fgs/fgs\ -dev/built/tiff/lib -ltiff -L/home/fgs/fgs-dev/built/libpng -L/home/fgs/fgs-dev\ /built/libpng/lib -lpng -lpq -L/home/fgs/fgs-dev/built/postgresql/lib -lpq -lz \ -L/home/fgs/fgs-dev/built/zlib -L/home/fgs/fgs-dev/built/zlib/lib -lm -lrt -ld\ l 5 /usr/bin/ld: warning: libnnz11.so, needed by /home/fgs/fgs-dev/built/instantcli\ ent_11_1/libclntsh.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libaio.so.1, needed by /home/fgs/fgs-dev/built/instantcli\ ent_11_1/libclntsh.so, not found (try using -rpath or -rpath-link) /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined reference to\ `nzos_ServiceWriteQueue' /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined reference to\ `nzosCipherSpecToStr' /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined reference to\ `C_SetCRLBER'
Re: [gdal-dev] Build OGR with Oracle support
Normand Savard wrote: I checked in the configure.in script and everything seems alright. Could someone gives me some hints about why the library is not found? [...] /home/fgs/fgs-dev/built/instantclient_11_1... norm: -L/home/fgs/fgs-dev/built/instantclient_11_1 -lclntsh norm: -I/home/fgs/fgs-dev/built/instantclient_11_1/sdk/include not found checking if Oracle support is enabled... no checking Checking for DODS... disabled ./configure generates a log file called config.log. If something goes wrong, there should be some diagnostic in this file. It would be helpful if you could share it, for instance, here: http://pastebin.com/ This will help to find what's the problem. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev