[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #QEA-871876]: dyld: Library not loaded: /opt/local/lib/libnetcdff.6.dylib



Hello Benjamin,

The issue is that the system doesn't know where to find the shared libraries at 
runtime.  You can avoid this by setting the DYLD_LIBRARY_PATH environmental 
variable, e.g.

    export DYLD_LIBRARY_PATH=/opt/local/lib/

This will tell the system, at runtime, to look in this location for shared 
libraries.  This will probably be the easier solution.  It is worth noting that 
on some OSX systems,
the environmental variable is LD_LIBRARY_PATH, so it might not hurt to set both.

I hope this helps,

-Ward

> Hi there,
> 
> I’m having troubles trying to install NetCDF-Fortran. I installed NetCDF-C by
> 
> cmake netcdf-4.4.1.1 -DCMAKE_PREFIX_PATH=/opt/local/
> make
> make test
> 
> That was successful.
> Then, following 
> http://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html 
> with static libraries, I did
> 
> export NCDIR=/opt/local
> export H5DIR=/opt/local
> export ODIR=/opt/local
> 
> CPPFLAGS="-I${NCDIR}/include -I${H5DIR}/include -I${ODIR}/include" \
> LDFLAGS="-L${NCDIR}/lib -L${H5DIR}/lib -L${ODIR}/lib" \
> LD_LIBRARY_PATH=${NCDIR}/lib:${H5DIR}/lib:${ODIR}/lib \
> LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl" \
> sudo ./configure --disable-shared --prefix=${NCDIR}
> 
> sudo make check
> 
> I got errors looking like this:
> ============================================================================
> Testsuite summary for netCDF-Fortran 4.4.4
> ============================================================================
> # TOTAL: 8
> # PASS:  0
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  8
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See examples/F77/test-suite.log
> Please report to address@hidden<mailto:address@hidden>
> ============================================================================
> 
> The test-suite.log file is attached.
> I guess the first question is whether I should build with shared or static 
> libraries. How can I find out.
> If with static, is ok, then what’s up with that message in test-suite.log:
> 
> dyld: Library not loaded: /opt/local/lib/libnetcdff.6.dylib
> 
> I don’t have that file anywhere on my machine. What am I doing wrong?
> 
> Thanks for any help!
> 
> beni
> 
> 
> --
> -------------------------------------------------------------------------------
> Benjamin D Stocker
> Postdoctoral Researcher
> 
> bstocker.net<http://bstocker.net>
> 
> ORCID: 0000-0003-2697-9096
> ResearcherID: K-3194-2015
> 
> Global Ecology Unit
> CREAF
> Universitat Autonoma de Barcelona
> -------------------------------------------------------------------------------
> 
> 


Ticket Details
===================
Ticket ID: QEA-871876
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.