R: [MAPSERVER-USERS] Debian Oracle10g OCI

Leandro Dardini l.dardini at comune.prato.it
Tue Sep 16 06:02:03 EDT 2008


I hate using the LD_LIBRARY_PATH trick. I think this is a work around for software developer to not take in to account different Linux software distribution. 

If you have a Lenny, add a file into /etc/ld.so.conf.d with the list of directory where special oracle library resides.

Run ldconfig -v and check if library are correctly cached.

Now run ldd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so and check if all needed library are available. If a library is missing, run "updatedb; locate <library>" and add the directory to the file in ld.so.conf.d directory. Repeat until all library are correctly defined.

Leandro


> -----Messaggio originale-----
> Da: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] Per conto di 
> Umberto Nicoletti
> Inviato: martedì 16 settembre 2008 11.55
> A: dzizes451 at gmail.com
> Cc: mapserver-users at lists.osgeo.org
> Oggetto: Re: [MAPSERVER-USERS] Debian Oracle10g OCI
> 
> I'm at a complete loss here. I assume there is a problem with 
> your oracle install.
> did you run /etc/init.d/oracle-xe configure?
> 
> Umberto
> 
> 2008/9/16  <dzizes451 at gmail.com>:
> > Makefile generates without any problems, but when executing make 
> > command I
> > receive:
> >
> > /usr/bin/ld: warning: libnnz10.so, needed by 
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so, 
> > not found (try using -rpath or -rpath-link)
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nztSearchNZDefault'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nzosCipherSpecToStr'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nztwOpenWallet'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `A_X931RandomInit'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nzosgpc_GetProtocolVer'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nzos_DisableClientAuthentication'
> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> > undefined reference to `nzduui2_destroy_ui'
> >
> >
> > --------
> > ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
> > 
> LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bi
> > n PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> > LOGNAME=root
> >
> >
> > --
> > Michał
> >
> >
> > 2008/9/16 Umberto Nicoletti <umberto.nicoletti at gmail.com>
> >>
> >> Revert configure to the previous oraclespatial setting and try:
> >>
> >> export 
> >> ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
> >>
> >> before configure.
> >>
> >> Umberto
> >>
> >>
> >> 2008/9/16  <dzizes451 at gmail.com>:
> >> > Now I get:
> >> >
> >> > checking if OracleSpatial support requested... yes, user 
> supplied 
> >> > ORACLE_HOME
> >> > configure: error: Oracle Spatial: libclntsh.so not found.
> >> >
> >> > I enclose the config.log.
> >> >
> >> > --
> >> > Michał
> >> >
> >> >
> >> > 2008/9/16 Umberto Nicoletti <umberto.nicoletti at gmail.com>
> >> >>
> >> >> try:
> >> >>
> >> >> -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0
> >> >>
> >> >> otherwise post the config.log file.
> >> >>
> >> >> Umberto
> >> >>
> >> >> 2008/9/16  <dzizes451 at gmail.com>:
> >> >> > Thanks for the tip!
> >> >> > The Makefile looks like:
> >> >> >  -------------- Compiler Info -------------
> >> >> >   C compiler:                gcc -O2 -fPIC -Wall
> >> >> >   C++ compiler:              g++ -O2 -fPIC -Wall
> >> >> >   Debug:
> >> >> >   Generic NINT:
> >> >> >
> >> >> >  -------------- Renderer Settings ---------
> >> >> >   zlib support:              -DUSE_ZLIB
> >> >> >   png support:
> >> >> >   palette rgba png support:
> >> >> >   jpeg support:
> >> >> >   iconv support:             -DUSE_ICONV
> >> >> >   AGG support:
> >> >> >   AGG Freetype support:
> >> >> >   Ming(flash) support:
> >> >> >   PDFLib support:
> >> >> >
> >> >> >  -------------- Support Libraries ---------
> >> >> >   Proj.4 support:            -DUSE_PROJ
> >> >> >   Libxml2 support:
> >> >> >   FriBidi support:
> >> >> >   Curl support:              -DUSE_CURL
> >> >> >   FastCGI support:
> >> >> >   Threading support:         -DUSE_THREAD
> >> >> >   GEOS support:
> >> >> >
> >> >> >  -------------- Data Format Drivers -------
> >> >> >   native tiff support:
> >> >> >   PostGIS support:
> >> >> >   EPPL7 support:             -DUSE_EPPL
> >> >> >   ArcSDE support:
> >> >> >   OGR support:               -DUSE_OGR
> >> >> >   GDAL support:              -DUSE_GDAL
> >> >> >   Oracle Spatial support:    -DUSE_ORACLESPATIAL
> >> >> >
> >> >> >  -------------- OGC Services --------------
> >> >> >   WMS Server:                -DUSE_WMS_SVR
> >> >> >   WMS Client:                -DUSE_WMS_LYR
> >> >> >   WFS Server:
> >> >> >   WFS Client:                -DUSE_WMS_LYR
> >> >> >   WCS Server:
> >> >> >   SOS Server:
> >> >> >
> >> >> >  -------------- MapScript -----------------
> >> >> >   PHP MapScript:             no
> >> >> >
> >> >> > the make command throws the following error:
> >> >> >
> >> >> >  warning: libnnz10.so, needed by 
> >> >> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclnts
> >> >> > h.so,
> >> >> > not
> >> >> > found (try using -rpath or -rpath-link)
> >> >> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> >> >> > undefined reference to `nztSearchNZDefault'
> >> >> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> >> >> > undefined reference to `nzosCipherSpecToStr'
> >> >> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> >> >> > undefined reference to `nztwOpenWallet'
> >> >> > 
> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
> >> >> > undefined reference to `A_X931RandomInit'
> >> >> > ....
> >> >> > ends with
> >> >> > collect2: ld returned 1 exit status
> >> >> > make: *** [shp2img] Error 1
> >> >> >
> >> >> > any ideas!
> >> >> >
> >> >> > --
> >> >> > Michał
> >> >> >
> >> >> >
> >> >> > 2008/9/16 Umberto Nicoletti <umberto.nicoletti at gmail.com>
> >> >> >>
> >> >> >> Usign tiff AND gdal is not recommended, you'd better 
> try these
> >> >> >> options:
> >> >> >>
> >> >> >> ./configure
> >> >> >>
> >> >> >> 
> -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.
> >> >> >> 0/server -with-proj -with-wfsclient -with-wmsclient 
> -with-gdal 
> >> >> >> -with-ogr -with-threads -with-freetype  -without-tiff 
> >> >> >> -with-FastCGI
> >> >> >>
> >> >> >> as for the expat error:
> >> >> >>
> >> >> >> sudo apt-get install libexpat1 libexpat1-dev
> >> >> >>
> >> >> >> Umberto
> >> >> >>
> >> >> >> 2008/9/16  <dzizes451 at gmail.com>:
> >> >> >> > Hi again,
> >> >> >> >
> >> >> >> > I've tried to compile mapserv executable with:
> >> >> >> >
> >> >> >> > ./configure
> >> >> >> >
> >> >> >> >
> >> >> >> > 
> -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.
> >> >> >> > 2.0/server -with-proj -with-wfsclient -with-wmsclient 
> >> >> >> > -with-gdal -with-ogr -with-threads -with-freetype  
> -with-tiff 
> >> >> >> > -with-FastCGI
> >> >> >> >
> >> >> >> > and I receive this error:
> >> >> >> >
> >> >> >> > /usr/bin/ld: cannot find -lexpat
> >> >> >> > collect2: ld returned 1 exit status
> >> >> >> > make: *** [shp2img] Error 1
> >> >> >> >
> >> >> >> > Does anyone know what is wrong?
> >> >> >> >
> >> >> >> > --
> >> >> >> > Michał
> >> >> >> >
> >> >> >> >
> >> >> >> > On Mon, Sep 15, 2008 at 3:16 PM, Dan Little 
> >> >> >> > <danlittle at yahoo.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> Umberto is right, for Mapserver to connect to Oracle you 
> >> >> >> >> need to specify that capability at compile time.  But for 
> >> >> >> >> you ge tthat far I think you need to make sure 
> that some of 
> >> >> >> >> the basics work.
> >> >> >> >>
> >> >> >> >> Also, if you cannot connect to Oracle via 
> SQL*Plus (assuming 
> >> >> >> >> the binary is
> >> >> >> >> installed) you have other problems including but 
> not limited to:
> >> >> >> >> - needing to set the LD_LIBRARY_PATH to include all the 
> >> >> >> >> libraries.
> >> >> >> >>  This
> >> >> >> >> may also need to be done in Apache while running 
> mapserver 
> >> >> >> >> to access Oracle.
> >> >> >> >> - needing to configure your TNSNAMES file.
> >> >> >> >> - check firewall setting in order to make sure you can 
> >> >> >> >> connect on
> >> >> >> >> 1521
> >> >> >> >> (or
> >> >> >> >> whatever port you are using for Oracle).
> >> >> >> >>
> >> >> >> >> Generally, when running an Oracle layer, you want 
> to try the 
> >> >> >> >> following diagnostic steps:
> >> >> >> >> 1) Use SQL Developer to connect to the database 
> (it has it's 
> >> >> >> >> own drivers built in, so there's no software dependency 
> >> >> >> >> issues).  This will resolve whether or not the databas is 
> >> >> >> >> working.
> >> >> >> >> 2) On the machine, try connecting with SQL Plus.  
> This will 
> >> >> >> >> determine whether or not you have your client configured 
> >> >> >> >> correctly.  Do not move on until this works.
> >> >> >> >> 3) Try and re-compile Mapserver with Oracle 
> Spatial.  At the 
> >> >> >> >> end of the ./configure script there is an output screen, 
> >> >> >> >> ensure that you see Oracle is turned on, 
> otherwise scroll up 
> >> >> >> >> in the screen and see what's missing.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> ----- Original Message ----
> >> >> >> >> > From: Umberto Nicoletti <umberto.nicoletti at gmail.com>
> >> >> >> >> > To: dzizes <dzizes451 at gmail.com>
> >> >> >> >> > Cc: mapserver-users at lists.osgeo.org
> >> >> >> >> > Sent: Monday, September 15, 2008 7:45:48 AM
> >> >> >> >> > Subject: Re: [MAPSERVER-USERS] Debian Oracle10g OCI
> >> >> >> >> >
> >> >> >> >> > You have to recompile mapserver with the:
> >> >> >> >> >
> >> >> >> >> > --with-oraclespatial=[path to oracle home]
> >> >> >> >> >
> >> >> >> >> > option. That's all that is needed to enable 
> oracle spatial 
> >> >> >> >> > support in mapserver.
> >> >> >> >> >
> >> >> >> >> > HTH,
> >> >> >> >> > Umberto
> >> >> >> >> >
> >> >> >> >> > On Mon, Sep 15, 2008 at 2:05 PM, dzizes wrote:
> >> >> >> >> > >
> >> >> >> >> > > Hi,
> >> >> >> >> > >
> >> >> >> >> > > I've installed mapserver on Debian (lenny 
> distribution). 
> >> >> >> >> > > I've managed to create mapfile based on shp data and 
> >> >> >> >> > > successfully send a wms request to get a map. I seems 
> >> >> >> >> > > that mapserver works fine.
> >> >> >> >> > >
> >> >> >> >> > > I've also installed oracle-ex and I can connect to my 
> >> >> >> >> > > Oracle via sqlplus.
> >> >> >> >> > > However, when I request wms (to a map file pointing to
> >> >> >> >> > > Oracle10g) I
> >> >> >> >> > > receive
> >> >> >> >> > > the following:
> >> >> >> >> > >
> >> >> >> >> > > msDrawMap(): Image handling error. Failed to 
> draw layer 
> >> >> >> >> > > named 'test'.
> >> >> >> >> > > msOracleSpatialLayerOpen(): OracleSpatial error.
> >> >> >> >> > > OracleSpatial
> >> >> >> >> > > is
> >> >> >> >> > > not
> >> >> >> >> > > supported
> >> >> >> >> > >
> >> >> >> >> > > I've found that I need OCI installed and configured 
> >> >> >> >> > > properly, but there is no clear tutorial.
> >> >> >> >> > > Please provide me a some step by step guide.
> >> >> >> >> > >
> >> >> >> >> > > Greets,
> >> >> >> >> > > Michal
> >> >> >> >> > >
> >> >> >> >> > > --
> >> >> >> >> > > View this message in context:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > 
> http://www.nabble.com/Debian-Oracle10g-OCI-tp19491636p1949
> >> >> >> >> > 1636.html
> >> >> >> >> > > Sent from the Mapserver - User mailing list 
> archive at 
> >> >> >> >> > > Nabble.com.
> >> >> >> >> > >
> >> >> >> >> > > _______________________________________________
> >> >> >> >> > > mapserver-users mailing list 
> >> >> >> >> > > mapserver-users at lists.osgeo.org 
> >> >> >> >> > > 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >> >> >> > >
> >> >> >> >> > _______________________________________________
> >> >> >> >> > mapserver-users mailing list 
> >> >> >> >> > mapserver-users at lists.osgeo.org 
> >> >> >> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> > _______________________________________________
> >> >> >> > mapserver-users mailing list
> >> >> >> > mapserver-users at lists.osgeo.org 
> >> >> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >> >> >
> >> >> >> >
> >> >> >
> >> >> >
> >> >
> >> >
> >
> >
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4838 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080916/667b7a05/smime-0001.bin


More information about the mapserver-users mailing list