[Shake-dev] libnetcdf.so.4 problem

Bruce Worden cbworden at caltech.edu
Wed Sep 8 16:54:25 UTC 2010


Hi Valentino,

Yes, you can set the LD_LIBRARY_PATH environment variable, but make  
sure you've set your GMTLIB and CDFLIB variables correctly in  
<shake_home>/include/macros. Those should allow the executable to find  
the libraries. If you're on Solaris and using Sun's compiler, follow  
the instructions for the LINKOPT variable, too.

Bruce

On Sep 8, 2010, at 2:32 AM, Valentino Lauciani wrote:

> Hi all
>
> We are running ShakeMap v3.5, but testing It we are receiving this  
> message:
> shake at shake1:~/ShakeMap> bin/shake -event 9583161 -verbose
> shake: Running: '/home/shake/ShakeMap/bin/../bin/retrieve -event  
> 9583161'
> shake: Running: '/home/shake/ShakeMap/bin/../bin/pending -event  
> 9583161'
> transfer: ----- Starting Transfer at 09/08/2010 08:40:07 -----
> transfer: ----- Transfer finished at 09/08/2010 08:40:07 -----
> shake: Done with 'pending'
> shake: Running: '/home/shake/ShakeMap/bin/../bin/grind -event  
> 9583161 -qtm -xml'
> //home/shake/ShakeMap/bin/../bin/sm_nearneighbor: error while  
> loading shared libraries: libnetcdf.so.4: cannot open shared object  
> file: No such file or directory
> grdmath: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/XUjmmQOVU0.grd]
> grdmath: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/rK0FwR8Gfc.grd]
> //home/shake/ShakeMap/bin/../bin/sm_nearneighbor: error while  
> loading shared libraries: libnetcdf.so.4: cannot open shared object  
> file: No such file or directory
> grdmath: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/c0DqvB8ZQY.grd]
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> richter/pga_rock.grd is not a number, operator or file name
> grdmath: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/eF5FziychM.grd]
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> richter/pga_rock.grd is not a number, operator or file name
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> richter/pgv_rock.grd is not a number, operator or file name
> //home/shake/ShakeMap/bin/../bin/sm_nearneighbor: error while  
> loading shared libraries: libnetcdf.so.4: cannot open shared object  
> file: No such file or directory
> grdmath: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/MRMsVbuWe1.grd]
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> richter/mi_rock.grd is not a number, operator or file name
> gmt2rgb: Not a supported grid format [/home/shake/ShakeMap/bin/../ 
> data/9583161/output/0PecsZeBtB.grd]
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> output/map_r.grd is not a number, operator or file name
> grdmath: GMT SYNTAX ERROR: /home/shake/ShakeMap/bin/../data/9583161/ 
> output/mi.grd is not a number, operator or file name
> grdinfo: Could not find file [/home/shake/ShakeMap/bin/../data/ 
> 9583161/output/pga.grd]
> GMThd: unknown accessor 'file'
>  at /home/shake/ShakeMap/bin/../bin/grind line 1825
> shake: Error in grind: 2560
> shake at shake1:~/ShakeMap>
>
> What does it mean?
>
>
> Compiling "sm_nearneighbor" again, this is the output:
> shake at shake1:~/ShakeMap/src/contour> make all
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c contour.c
> contour.c: In function ‘main’:
> contour.c:411: warning: passing argument 8 of ‘GMT_read_grd’ from  
> incompatible pointer type
> /opt/GMT4.5.2/include/gmt_grdio.h:52: note: expected ‘GMT_LONG *’  
> but argument is of type ‘int *’
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c shpopen.c
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c dbfopen.c
> /usr/bin/cc  -L/opt/GMT4.5.2/lib -L/opt/netcdf-3.6.3/lib contour.o  
> shpopen.o dbfopen.o  -lgmt -lnetcdf -lpsl -lm -o contour
> /usr/bin/install -m 0755 contour /home/shake/ShakeMap/bin
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c sm_nearneighbor.c
> sm_nearneighbor.c: In function ‘main’:
> sm_nearneighbor.c:424: warning: passing argument 1 of  
> ‘GMT_y_out_of_bounds’ from incompatible pointer type
> /opt/GMT4.5.2/include/gmt_boundcond.h:54: note: expected ‘GMT_LONG  
> *’ but argument is of type ‘int *’
> sm_nearneighbor.c:429: warning: passing argument 1 of  
> ‘GMT_x_out_of_bounds’ from incompatible pointer type
> /opt/GMT4.5.2/include/gmt_boundcond.h:55: note: expected ‘GMT_LONG  
> *’ but argument is of type ‘int *’
> /usr/bin/cc  -L/opt/GMT4.5.2/lib -L/opt/netcdf-3.6.3/lib  
> sm_nearneighbor.o  -lgmt -lnetcdf -lpsl -lm -o sm_nearneighbor
> /usr/bin/install -m 0755 sm_nearneighbor /home/shake/ShakeMap/bin
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c dist_rrupt.c
> /usr/bin/cc  dist_rrupt.o -lm -o dist_rrupt
> /usr/bin/install -m 0755 dist_rrupt /home/shake/ShakeMap/bin
> /usr/bin/cc -O -I . -I /opt/GMT4.5.2/include -I /opt/netcdf-3.6.3/ 
> include -c dist_rx.c
> /usr/bin/cc  dist_rx.o -lm -o dist_rx
> /usr/bin/install -m 0755 dist_rx /home/shake/ShakeMap/bin
> shake at shake1:~/ShakeMap/src/contour>
>
> I resolved the problem using:
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/netcdf-3.6.3/lib
>
> but is this the best solution?
>
> Thank you for your support.
>
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geohazards.usgs.gov/pipermail/shake-dev/attachments/20100908/cf0cabf1/attachment-0001.html>


More information about the Shake-dev mailing list