From: ryan s. <rsc...@gm...> - 2013-11-21 01:08:00
|
I have installed all dependencies for ccplot. However, when attempting to build ccplot before installation, I receive the following error message: "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found #include "hntdefs.h" ^ 1 error generated. error: command 'clang' failed with exit status 1" I do, however, have the hdf4 library installed (via MacPorts), the following bash-3.2$ locate hntdefs.h /opt/local/include/hntdefs.h shows that I do have this file. Could anyone please point me in the right direction? Any help is very much appreciated. Thanks, Ryan |
From: Peter K. <pet...@wa...> - 2013-11-21 08:11:24
|
On 11/21/2013 02:07 AM, ryan scott wrote: > I have installed all dependencies for ccplot. However, when attempting to build ccplot before installation, I receive the following error message: > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found > #include "hntdefs.h" > ^ > 1 error generated. > error: command 'clang' failed with exit status 1" > > I do, however, have the hdf4 library installed (via MacPorts), the following > > bash-3.2$ locate hntdefs.h > /opt/local/include/hntdefs.h > > shows that I do have this file. Could anyone please point me in the right direction? > > Any help is very much appreciated. Thanks, > > Ryan Dear Ryan, Sorry - I think this is a problem with ccplot rather than your configuration. It assumes that hdf is available under either /usr/include/hdf or /usr/local/include/hdf, which is a valid assumption on linux, but not on mac. For now, could you please just add the path to hdf_include_dirs in setup.py? - hdf_include_dirs = ['/usr/include/hdf', '/usr/local/include/hdf'] + hdf_include_dirs = ['/usr/include/hdf', '/usr/local/include/hdf', '/opt/local/include'] (line 24) Unfortunately, I don't have access to a mac system for testing now, so I would not find out. Hopefully, darwin will be good enough for this. I'll try to fix these issues soon. Thank you very much for reporting the problem. Regards, Peter |
From: Peter K. <pet...@wa...> - 2013-11-22 07:53:21
|
Hi Ryan, I think this could be a similar problem as with the include path. The solution depends on where the libmfhdf.so library is, I assume it is /opt/local/lib. Please try adding the path to hdf_library_dirs in setup.py: - hdf_library_dirs = [] + hdf_library_dirs = ['/opt/local/lib'] (line 25) Or, if it does not work, please try locate libmfhdf.so. The current master incorporates both fixes for the include path and MAX_VAR_DIMS. Regards, Peter On 11/22/2013 01:38 AM, Ryan Scott wrote: > Hello Peter, > > I have attempted to build both ccplot-master as well as ccplot-1.5-rc7, > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where necessary. > However, still no luck on the build. > > Here is the output from my latest try: > > bash-3.2$ python setup.py build > running build > running build_py > running build_ext > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > building 'ccplot.hdf' extension > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > -I/usr/local/include/hdf -I/opt/local/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > clang: warning: argument unused during compilation: '-mno-fused-madd' > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > -I/Users/ryan/Desktop/src/boost_1_53_0 > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz -o > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > ld: library not found for -lmfhdf > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > error: command 'clang' failed with exit status 1 > > Hopefully this is also an easy fix. Best, > > Ryan > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > Thanks for the follow-up. It is nice to hear you find ccplot useful. > > I was afraid there may be more problems. I'm sure other mac users will > be happy to see this sorted out. > > The reason is that MAX_VAR_DIMS is only available when HDF4 was compiled > with netcdf-3 compatibility. It should be easy to fix by replacing all > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > Please try an updated version from github: > > https://github.com/peterkuma/ccplot/archive/master.zip > > Regards, > > Peter > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > Hello Peter, > > > > I very much appreciate the timely response and your willingness to > help. > > I was happy to see that a new version of ccplot was available without > > the PyNIO dependency, which has prevented me from using it in the > past. > > ccplot appears to be far superior than what is possible using > Matlab and > > NCAR Command Language! > > > > I have modified line 24 of setup.py to reflect '/opt/local/include' as > > well, and I no longer receive the error regarding hntdefs.h. > > > > Unfortunately, though I'm presented with a new error. To give you as > > much detail as possible, here's the new issue: > > > > "bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: '-mno-fused-madd' > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > 'MAX_VAR_DIMS' > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if (unlikely(!__pyx_t_1)) > > {__pyx_filename =... > > ^ > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > 'MAX_VAR_DIMS' > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if (unlikely(!__pyx_t_1)) > > {__pyx_filename =... > > ^ > > 2 errors generated. > > error: command 'clang' failed with exit status 1" > > > > Perhaps there is an easy fix? > > > > Best, > > > > -Ryan > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > I have installed all dependencies for ccplot. However, when > > attempting to build ccplot before installation, I receive the > > following error message: > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found > > > #include "hntdefs.h" > > > ^ > > > 1 error generated. > > > error: command 'clang' failed with exit status 1" > > > > > > I do, however, have the hdf4 library installed (via > MacPorts), the > > following > > > > > > bash-3.2$ locate hntdefs.h > > > /opt/local/include/hntdefs.h > > > > > > shows that I do have this file. Could anyone please point me in > > the right direction? > > > > > > Any help is very much appreciated. Thanks, > > > > > > Ryan > > > > Dear Ryan, > > > > Sorry - I think this is a problem with ccplot rather than your > > configuration. It assumes that hdf is available under either > > /usr/include/hdf or /usr/local/include/hdf, which is a valid > assumption > > on linux, but not on mac. For now, could you please just add > the path to > > hdf_include_dirs in setup.py? > > > > - hdf_include_dirs = ['/usr/include/hdf', > '/usr/local/include/hdf'] > > + hdf_include_dirs = ['/usr/include/hdf', > '/usr/local/include/hdf', > > '/opt/local/include'] > > > > (line 24) > > > > Unfortunately, I don't have access to a mac system for testing > now, so I > > would not find out. Hopefully, darwin will be good enough for > this. I'll > > try to fix these issues soon. > > > > Thank you very much for reporting the problem. > > > > Regards, > > > > Peter > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 18:58:35
Attachments:
ccplot-verbose-link.diff
|
Hi Ryan, dylib is the equivalent of so files on other unix systems. The linker should find the library just fine if it is indeed located under /opt/local/lib/libmfhdf.dylib. I don't know why it does not. The best I can think of is to add a verbose flag to the linker to get a more detailed error report. A patch is attached. It can be applied with: patch < ccplot-verbose-link.diff in the ccplot directory. If you can send me the build output that would be great. Regards, Peter On 11/22/2013 06:47 PM, Ryan Scott wrote: > Hi Peter, > > After receiving the same error with the up-to-date ccplot-master, I > checked /opt/local/lib and I have the following libmfhdf* files > > libmfhdf.0.dylib > libmfhdf.a > libmfhdf.dylib > libmfhdf.la <http://libmfhdf.la> > > The lack of the libmfhdf.so file is presumably then the root of the > error. Do you know where this can be obtained? > > Best, Ryan > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > I think this could be a similar problem as with the include path. The > solution depends on where the libmfhdf.so library is, I assume it is > /opt/local/lib. Please try adding the path to hdf_library_dirs in > setup.py: > > - hdf_library_dirs = [] > + hdf_library_dirs = ['/opt/local/lib'] > > (line 25) > > Or, if it does not work, please try locate libmfhdf.so. > > The current master incorporates both fixes for the include path and > MAX_VAR_DIMS. > > Regards, > > Peter > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > Hello Peter, > > > > I have attempted to build both ccplot-master as well as > ccplot-1.5-rc7, > > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where necessary. > > However, still no luck on the build. > > > > Here is the output from my latest try: > > > > bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: '-mno-fused-madd' > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch > x86_64 > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg > -lz -o > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > ld: library not found for -lmfhdf > > clang: error: linker command failed with exit code 1 (use -v to see > > invocation) > > error: command 'clang' failed with exit status 1 > > > > Hopefully this is also an easy fix. Best, > > > > Ryan > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > Hi Ryan, > > > > Thanks for the follow-up. It is nice to hear you find ccplot > useful. > > > > I was afraid there may be more problems. I'm sure other mac > users will > > be happy to see this sorted out. > > > > The reason is that MAX_VAR_DIMS is only available when HDF4 > was compiled > > with netcdf-3 compatibility. It should be easy to fix by > replacing all > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > Please try an updated version from github: > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > Regards, > > > > Peter > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > Hello Peter, > > > > > > I very much appreciate the timely response and your > willingness to > > help. > > > I was happy to see that a new version of ccplot was > available without > > > the PyNIO dependency, which has prevented me from using it > in the > > past. > > > ccplot appears to be far superior than what is possible using > > Matlab and > > > NCAR Command Language! > > > > > > I have modified line 24 of setup.py to reflect > '/opt/local/include' as > > > well, and I no longer receive the error regarding hntdefs.h. > > > > > > Unfortunately, though I'm presented with a new error. To > give you as > > > much detail as possible, here's the new issue: > > > > > > "bash-3.2$ python setup.py build > > > running build > > > running build_py > > > running build_ext > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > building 'ccplot.hdf' extension > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > > -fno-common > > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > -DNDEBUG -g -Os > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > > 'MAX_VAR_DIMS' > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > (unlikely(!__pyx_t_1)) > > > {__pyx_filename =... > > > ^ > > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > > 'MAX_VAR_DIMS' > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > (unlikely(!__pyx_t_1)) > > > {__pyx_filename =... > > > ^ > > > 2 errors generated. > > > error: command 'clang' failed with exit status 1" > > > > > > Perhaps there is an easy fix? > > > > > > Best, > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > I have installed all dependencies for ccplot. However, > when > > > attempting to build ccplot before installation, I > receive the > > > following error message: > > > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file > not found > > > > #include "hntdefs.h" > > > > ^ > > > > 1 error generated. > > > > error: command 'clang' failed with exit status 1" > > > > > > > > I do, however, have the hdf4 library installed (via > > MacPorts), the > > > following > > > > > > > > bash-3.2$ locate hntdefs.h > > > > /opt/local/include/hntdefs.h > > > > > > > > shows that I do have this file. Could anyone please > point me in > > > the right direction? > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > Ryan > > > > > > Dear Ryan, > > > > > > Sorry - I think this is a problem with ccplot rather > than your > > > configuration. It assumes that hdf is available under either > > > /usr/include/hdf or /usr/local/include/hdf, which is a valid > > assumption > > > on linux, but not on mac. For now, could you please just add > > the path to > > > hdf_include_dirs in setup.py? > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > '/usr/local/include/hdf'] > > > + hdf_include_dirs = ['/usr/include/hdf', > > '/usr/local/include/hdf', > > > '/opt/local/include'] > > > > > > (line 24) > > > > > > Unfortunately, I don't have access to a mac system for > testing > > now, so I > > > would not find out. Hopefully, darwin will be good > enough for > > this. I'll > > > try to fix these issues soon. > > > > > > Thank you very much for reporting the problem. > > > > > > Regards, > > > > > > Peter > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 19:29:49
Attachments:
setup.py
|
Ryan, Yes it helped! The library_dirs option is apparently not even applied. Could you please send me your current setup.py - in case anything was wrongly applied? Attached is one that should have all modifications needed. Peter On 11/22/2013 08:11 PM, Ryan Scott wrote: > Hi Peter, > > Here's the build output after having applied the .diff file in the > ccplot-master directory: > > bash-3.2$ cd ~/Desktop/ccplot-master/ > bash-3.2$ ls > LICENSEccplot > MANIFEST.inccplot-verbose-link.diff > NEWScmap > README.mdman > binsetup.py > buildtest > bash-3.2$ patch < ccplot-verbose-link.diff > (Stripping trailing CRs from patch.) > patching file setup.py > bash-3.2$ python setup.py build > running build > running build_py > running build_ext > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > building 'ccplot.hdf' extension > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > -I/usr/local/include/hdf -I/opt/local/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > clang: warning: argument unused during compilation: '-mno-fused-madd' > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > -I/Users/ryan/Desktop/src/boost_1_53_0 > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz -o > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > Target: x86_64-apple-darwin12.4.0 > Thread model: posix > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle -macosx_version_min > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz > -arch_multiple -final_output > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > ld: library not found for -lmfhdf > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > error: command 'clang' failed with exit status 1 > > Hopefully this helps! > > -Ryan > > > > > > > > > > > > > > > > > > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > dylib is the equivalent of so files on other unix systems. The linker > should find the library just fine if it is indeed located under > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. > > The best I can think of is to add a verbose flag to the linker to get a > more detailed error report. A patch is attached. It can be applied with: > > patch < ccplot-verbose-link.diff > > in the ccplot directory. If you can send me the build output that would > be great. > > Regards, > > Peter > > On 11/22/2013 06:47 PM, Ryan Scott wrote: > > Hi Peter, > > > > After receiving the same error with the up-to-date ccplot-master, I > > checked /opt/local/lib and I have the following libmfhdf* files > > > > libmfhdf.0.dylib > > libmfhdf.a > > libmfhdf.dylib > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > > > > The lack of the libmfhdf.so file is presumably then the root of the > > error. Do you know where this can be obtained? > > > > Best, Ryan > > > > > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > Hi Ryan, > > > > I think this could be a similar problem as with the include > path. The > > solution depends on where the libmfhdf.so library is, I assume > it is > > /opt/local/lib. Please try adding the path to hdf_library_dirs in > > setup.py: > > > > - hdf_library_dirs = [] > > + hdf_library_dirs = ['/opt/local/lib'] > > > > (line 25) > > > > Or, if it does not work, please try locate libmfhdf.so. > > > > The current master incorporates both fixes for the include > path and > > MAX_VAR_DIMS. > > > > Regards, > > > > Peter > > > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > > Hello Peter, > > > > > > I have attempted to build both ccplot-master as well as > > ccplot-1.5-rc7, > > > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where > necessary. > > > However, still no luck on the build. > > > > > > Here is the output from my latest try: > > > > > > bash-3.2$ python setup.py build > > > running build > > > running build_py > > > running build_ext > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > building 'ccplot.hdf' extension > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > > -fno-common > > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > -DNDEBUG -g -Os > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > > In file included from ccplot/hdf.c:314: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > warning: > > > unused function '_import_array' [-Wunused-function] > > > _import_array(void) > > > ^ > > > In file included from ccplot/hdf.c:315: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > warning: > > > unused function '_import_umath' [-Wunused-function] > > > _import_umath(void) > > > ^ > > > 2 warnings generated. > > > In file included from ccplot/hdf.c:314: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > warning: > > > unused function '_import_array' [-Wunused-function] > > > _import_array(void) > > > ^ > > > In file included from ccplot/hdf.c:315: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > warning: > > > unused function '_import_umath' [-Wunused-function] > > > _import_umath(void) > > > ^ > > > 2 warnings generated. > > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch > > x86_64 > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg > > -lz -o > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > > ld: library not found for -lmfhdf > > > clang: error: linker command failed with exit code 1 (use -v > to see > > > invocation) > > > error: command 'clang' failed with exit status 1 > > > > > > Hopefully this is also an easy fix. Best, > > > > > > Ryan > > > > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > Hi Ryan, > > > > > > Thanks for the follow-up. It is nice to hear you find ccplot > > useful. > > > > > > I was afraid there may be more problems. I'm sure other mac > > users will > > > be happy to see this sorted out. > > > > > > The reason is that MAX_VAR_DIMS is only available when HDF4 > > was compiled > > > with netcdf-3 compatibility. It should be easy to fix by > > replacing all > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > > > Please try an updated version from github: > > > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > > > Regards, > > > > > > Peter > > > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > > Hello Peter, > > > > > > > > I very much appreciate the timely response and your > > willingness to > > > help. > > > > I was happy to see that a new version of ccplot was > > available without > > > > the PyNIO dependency, which has prevented me from using it > > in the > > > past. > > > > ccplot appears to be far superior than what is > possible using > > > Matlab and > > > > NCAR Command Language! > > > > > > > > I have modified line 24 of setup.py to reflect > > '/opt/local/include' as > > > > well, and I no longer receive the error regarding > hntdefs.h. > > > > > > > > Unfortunately, though I'm presented with a new error. To > > give you as > > > > much detail as possible, here's the new issue: > > > > > > > > "bash-3.2$ python setup.py build > > > > running build > > > > running build_py > > > > running build_ext > > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > > building 'ccplot.hdf' extension > > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os > -pipe > > > -fno-common > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > -DENABLE_DTRACE > > -DMACOSX > > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > > -DNDEBUG -g -Os > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > > x86_64 > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > clang: warning: argument unused during compilation: > > '-mno-fused-madd' > > > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > > > 'MAX_VAR_DIMS' > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > (unlikely(!__pyx_t_1)) > > > > {__pyx_filename =... > > > > ^ > > > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > > > 'MAX_VAR_DIMS' > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > (unlikely(!__pyx_t_1)) > > > > {__pyx_filename =... > > > > ^ > > > > 2 errors generated. > > > > error: command 'clang' failed with exit status 1" > > > > > > > > Perhaps there is an easy fix? > > > > > > > > Best, > > > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > <mailto:pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>>> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>>>> > > > wrote: > > > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > > I have installed all dependencies for ccplot. > However, > > when > > > > attempting to build ccplot before installation, I > > receive the > > > > following error message: > > > > > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file > > not found > > > > > #include "hntdefs.h" > > > > > ^ > > > > > 1 error generated. > > > > > error: command 'clang' failed with exit status 1" > > > > > > > > > > I do, however, have the hdf4 library installed (via > > > MacPorts), the > > > > following > > > > > > > > > > bash-3.2$ locate hntdefs.h > > > > > /opt/local/include/hntdefs.h > > > > > > > > > > shows that I do have this file. Could anyone please > > point me in > > > > the right direction? > > > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > > > Ryan > > > > > > > > Dear Ryan, > > > > > > > > Sorry - I think this is a problem with ccplot rather > > than your > > > > configuration. It assumes that hdf is available > under either > > > > /usr/include/hdf or /usr/local/include/hdf, which > is a valid > > > assumption > > > > on linux, but not on mac. For now, could you > please just add > > > the path to > > > > hdf_include_dirs in setup.py? > > > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > > '/usr/local/include/hdf'] > > > > + hdf_include_dirs = ['/usr/include/hdf', > > > '/usr/local/include/hdf', > > > > '/opt/local/include'] > > > > > > > > (line 24) > > > > > > > > Unfortunately, I don't have access to a mac system for > > testing > > > now, so I > > > > would not find out. Hopefully, darwin will be good > > enough for > > > this. I'll > > > > try to fix these issues soon. > > > > > > > > Thank you very much for reporting the problem. > > > > > > > > Regards, > > > > > > > > Peter > > > > > > > > > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 20:48:58
|
Ryan, It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is 32-bit (or vice-versa). Could you please try: file `which python` file /opt/local/lib/libhdfeos.0.dylib python -V python -c 'import platform; print platform.machine(); print platform.architecture()' Also if you can tell me your Mac OS X version... Hopefully, having more information will help. Cheers, Peter On 11/22/2013 08:57 PM, Ryan Scott wrote: > Hi Peter, > > Unfortunately, I'm running into new trouble. Perhaps the issue might be > specific to my machine? > > Here is output from a simple command which should work if installation > were successful. > > bash-3.2$ ccplot -V > Traceback (most recent call last): > File "/usr/local/bin/ccplot", line 56, in <module> > from ccplot.hdfeos import HDFEOS > ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > 2): Symbol not found: _for_init > Referenced from: /opt/local/lib/libhdfeos.0.dylib > Expected in: flat namespace > in /opt/local/lib/libhdfeos.0.dylib > > Thanks, > > Ryan > > > > > > On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... > <mailto:rsc...@gm...>> wrote: > > Hey Peter, > > I just ran the build script (using the latest setup.py file that you > sent in the last message) and didn't receive any errors like those > that have been causing a forced exit on previous attempts. I ran > sudo python setup.py install and it seems to check out alright. Is > there a way of testing the install to ensure that everything should > work correctly before I embark on learning how to use ccplot? > > Attached is the previous setup.py script that resided in ccplot-master. > > Many thanks for your patience and assistance, > > Ryan > > > On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > Yes it helped! The library_dirs option is apparently not even > applied. > Could you please send me your current setup.py - in case > anything was > wrongly applied? > > Attached is one that should have all modifications needed. > > Peter > > On 11/22/2013 08:11 PM, Ryan Scott wrote: > > Hi Peter, > > > > Here's the build output after having applied the .diff file in the > > ccplot-master directory: > > > > bash-3.2$ cd ~/Desktop/ccplot-master/ > > bash-3.2$ ls > > LICENSEccplot > > MANIFEST.inccplot-verbose-link.diff > > NEWScmap > > README.mdman > > binsetup.py > > buildtest > > bash-3.2$ patch < ccplot-verbose-link.diff > > (Stripping trailing CRs from patch.) > > patching file setup.py > > bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG > -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 > -arch x86_64 > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg -lz -o > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > > Target: x86_64-apple-darwin12.4.0 > > Thread model: posix > > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle > -macosx_version_min > > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg -lz > > -arch_multiple -final_output > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > > ld: library not found for -lmfhdf > > clang: error: linker command failed with exit code 1 (use -v > to see > > invocation) > > error: command 'clang' failed with exit status 1 > > > > Hopefully this helps! > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> wrote: > > > > Hi Ryan, > > > > dylib is the equivalent of so files on other unix systems. > The linker > > should find the library just fine if it is indeed located > under > > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. > > > > The best I can think of is to add a verbose flag to the > linker to get a > > more detailed error report. A patch is attached. It can be > applied with: > > > > patch < ccplot-verbose-link.diff > > > > in the ccplot directory. If you can send me the build > output that would > > be great. > > > > Regards, > > > > Peter > > > > On 11/22/2013 06:47 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > After receiving the same error with the up-to-date > ccplot-master, I > > > checked /opt/local/lib and I have the following > libmfhdf* files > > > > > > libmfhdf.0.dylib > > > libmfhdf.a > > > libmfhdf.dylib > > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > <http://libmfhdf.la> > > > > > > The lack of the libmfhdf.so file is presumably then the > root of the > > > error. Do you know where this can be obtained? > > > > > > Best, Ryan > > > > > > > > > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > Hi Ryan, > > > > > > I think this could be a similar problem as with the > include > > path. The > > > solution depends on where the libmfhdf.so library > is, I assume > > it is > > > /opt/local/lib. Please try adding the path to > hdf_library_dirs in > > > setup.py: > > > > > > - hdf_library_dirs = [] > > > + hdf_library_dirs = ['/opt/local/lib'] > > > > > > (line 25) > > > > > > Or, if it does not work, please try locate libmfhdf.so. > > > > > > The current master incorporates both fixes for the > include > > path and > > > MAX_VAR_DIMS. > > > > > > Regards, > > > > > > Peter > > > > > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > > > Hello Peter, > > > > > > > > I have attempted to build both ccplot-master as > well as > > > ccplot-1.5-rc7, > > > > ensuring that hdf.c everywhere reads > H4_MAX_VAR_DIMS where > > necessary. > > > > However, still no luck on the build. > > > > > > > > Here is the output from my latest try: > > > > > > > > bash-3.2$ python setup.py build > > > > running build > > > > running build_py > > > > running build_ext > > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > > building 'ccplot.hdf' extension > > > > clang -fno-strict-aliasing -fno-common -dynamic -g > -Os -pipe > > > -fno-common > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > -DENABLE_DTRACE > > -DMACOSX > > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > > -DNDEBUG -g -Os > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch > i386 -arch > > x86_64 > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > clang: warning: argument unused during compilation: > > '-mno-fused-madd' > > > > In file included from ccplot/hdf.c:314: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > > warning: > > > > unused function '_import_array' > [-Wunused-function] > > > > _import_array(void) > > > > ^ > > > > In file included from ccplot/hdf.c:315: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > > warning: > > > > unused function '_import_umath' > [-Wunused-function] > > > > _import_umath(void) > > > > ^ > > > > 2 warnings generated. > > > > In file included from ccplot/hdf.c:314: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > > warning: > > > > unused function '_import_array' > [-Wunused-function] > > > > _import_array(void) > > > > ^ > > > > In file included from ccplot/hdf.c:315: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > > warning: > > > > unused function '_import_umath' > [-Wunused-function] > > > > _import_umath(void) > > > > ^ > > > > 2 warnings generated. > > > > clang -bundle -undefined dynamic_lookup -Wl,-F. > -arch i386 -arch > > > x86_64 > > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > -lmfhdf -ldf > > -ljpeg > > > -lz -o > > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > > > ld: library not found for -lmfhdf > > > > clang: error: linker command failed with exit code > 1 (use -v > > to see > > > > invocation) > > > > error: command 'clang' failed with exit status 1 > > > > > > > > Hopefully this is also an easy fix. Best, > > > > > > > > Ryan > > > > > > > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > > > <pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>>>> > > > wrote: > > > > > > > > Hi Ryan, > > > > > > > > Thanks for the follow-up. It is nice to hear > you find ccplot > > > useful. > > > > > > > > I was afraid there may be more problems. I'm > sure other mac > > > users will > > > > be happy to see this sorted out. > > > > > > > > The reason is that MAX_VAR_DIMS is only > available when HDF4 > > > was compiled > > > > with netcdf-3 compatibility. It should be easy > to fix by > > > replacing all > > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > > > > > Please try an updated version from github: > > > > > > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > > > > > Regards, > > > > > > > > Peter > > > > > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > > > Hello Peter, > > > > > > > > > > I very much appreciate the timely response > and your > > > willingness to > > > > help. > > > > > I was happy to see that a new version of > ccplot was > > > available without > > > > > the PyNIO dependency, which has prevented me > from using it > > > in the > > > > past. > > > > > ccplot appears to be far superior than what is > > possible using > > > > Matlab and > > > > > NCAR Command Language! > > > > > > > > > > I have modified line 24 of setup.py to reflect > > > '/opt/local/include' as > > > > > well, and I no longer receive the error > regarding > > hntdefs.h. > > > > > > > > > > Unfortunately, though I'm presented with a > new error. To > > > give you as > > > > > much detail as possible, here's the new issue: > > > > > > > > > > "bash-3.2$ python setup.py build > > > > > running build > > > > > running build_py > > > > > running build_ext > > > > > skipping 'ccplot/hdf.c' Cython extension > (up-to-date) > > > > > building 'ccplot.hdf' extension > > > > > clang -fno-strict-aliasing -fno-common > -dynamic -g -Os > > -pipe > > > > -fno-common > > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > > -DENABLE_DTRACE > > > -DMACOSX > > > > > -DNDEBUG -Wall -Wstrict-prototypes > -Wshorten-64-to-32 > > > -DNDEBUG -g -Os > > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE > -arch i386 -arch > > > x86_64 > > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > > -I/usr/include/hdf > > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > > -c ccplot/hdf.c -o > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > > clang: warning: argument unused during > compilation: > > > '-mno-fused-madd' > > > > > ccplot/hdf.c:5266:30: error: use of > undeclared identifier > > > > 'MAX_VAR_DIMS' > > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > > (unlikely(!__pyx_t_1)) > > > > > {__pyx_filename =... > > > > > ^ > > > > > ccplot/hdf.c:7066:30: error: use of > undeclared identifier > > > > 'MAX_VAR_DIMS' > > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > > (unlikely(!__pyx_t_1)) > > > > > {__pyx_filename =... > > > > > ^ > > > > > 2 errors generated. > > > > > error: command 'clang' failed with exit > status 1" > > > > > > > > > > Perhaps there is an easy fix? > > > > > > > > > > Best, > > > > > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > > > <pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>>>> > > > > wrote: > > > > > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > > > I have installed all dependencies for > ccplot. > > However, > > > when > > > > > attempting to build ccplot before > installation, I > > > receive the > > > > > following error message: > > > > > > > > > > > > "ccplot/hdf.c:317:10: fatal error: > 'hntdefs.h' file > > > not found > > > > > > #include "hntdefs.h" > > > > > > ^ > > > > > > 1 error generated. > > > > > > error: command 'clang' failed with > exit status 1" > > > > > > > > > > > > I do, however, have the hdf4 library > installed (via > > > > MacPorts), the > > > > > following > > > > > > > > > > > > bash-3.2$ locate hntdefs.h > > > > > > /opt/local/include/hntdefs.h > > > > > > > > > > > > shows that I do have this file. Could > anyone please > > > point me in > > > > > the right direction? > > > > > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > > > > > Ryan > > > > > > > > > > Dear Ryan, > > > > > > > > > > Sorry - I think this is a problem with > ccplot rather > > > than your > > > > > configuration. It assumes that hdf is > available > > under either > > > > > /usr/include/hdf or > /usr/local/include/hdf, which > > is a valid > > > > assumption > > > > > on linux, but not on mac. For now, could you > > please just add > > > > the path to > > > > > hdf_include_dirs in setup.py? > > > > > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > > > '/usr/local/include/hdf'] > > > > > + hdf_include_dirs = ['/usr/include/hdf', > > > > '/usr/local/include/hdf', > > > > > '/opt/local/include'] > > > > > > > > > > (line 24) > > > > > > > > > > Unfortunately, I don't have access to a > mac system for > > > testing > > > > now, so I > > > > > would not find out. Hopefully, darwin > will be good > > > enough for > > > > this. I'll > > > > > try to fix these issues soon. > > > > > > > > > > Thank you very much for reporting the > problem. > > > > > > > > > > Regards, > > > > > > > > > > Peter > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 21:04:25
|
Ryan, The man page for the mac version of python mentions that it runs 64-bit by default, but it can be instructed to run 32-bit with: export VERSIONER_PYTHON_PREFER_32_BIT=yes So you can try setting this environment variable before running ccplot -V. But I'm not sure if it helps. Peter On 11/22/2013 09:48 PM, Peter Kuma wrote: > Ryan, > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > 32-bit (or vice-versa). Could you please try: > > file `which python` > file /opt/local/lib/libhdfeos.0.dylib > python -V > python -c 'import platform; print platform.machine(); print > platform.architecture()' > > Also if you can tell me your Mac OS X version... > > Hopefully, having more information will help. > > Cheers, > > Peter > > On 11/22/2013 08:57 PM, Ryan Scott wrote: >> Hi Peter, >> >> Unfortunately, I'm running into new trouble. Perhaps the issue might be >> specific to my machine? >> >> Here is output from a simple command which should work if installation >> were successful. >> >> bash-3.2$ ccplot -V >> Traceback (most recent call last): >> File "/usr/local/bin/ccplot", line 56, in <module> >> from ccplot.hdfeos import HDFEOS >> ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, >> 2): Symbol not found: _for_init >> Referenced from: /opt/local/lib/libhdfeos.0.dylib >> Expected in: flat namespace >> in /opt/local/lib/libhdfeos.0.dylib >> >> Thanks, >> >> Ryan >> >> >> >> >> >> On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... >> <mailto:rsc...@gm...>> wrote: >> >> Hey Peter, >> >> I just ran the build script (using the latest setup.py file that you >> sent in the last message) and didn't receive any errors like those >> that have been causing a forced exit on previous attempts. I ran >> sudo python setup.py install and it seems to check out alright. Is >> there a way of testing the install to ensure that everything should >> work correctly before I embark on learning how to use ccplot? >> >> Attached is the previous setup.py script that resided in ccplot-master. >> >> Many thanks for your patience and assistance, >> >> Ryan >> >> >> On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma <pet...@wa... >> <mailto:pet...@wa...>> wrote: >> >> Ryan, >> >> Yes it helped! The library_dirs option is apparently not even >> applied. >> Could you please send me your current setup.py - in case >> anything was >> wrongly applied? >> >> Attached is one that should have all modifications needed. >> >> Peter >> >> On 11/22/2013 08:11 PM, Ryan Scott wrote: >> > Hi Peter, >> > >> > Here's the build output after having applied the .diff file in the >> > ccplot-master directory: >> > >> > bash-3.2$ cd ~/Desktop/ccplot-master/ >> > bash-3.2$ ls >> > LICENSEccplot >> > MANIFEST.inccplot-verbose-link.diff >> > NEWScmap >> > README.mdman >> > binsetup.py >> > buildtest >> > bash-3.2$ patch < ccplot-verbose-link.diff >> > (Stripping trailing CRs from patch.) >> > patching file setup.py >> > bash-3.2$ python setup.py build >> > running build >> > running build_py >> > running build_ext >> > skipping 'ccplot/hdf.c' Cython extension (up-to-date) >> > building 'ccplot.hdf' extension >> > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe >> -fno-common >> > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE >> -DMACOSX >> > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG >> -g -Os >> > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 >> > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf >> > -I/usr/local/include/hdf -I/opt/local/include >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > clang: warning: argument unused during compilation: >> '-mno-fused-madd' >> > In file included from ccplot/hdf.c:314: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > warning: >> > unused function '_import_array' [-Wunused-function] >> > _import_array(void) >> > ^ >> > In file included from ccplot/hdf.c:315: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > warning: >> > unused function '_import_umath' [-Wunused-function] >> > _import_umath(void) >> > ^ >> > 2 warnings generated. >> > In file included from ccplot/hdf.c:314: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > warning: >> > unused function '_import_array' [-Wunused-function] >> > _import_array(void) >> > ^ >> > In file included from ccplot/hdf.c:315: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > warning: >> > unused function '_import_umath' [-Wunused-function] >> > _import_umath(void) >> > ^ >> > 2 warnings generated. >> > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 >> -arch x86_64 >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib >> > -I/Users/ryan/Desktop/src/boost_1_53_0 >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf >> -ljpeg -lz -o >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v >> > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) >> > Target: x86_64-apple-darwin12.4.0 >> > Thread model: posix >> > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle >> -macosx_version_min >> > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o >> > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf >> -ljpeg -lz >> > -arch_multiple -final_output >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a >> > ld: library not found for -lmfhdf >> > clang: error: linker command failed with exit code 1 (use -v >> to see >> > invocation) >> > error: command 'clang' failed with exit status 1 >> > >> > Hopefully this helps! >> > >> > -Ryan >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma >> <pet...@wa... <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>> wrote: >> > >> > Hi Ryan, >> > >> > dylib is the equivalent of so files on other unix systems. >> The linker >> > should find the library just fine if it is indeed located >> under >> > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. >> > >> > The best I can think of is to add a verbose flag to the >> linker to get a >> > more detailed error report. A patch is attached. It can be >> applied with: >> > >> > patch < ccplot-verbose-link.diff >> > >> > in the ccplot directory. If you can send me the build >> output that would >> > be great. >> > >> > Regards, >> > >> > Peter >> > >> > On 11/22/2013 06:47 PM, Ryan Scott wrote: >> > > Hi Peter, >> > > >> > > After receiving the same error with the up-to-date >> ccplot-master, I >> > > checked /opt/local/lib and I have the following >> libmfhdf* files >> > > >> > > libmfhdf.0.dylib >> > > libmfhdf.a >> > > libmfhdf.dylib >> > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> >> <http://libmfhdf.la> >> > > >> > > The lack of the libmfhdf.so file is presumably then the >> root of the >> > > error. Do you know where this can be obtained? >> > > >> > > Best, Ryan >> > > >> > > >> > > >> > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma >> > <pet...@wa... <mailto:pet...@wa...> >> <mailto:pet...@wa... <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>> >> > wrote: >> > > >> > > Hi Ryan, >> > > >> > > I think this could be a similar problem as with the >> include >> > path. The >> > > solution depends on where the libmfhdf.so library >> is, I assume >> > it is >> > > /opt/local/lib. Please try adding the path to >> hdf_library_dirs in >> > > setup.py: >> > > >> > > - hdf_library_dirs = [] >> > > + hdf_library_dirs = ['/opt/local/lib'] >> > > >> > > (line 25) >> > > >> > > Or, if it does not work, please try locate libmfhdf.so. >> > > >> > > The current master incorporates both fixes for the >> include >> > path and >> > > MAX_VAR_DIMS. >> > > >> > > Regards, >> > > >> > > Peter >> > > >> > > On 11/22/2013 01:38 AM, Ryan Scott wrote: >> > > > Hello Peter, >> > > > >> > > > I have attempted to build both ccplot-master as >> well as >> > > ccplot-1.5-rc7, >> > > > ensuring that hdf.c everywhere reads >> H4_MAX_VAR_DIMS where >> > necessary. >> > > > However, still no luck on the build. >> > > > >> > > > Here is the output from my latest try: >> > > > >> > > > bash-3.2$ python setup.py build >> > > > running build >> > > > running build_py >> > > > running build_ext >> > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) >> > > > building 'ccplot.hdf' extension >> > > > clang -fno-strict-aliasing -fno-common -dynamic -g >> -Os -pipe >> > > -fno-common >> > > > -fno-strict-aliasing -fwrapv -mno-fused-madd >> -DENABLE_DTRACE >> > -DMACOSX >> > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 >> > -DNDEBUG -g -Os >> > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch >> i386 -arch >> > x86_64 >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe >> -I/usr/include/hdf >> > > > -I/usr/local/include/hdf -I/opt/local/include >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > > > -c ccplot/hdf.c -o >> build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > > > clang: warning: argument unused during compilation: >> > '-mno-fused-madd' >> > > > In file included from ccplot/hdf.c:314: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > > > warning: >> > > > unused function '_import_array' >> [-Wunused-function] >> > > > _import_array(void) >> > > > ^ >> > > > In file included from ccplot/hdf.c:315: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > > > warning: >> > > > unused function '_import_umath' >> [-Wunused-function] >> > > > _import_umath(void) >> > > > ^ >> > > > 2 warnings generated. >> > > > In file included from ccplot/hdf.c:314: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > > > warning: >> > > > unused function '_import_array' >> [-Wunused-function] >> > > > _import_array(void) >> > > > ^ >> > > > In file included from ccplot/hdf.c:315: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > > > warning: >> > > > unused function '_import_umath' >> [-Wunused-function] >> > > > _import_umath(void) >> > > > ^ >> > > > 2 warnings generated. >> > > > clang -bundle -undefined dynamic_lookup -Wl,-F. >> -arch i386 -arch >> > > x86_64 >> > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 >> > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> -lmfhdf -ldf >> > -ljpeg >> > > -lz -o >> > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so >> > > > ld: library not found for -lmfhdf >> > > > clang: error: linker command failed with exit code >> 1 (use -v >> > to see >> > > > invocation) >> > > > error: command 'clang' failed with exit status 1 >> > > > >> > > > Hopefully this is also an easy fix. Best, >> > > > >> > > > Ryan >> > > > >> > > > >> > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma >> > > <pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>> >> > > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>>>> >> > > wrote: >> > > > >> > > > Hi Ryan, >> > > > >> > > > Thanks for the follow-up. It is nice to hear >> you find ccplot >> > > useful. >> > > > >> > > > I was afraid there may be more problems. I'm >> sure other mac >> > > users will >> > > > be happy to see this sorted out. >> > > > >> > > > The reason is that MAX_VAR_DIMS is only >> available when HDF4 >> > > was compiled >> > > > with netcdf-3 compatibility. It should be easy >> to fix by >> > > replacing all >> > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. >> > > > >> > > > Please try an updated version from github: >> > > > >> > > > >> https://github.com/peterkuma/ccplot/archive/master.zip >> > > > >> > > > Regards, >> > > > >> > > > Peter >> > > > >> > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: >> > > > > Hello Peter, >> > > > > >> > > > > I very much appreciate the timely response >> and your >> > > willingness to >> > > > help. >> > > > > I was happy to see that a new version of >> ccplot was >> > > available without >> > > > > the PyNIO dependency, which has prevented me >> from using it >> > > in the >> > > > past. >> > > > > ccplot appears to be far superior than what is >> > possible using >> > > > Matlab and >> > > > > NCAR Command Language! >> > > > > >> > > > > I have modified line 24 of setup.py to reflect >> > > '/opt/local/include' as >> > > > > well, and I no longer receive the error >> regarding >> > hntdefs.h. >> > > > > >> > > > > Unfortunately, though I'm presented with a >> new error. To >> > > give you as >> > > > > much detail as possible, here's the new issue: >> > > > > >> > > > > "bash-3.2$ python setup.py build >> > > > > running build >> > > > > running build_py >> > > > > running build_ext >> > > > > skipping 'ccplot/hdf.c' Cython extension >> (up-to-date) >> > > > > building 'ccplot.hdf' extension >> > > > > clang -fno-strict-aliasing -fno-common >> -dynamic -g -Os >> > -pipe >> > > > -fno-common >> > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd >> > -DENABLE_DTRACE >> > > -DMACOSX >> > > > > -DNDEBUG -Wall -Wstrict-prototypes >> -Wshorten-64-to-32 >> > > -DNDEBUG -g -Os >> > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE >> -arch i386 -arch >> > > x86_64 >> > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe >> > -I/usr/include/hdf >> > > > > -I/usr/local/include/hdf -I/opt/local/include >> > > > > >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > > > > >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > > > > -c ccplot/hdf.c -o >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > > > > clang: warning: argument unused during >> compilation: >> > > '-mno-fused-madd' >> > > > > ccplot/hdf.c:5266:30: error: use of >> undeclared identifier >> > > > 'MAX_VAR_DIMS' >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if >> > > (unlikely(!__pyx_t_1)) >> > > > > {__pyx_filename =... >> > > > > ^ >> > > > > ccplot/hdf.c:7066:30: error: use of >> undeclared identifier >> > > > 'MAX_VAR_DIMS' >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if >> > > (unlikely(!__pyx_t_1)) >> > > > > {__pyx_filename =... >> > > > > ^ >> > > > > 2 errors generated. >> > > > > error: command 'clang' failed with exit >> status 1" >> > > > > >> > > > > Perhaps there is an easy fix? >> > > > > >> > > > > Best, >> > > > > >> > > > > -Ryan >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma >> > > > <pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>> >> > > > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>> <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>>>> >> > > > wrote: >> > > > > >> > > > > On 11/21/2013 02:07 AM, ryan scott wrote: >> > > > > > I have installed all dependencies for >> ccplot. >> > However, >> > > when >> > > > > attempting to build ccplot before >> installation, I >> > > receive the >> > > > > following error message: >> > > > > > >> > > > > > "ccplot/hdf.c:317:10: fatal error: >> 'hntdefs.h' file >> > > not found >> > > > > > #include "hntdefs.h" >> > > > > > ^ >> > > > > > 1 error generated. >> > > > > > error: command 'clang' failed with >> exit status 1" >> > > > > > >> > > > > > I do, however, have the hdf4 library >> installed (via >> > > > MacPorts), the >> > > > > following >> > > > > > >> > > > > > bash-3.2$ locate hntdefs.h >> > > > > > /opt/local/include/hntdefs.h >> > > > > > >> > > > > > shows that I do have this file. Could >> anyone please >> > > point me in >> > > > > the right direction? >> > > > > > >> > > > > > Any help is very much appreciated. Thanks, >> > > > > > >> > > > > > Ryan >> > > > > >> > > > > Dear Ryan, >> > > > > >> > > > > Sorry - I think this is a problem with >> ccplot rather >> > > than your >> > > > > configuration. It assumes that hdf is >> available >> > under either >> > > > > /usr/include/hdf or >> /usr/local/include/hdf, which >> > is a valid >> > > > assumption >> > > > > on linux, but not on mac. For now, could you >> > please just add >> > > > the path to >> > > > > hdf_include_dirs in setup.py? >> > > > > >> > > > > - hdf_include_dirs = ['/usr/include/hdf', >> > > > '/usr/local/include/hdf'] >> > > > > + hdf_include_dirs = ['/usr/include/hdf', >> > > > '/usr/local/include/hdf', >> > > > > '/opt/local/include'] >> > > > > >> > > > > (line 24) >> > > > > >> > > > > Unfortunately, I don't have access to a >> mac system for >> > > testing >> > > > now, so I >> > > > > would not find out. Hopefully, darwin >> will be good >> > > enough for >> > > > this. I'll >> > > > > try to fix these issues soon. >> > > > > >> > > > > Thank you very much for reporting the >> problem. >> > > > > >> > > > > Regards, >> > > > > >> > > > > Peter >> > > > > >> > > > > >> > > > >> > > > >> > > >> > > >> > >> > >> >> >> > |
From: Ryan S. <rsc...@gm...> - 2013-11-22 21:20:57
|
Hi Peter, My machine is running Mac OS X 10.8.4. Here's the requested output: bash-3.2$ file `which python` /usr/bin/python: Mach-O universal binary with 2 architectures /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64 bash-3.2$ python -V Python 2.7.2 bash-3.2$ python -c 'import platform; print platform.machine(); print > platform.architecture()' x86_64 And here's output from ccplot -V bash-3.2$ ccplot -V Traceback (most recent call last): File "/usr/local/bin/ccplot", line 53, in <module> from mpl_toolkits import basemap File "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 37, in <module> import _geoslib ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): Symbol not found: _GEOSArea Referenced from: /Library/Python/2.7/site-packages/_geoslib.so Expected in: flat namespace in /Library/Python/2.7/site-packages/_geoslib.so Thanks! Ryan On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa...> wrote: > Ryan, > > The man page for the mac version of python mentions that it runs 64-bit > by default, but it can be instructed to run 32-bit with: > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > So you can try setting this environment variable before running ccplot > -V. But I'm not sure if it helps. > > Peter > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > Ryan, > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > > 32-bit (or vice-versa). Could you please try: > > > > file `which python` > > file /opt/local/lib/libhdfeos.0.dylib > > python -V > > python -c 'import platform; print platform.machine(); print > > platform.architecture()' > > > > Also if you can tell me your Mac OS X version... > > > > Hopefully, having more information will help. > > > > Cheers, > > > > Peter > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > >> Hi Peter, > >> > >> Unfortunately, I'm running into new trouble. Perhaps the issue might be > >> specific to my machine? > >> > >> Here is output from a simple command which should work if installation > >> were successful. > >> > >> bash-3.2$ ccplot -V > >> Traceback (most recent call last): > >> File "/usr/local/bin/ccplot", line 56, in <module> > >> from ccplot.hdfeos import HDFEOS > >> ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > >> 2): Symbol not found: _for_init > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > >> Expected in: flat namespace > >> in /opt/local/lib/libhdfeos.0.dylib > >> > >> Thanks, > >> > >> Ryan > >> > >> > >> > >> > >> > >> On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... > >> <mailto:rsc...@gm...>> wrote: > >> > >> Hey Peter, > >> > >> I just ran the build script (using the latest setup.py file that you > >> sent in the last message) and didn't receive any errors like those > >> that have been causing a forced exit on previous attempts. I ran > >> sudo python setup.py install and it seems to check out alright. Is > >> there a way of testing the install to ensure that everything should > >> work correctly before I embark on learning how to use ccplot? > >> > >> Attached is the previous setup.py script that resided in > ccplot-master. > >> > >> Many thanks for your patience and assistance, > >> > >> Ryan > >> > >> > >> On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma < > pet...@wa... > >> <mailto:pet...@wa...>> wrote: > >> > >> Ryan, > >> > >> Yes it helped! The library_dirs option is apparently not even > >> applied. > >> Could you please send me your current setup.py - in case > >> anything was > >> wrongly applied? > >> > >> Attached is one that should have all modifications needed. > >> > >> Peter > >> > >> On 11/22/2013 08:11 PM, Ryan Scott wrote: > >> > Hi Peter, > >> > > >> > Here's the build output after having applied the .diff file > in the > >> > ccplot-master directory: > >> > > >> > bash-3.2$ cd ~/Desktop/ccplot-master/ > >> > bash-3.2$ ls > >> > LICENSEccplot > >> > MANIFEST.inccplot-verbose-link.diff > >> > NEWScmap > >> > README.mdman > >> > binsetup.py > >> > buildtest > >> > bash-3.2$ patch < ccplot-verbose-link.diff > >> > (Stripping trailing CRs from patch.) > >> > patching file setup.py > >> > bash-3.2$ python setup.py build > >> > running build > >> > running build_py > >> > running build_ext > >> > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > >> > building 'ccplot.hdf' extension > >> > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > >> -fno-common > >> > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > >> -DMACOSX > >> > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG > >> -g -Os > >> > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > >> > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > >> > -I/usr/local/include/hdf -I/opt/local/include > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > clang: warning: argument unused during compilation: > >> '-mno-fused-madd' > >> > In file included from ccplot/hdf.c:314: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > warning: > >> > unused function '_import_array' [-Wunused-function] > >> > _import_array(void) > >> > ^ > >> > In file included from ccplot/hdf.c:315: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > warning: > >> > unused function '_import_umath' [-Wunused-function] > >> > _import_umath(void) > >> > ^ > >> > 2 warnings generated. > >> > In file included from ccplot/hdf.c:314: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > warning: > >> > unused function '_import_array' [-Wunused-function] > >> > _import_array(void) > >> > ^ > >> > In file included from ccplot/hdf.c:315: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > warning: > >> > unused function '_import_umath' [-Wunused-function] > >> > _import_umath(void) > >> > ^ > >> > 2 warnings generated. > >> > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 > >> -arch x86_64 > >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > >> > -I/Users/ryan/Desktop/src/boost_1_53_0 > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > >> -ljpeg -lz -o > >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > >> > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > >> > Target: x86_64-apple-darwin12.4.0 > >> > Thread model: posix > >> > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle > >> -macosx_version_min > >> > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > >> > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > >> -ljpeg -lz > >> > -arch_multiple -final_output > >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > >> > ld: library not found for -lmfhdf > >> > clang: error: linker command failed with exit code 1 (use -v > >> to see > >> > invocation) > >> > error: command 'clang' failed with exit status 1 > >> > > >> > Hopefully this helps! > >> > > >> > -Ryan > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma > >> <pet...@wa... <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> wrote: > >> > > >> > Hi Ryan, > >> > > >> > dylib is the equivalent of so files on other unix systems. > >> The linker > >> > should find the library just fine if it is indeed located > >> under > >> > /opt/local/lib/libmfhdf.dylib. I don't know why it does > not. > >> > > >> > The best I can think of is to add a verbose flag to the > >> linker to get a > >> > more detailed error report. A patch is attached. It can be > >> applied with: > >> > > >> > patch < ccplot-verbose-link.diff > >> > > >> > in the ccplot directory. If you can send me the build > >> output that would > >> > be great. > >> > > >> > Regards, > >> > > >> > Peter > >> > > >> > On 11/22/2013 06:47 PM, Ryan Scott wrote: > >> > > Hi Peter, > >> > > > >> > > After receiving the same error with the up-to-date > >> ccplot-master, I > >> > > checked /opt/local/lib and I have the following > >> libmfhdf* files > >> > > > >> > > libmfhdf.0.dylib > >> > > libmfhdf.a > >> > > libmfhdf.dylib > >> > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > >> <http://libmfhdf.la> > >> > > > >> > > The lack of the libmfhdf.so file is presumably then the > >> root of the > >> > > error. Do you know where this can be obtained? > >> > > > >> > > Best, Ryan > >> > > > >> > > > >> > > > >> > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > >> > <pet...@wa... <mailto:pet...@wa...> > >> <mailto:pet...@wa... <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>> > >> > wrote: > >> > > > >> > > Hi Ryan, > >> > > > >> > > I think this could be a similar problem as with the > >> include > >> > path. The > >> > > solution depends on where the libmfhdf.so library > >> is, I assume > >> > it is > >> > > /opt/local/lib. Please try adding the path to > >> hdf_library_dirs in > >> > > setup.py: > >> > > > >> > > - hdf_library_dirs = [] > >> > > + hdf_library_dirs = ['/opt/local/lib'] > >> > > > >> > > (line 25) > >> > > > >> > > Or, if it does not work, please try locate > libmfhdf.so. > >> > > > >> > > The current master incorporates both fixes for the > >> include > >> > path and > >> > > MAX_VAR_DIMS. > >> > > > >> > > Regards, > >> > > > >> > > Peter > >> > > > >> > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > >> > > > Hello Peter, > >> > > > > >> > > > I have attempted to build both ccplot-master as > >> well as > >> > > ccplot-1.5-rc7, > >> > > > ensuring that hdf.c everywhere reads > >> H4_MAX_VAR_DIMS where > >> > necessary. > >> > > > However, still no luck on the build. > >> > > > > >> > > > Here is the output from my latest try: > >> > > > > >> > > > bash-3.2$ python setup.py build > >> > > > running build > >> > > > running build_py > >> > > > running build_ext > >> > > > skipping 'ccplot/hdf.c' Cython extension > (up-to-date) > >> > > > building 'ccplot.hdf' extension > >> > > > clang -fno-strict-aliasing -fno-common -dynamic -g > >> -Os -pipe > >> > > -fno-common > >> > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > >> -DENABLE_DTRACE > >> > -DMACOSX > >> > > > -DNDEBUG -Wall -Wstrict-prototypes > -Wshorten-64-to-32 > >> > -DNDEBUG -g -Os > >> > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch > >> i386 -arch > >> > x86_64 > >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > >> -I/usr/include/hdf > >> > > > -I/usr/local/include/hdf -I/opt/local/include > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > > > -c ccplot/hdf.c -o > >> build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > > > clang: warning: argument unused during > compilation: > >> > '-mno-fused-madd' > >> > > > In file included from ccplot/hdf.c:314: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > > > warning: > >> > > > unused function '_import_array' > >> [-Wunused-function] > >> > > > _import_array(void) > >> > > > ^ > >> > > > In file included from ccplot/hdf.c:315: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > > > warning: > >> > > > unused function '_import_umath' > >> [-Wunused-function] > >> > > > _import_umath(void) > >> > > > ^ > >> > > > 2 warnings generated. > >> > > > In file included from ccplot/hdf.c:314: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > > > warning: > >> > > > unused function '_import_array' > >> [-Wunused-function] > >> > > > _import_array(void) > >> > > > ^ > >> > > > In file included from ccplot/hdf.c:315: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > > > warning: > >> > > > unused function '_import_umath' > >> [-Wunused-function] > >> > > > _import_umath(void) > >> > > > ^ > >> > > > 2 warnings generated. > >> > > > clang -bundle -undefined dynamic_lookup -Wl,-F. > >> -arch i386 -arch > >> > > x86_64 > >> > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > >> > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> -lmfhdf -ldf > >> > -ljpeg > >> > > -lz -o > >> > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > >> > > > ld: library not found for -lmfhdf > >> > > > clang: error: linker command failed with exit code > >> 1 (use -v > >> > to see > >> > > > invocation) > >> > > > error: command 'clang' failed with exit status 1 > >> > > > > >> > > > Hopefully this is also an easy fix. Best, > >> > > > > >> > > > Ryan > >> > > > > >> > > > > >> > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > >> > > <pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> > >> > > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>>> > >> > > wrote: > >> > > > > >> > > > Hi Ryan, > >> > > > > >> > > > Thanks for the follow-up. It is nice to hear > >> you find ccplot > >> > > useful. > >> > > > > >> > > > I was afraid there may be more problems. I'm > >> sure other mac > >> > > users will > >> > > > be happy to see this sorted out. > >> > > > > >> > > > The reason is that MAX_VAR_DIMS is only > >> available when HDF4 > >> > > was compiled > >> > > > with netcdf-3 compatibility. It should be easy > >> to fix by > >> > > replacing all > >> > > > occurrences of MAX_VAR_DIMS with > H4_MAX_VAR_DIMS. > >> > > > > >> > > > Please try an updated version from github: > >> > > > > >> > > > > >> https://github.com/peterkuma/ccplot/archive/master.zip > >> > > > > >> > > > Regards, > >> > > > > >> > > > Peter > >> > > > > >> > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > >> > > > > Hello Peter, > >> > > > > > >> > > > > I very much appreciate the timely response > >> and your > >> > > willingness to > >> > > > help. > >> > > > > I was happy to see that a new version of > >> ccplot was > >> > > available without > >> > > > > the PyNIO dependency, which has prevented me > >> from using it > >> > > in the > >> > > > past. > >> > > > > ccplot appears to be far superior than what > is > >> > possible using > >> > > > Matlab and > >> > > > > NCAR Command Language! > >> > > > > > >> > > > > I have modified line 24 of setup.py to > reflect > >> > > '/opt/local/include' as > >> > > > > well, and I no longer receive the error > >> regarding > >> > hntdefs.h. > >> > > > > > >> > > > > Unfortunately, though I'm presented with a > >> new error. To > >> > > give you as > >> > > > > much detail as possible, here's the new > issue: > >> > > > > > >> > > > > "bash-3.2$ python setup.py build > >> > > > > running build > >> > > > > running build_py > >> > > > > running build_ext > >> > > > > skipping 'ccplot/hdf.c' Cython extension > >> (up-to-date) > >> > > > > building 'ccplot.hdf' extension > >> > > > > clang -fno-strict-aliasing -fno-common > >> -dynamic -g -Os > >> > -pipe > >> > > > -fno-common > >> > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > >> > -DENABLE_DTRACE > >> > > -DMACOSX > >> > > > > -DNDEBUG -Wall -Wstrict-prototypes > >> -Wshorten-64-to-32 > >> > > -DNDEBUG -g -Os > >> > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE > >> -arch i386 -arch > >> > > x86_64 > >> > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > >> > -I/usr/include/hdf > >> > > > > -I/usr/local/include/hdf > -I/opt/local/include > >> > > > > > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > > > > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > > > > -c ccplot/hdf.c -o > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > > > > clang: warning: argument unused during > >> compilation: > >> > > '-mno-fused-madd' > >> > > > > ccplot/hdf.c:5266:30: error: use of > >> undeclared identifier > >> > > > 'MAX_VAR_DIMS' > >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); > if > >> > > (unlikely(!__pyx_t_1)) > >> > > > > {__pyx_filename =... > >> > > > > ^ > >> > > > > ccplot/hdf.c:7066:30: error: use of > >> undeclared identifier > >> > > > 'MAX_VAR_DIMS' > >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); > if > >> > > (unlikely(!__pyx_t_1)) > >> > > > > {__pyx_filename =... > >> > > > > ^ > >> > > > > 2 errors generated. > >> > > > > error: command 'clang' failed with exit > >> status 1" > >> > > > > > >> > > > > Perhaps there is an easy fix? > >> > > > > > >> > > > > Best, > >> > > > > > >> > > > > -Ryan > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > >> > > > <pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>> > >> > > > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> <mailto: > pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>>>> > >> > > > wrote: > >> > > > > > >> > > > > On 11/21/2013 02:07 AM, ryan scott > wrote: > >> > > > > > I have installed all dependencies for > >> ccplot. > >> > However, > >> > > when > >> > > > > attempting to build ccplot before > >> installation, I > >> > > receive the > >> > > > > following error message: > >> > > > > > > >> > > > > > "ccplot/hdf.c:317:10: fatal error: > >> 'hntdefs.h' file > >> > > not found > >> > > > > > #include "hntdefs.h" > >> > > > > > ^ > >> > > > > > 1 error generated. > >> > > > > > error: command 'clang' failed with > >> exit status 1" > >> > > > > > > >> > > > > > I do, however, have the hdf4 library > >> installed (via > >> > > > MacPorts), the > >> > > > > following > >> > > > > > > >> > > > > > bash-3.2$ locate hntdefs.h > >> > > > > > /opt/local/include/hntdefs.h > >> > > > > > > >> > > > > > shows that I do have this file. Could > >> anyone please > >> > > point me in > >> > > > > the right direction? > >> > > > > > > >> > > > > > Any help is very much appreciated. > Thanks, > >> > > > > > > >> > > > > > Ryan > >> > > > > > >> > > > > Dear Ryan, > >> > > > > > >> > > > > Sorry - I think this is a problem with > >> ccplot rather > >> > > than your > >> > > > > configuration. It assumes that hdf is > >> available > >> > under either > >> > > > > /usr/include/hdf or > >> /usr/local/include/hdf, which > >> > is a valid > >> > > > assumption > >> > > > > on linux, but not on mac. For now, > could you > >> > please just add > >> > > > the path to > >> > > > > hdf_include_dirs in setup.py? > >> > > > > > >> > > > > - hdf_include_dirs = > ['/usr/include/hdf', > >> > > > '/usr/local/include/hdf'] > >> > > > > + hdf_include_dirs = > ['/usr/include/hdf', > >> > > > '/usr/local/include/hdf', > >> > > > > '/opt/local/include'] > >> > > > > > >> > > > > (line 24) > >> > > > > > >> > > > > Unfortunately, I don't have access to a > >> mac system for > >> > > testing > >> > > > now, so I > >> > > > > would not find out. Hopefully, darwin > >> will be good > >> > > enough for > >> > > > this. I'll > >> > > > > try to fix these issues soon. > >> > > > > > >> > > > > Thank you very much for reporting the > >> problem. > >> > > > > > >> > > > > Regards, > >> > > > > > >> > > > > Peter > >> > > > > > >> > > > > > >> > > > > >> > > > > >> > > > >> > > > >> > > >> > > >> > >> > >> > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 22:05:10
|
Ryan, This indicates that python was indeed running in 64-bit mode, because when forced to run in 32-bits it failed even earlier with basemap. The hdfeos library itself is 64-bit, which is good. The only remaining option is that the hdfeos.pyx module was compiled only as i386. Can you please check, so that we are sure? file /Library/Python/2.7/site-packages/ccplot/hdfeos.so The build output you sent me last time seems suspicious regarding this (the linker reports only -arch i386). If it is indeed to case, it will be easier to contact someone upstream about this. Peter On 11/22/2013 10:20 PM, Ryan Scott wrote: > Hi Peter, > > My machine is running Mac OS X 10.8.4. > > Here's the requested output: > > bash-3.2$ file `which python` > /usr/bin/python: Mach-O universal binary with 2 architectures > /usr/bin/python (for architecture i386):Mach-O executable i386 > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable x86_64 > bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > shared library x86_64 > bash-3.2$ python -V > Python 2.7.2 > bash-3.2$ python -c 'import platform; print platform.machine(); print >> platform.architecture()' > x86_64 > > And here's output from ccplot -V > > bash-3.2$ ccplot -V > Traceback (most recent call last): > File "/usr/local/bin/ccplot", line 53, in <module> > from mpl_toolkits import basemap > File > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > line 37, in <module> > import _geoslib > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): > Symbol not found: _GEOSArea > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > Expected in: flat namespace > in /Library/Python/2.7/site-packages/_geoslib.so > > Thanks! > > Ryan > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > The man page for the mac version of python mentions that it runs 64-bit > by default, but it can be instructed to run 32-bit with: > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > So you can try setting this environment variable before running ccplot > -V. But I'm not sure if it helps. > > Peter > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > Ryan, > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > > 32-bit (or vice-versa). Could you please try: > > > > file `which python` > > file /opt/local/lib/libhdfeos.0.dylib > > python -V > > python -c 'import platform; print platform.machine(); print > > platform.architecture()' > > > > Also if you can tell me your Mac OS X version... > > > > Hopefully, having more information will help. > > > > Cheers, > > > > Peter > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > >> Hi Peter, > >> > >> Unfortunately, I'm running into new trouble. Perhaps the issue > might be > >> specific to my machine? > >> > >> Here is output from a simple command which should work if > installation > >> were successful. > >> > >> bash-3.2$ ccplot -V > >> Traceback (most recent call last): > >> File "/usr/local/bin/ccplot", line 56, in <module> > >> from ccplot.hdfeos import HDFEOS > >> ImportError: > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > >> 2): Symbol not found: _for_init > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > >> Expected in: flat namespace > >> in /opt/local/lib/libhdfeos.0.dylib > >> > >> Thanks, > >> > >> Ryan |
From: Ryan S. <rsc...@gm...> - 2013-11-22 22:14:14
|
Hi Peter, Here's what happens this time: bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal binary with 2 architectures /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture i386): Mach-O bundle i386 /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture x86_64): Mach-O 64-bit bundle x86_64 -Ryan On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma <pet...@wa...> wrote: > Ryan, > > This indicates that python was indeed running in 64-bit mode, because > when forced to run in 32-bits it failed even earlier with basemap. The > hdfeos library itself is 64-bit, which is good. The only remaining > option is that the hdfeos.pyx module was compiled only as i386. Can you > please check, so that we are sure? > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > The build output you sent me last time seems suspicious regarding this > (the linker reports only -arch i386). If it is indeed to case, it will > be easier to contact someone upstream about this. > > Peter > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > Hi Peter, > > > > My machine is running Mac OS X 10.8.4. > > > > Here's the requested output: > > > > bash-3.2$ file `which python` > > /usr/bin/python: Mach-O universal binary with 2 architectures > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable x86_64 > > bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > shared library x86_64 > > bash-3.2$ python -V > > Python 2.7.2 > > bash-3.2$ python -c 'import platform; print platform.machine(); print > >> platform.architecture()' > > x86_64 > > > > And here's output from ccplot -V > > > > bash-3.2$ ccplot -V > > Traceback (most recent call last): > > File "/usr/local/bin/ccplot", line 53, in <module> > > from mpl_toolkits import basemap > > File > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > line 37, in <module> > > import _geoslib > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): > > Symbol not found: _GEOSArea > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > Expected in: flat namespace > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > Thanks! > > > > Ryan > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > > <mailto:pet...@wa...>> wrote: > > > > Ryan, > > > > The man page for the mac version of python mentions that it runs > 64-bit > > by default, but it can be instructed to run 32-bit with: > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > So you can try setting this environment variable before running > ccplot > > -V. But I'm not sure if it helps. > > > > Peter > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > Ryan, > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > is > > > 32-bit (or vice-versa). Could you please try: > > > > > > file `which python` > > > file /opt/local/lib/libhdfeos.0.dylib > > > python -V > > > python -c 'import platform; print platform.machine(); print > > > platform.architecture()' > > > > > > Also if you can tell me your Mac OS X version... > > > > > > Hopefully, having more information will help. > > > > > > Cheers, > > > > > > Peter > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > >> Hi Peter, > > >> > > >> Unfortunately, I'm running into new trouble. Perhaps the issue > > might be > > >> specific to my machine? > > >> > > >> Here is output from a simple command which should work if > > installation > > >> were successful. > > >> > > >> bash-3.2$ ccplot -V > > >> Traceback (most recent call last): > > >> File "/usr/local/bin/ccplot", line 56, in <module> > > >> from ccplot.hdfeos import HDFEOS > > >> ImportError: > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > >> 2): Symbol not found: _for_init > > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > > >> Expected in: flat namespace > > >> in /opt/local/lib/libhdfeos.0.dylib > > >> > > >> Thanks, > > >> > > >> Ryan > > |
From: Peter K. <pet...@wa...> - 2013-11-22 22:21:17
|
Ryan, Thanks. That pretty much exhausts the options. I'll write to python mac users list tomorrow to see if anyone has an idea. Peter > Hi Peter, > > Here's what happens this time: > > bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal > binary with 2 architectures > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > i386): Mach-O > bundle i386 > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > x86_64): Mach-O 64-bit bundle x86_64 > > -Ryan > > > On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma <pet...@wa...> > wrote: > > > Ryan, > > > > This indicates that python was indeed running in 64-bit mode, because > > when forced to run in 32-bits it failed even earlier with basemap. The > > hdfeos library itself is 64-bit, which is good. The only remaining > > option is that the hdfeos.pyx module was compiled only as i386. Can you > > please check, so that we are sure? > > > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > > > The build output you sent me last time seems suspicious regarding this > > (the linker reports only -arch i386). If it is indeed to case, it will > > be easier to contact someone upstream about this. > > > > Peter > > > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > My machine is running Mac OS X 10.8.4. > > > > > > Here's the requested output: > > > > > > bash-3.2$ file `which python` > > > /usr/bin/python: Mach-O universal binary with 2 architectures > > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable > > > x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > > shared library x86_64 > > > bash-3.2$ python -V > > > Python 2.7.2 > > > bash-3.2$ python -c 'import platform; print platform.machine(); print > > > > platform.architecture()' > > > x86_64 > > > > > > And here's output from ccplot -V > > > > > > bash-3.2$ ccplot -V > > > Traceback (most recent call last): > > > File "/usr/local/bin/ccplot", line 53, in <module> > > > from mpl_toolkits import basemap > > > File > > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > > line 37, in <module> > > > import _geoslib > > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, > > > 2): Symbol not found: _GEOSArea > > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > > Expected in: flat namespace > > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > > > Thanks! > > > > > > Ryan > > > > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > > > <mailto:pet...@wa...>> wrote: > > > > > > Ryan, > > > > > > The man page for the mac version of python mentions that it runs > > 64-bit > > > by default, but it can be instructed to run 32-bit with: > > > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > > > So you can try setting this environment variable before running > > ccplot > > > -V. But I'm not sure if it helps. > > > > > > Peter > > > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > Ryan, > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > > is > > > 32-bit (or vice-versa). Could you please try: > > > > > > file `which python` > > > file /opt/local/lib/libhdfeos.0.dylib > > > python -V > > > python -c 'import platform; print platform.machine(); print > > > platform.architecture()' > > > > > > Also if you can tell me your Mac OS X version... > > > > > > Hopefully, having more information will help. > > > > > > Cheers, > > > > > > Peter > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > Unfortunately, I'm running into new trouble. Perhaps the issue > > > might be > > > specific to my machine? > > > > > > Here is output from a simple command which should work if > > > installation > > > were successful. > > > > > > bash-3.2$ ccplot -V > > > Traceback (most recent call last): > > > File "/usr/local/bin/ccplot", line 56, in <module> > > > from ccplot.hdfeos import HDFEOS > > > ImportError: > > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > > 2): Symbol not found: _for_init > > > Referenced from: /opt/local/lib/libhdfeos.0.dylib > > > Expected in: flat namespace > > > in /opt/local/lib/libhdfeos.0.dylib > > > > > > Thanks, > > > > > > Ryan > > > > |
From: Peter K. <pet...@wa...> - 2013-11-26 10:47:46
|
Hi Ryan, After some investigation I found out that the missing symbol is from libGctp. It is fixed in the latest master. https://github.com/peterkuma/ccplot/archive/master.zip If you just overwrite the old ccplot directory, please do touch ccplot/*.pyx first, as the modules would not be rebuilt otherwise. Hopefully, this will be the last bit. Regards, Peter On 11/22/2013 11:22 PM, Ryan Scott wrote: > Thanks, Peter. > > > On Fri, Nov 22, 2013 at 2:21 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > Thanks. That pretty much exhausts the options. I'll write to python > mac users list tomorrow to see if anyone has an idea. > > Peter > > > Hi Peter, > > > > Here's what happens this time: > > > > bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal > > binary with 2 architectures > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > > i386): Mach-O > > bundle i386 > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > > x86_64): Mach-O 64-bit bundle x86_64 > > > > -Ryan > > > > > > On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...>> > > wrote: > > > > > Ryan, > > > > > > This indicates that python was indeed running in 64-bit mode, > because > > > when forced to run in 32-bits it failed even earlier with > basemap. The > > > hdfeos library itself is 64-bit, which is good. The only remaining > > > option is that the hdfeos.pyx module was compiled only as i386. > Can you > > > please check, so that we are sure? > > > > > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > > > > > The build output you sent me last time seems suspicious > regarding this > > > (the linker reports only -arch i386). If it is indeed to case, > it will > > > be easier to contact someone upstream about this. > > > > > > Peter > > > > > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > > > Hi Peter, > > > > > > > > My machine is running Mac OS X 10.8.4. > > > > > > > > Here's the requested output: > > > > > > > > bash-3.2$ file `which python` > > > > /usr/bin/python: Mach-O universal binary with 2 architectures > > > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable > > > > x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > > > shared library x86_64 > > > > bash-3.2$ python -V > > > > Python 2.7.2 > > > > bash-3.2$ python -c 'import platform; print > platform.machine(); print > > > > > platform.architecture()' > > > > x86_64 > > > > > > > > And here's output from ccplot -V > > > > > > > > bash-3.2$ ccplot -V > > > > Traceback (most recent call last): > > > > File "/usr/local/bin/ccplot", line 53, in <module> > > > > from mpl_toolkits import basemap > > > > File > > > > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > > > line 37, in <module> > > > > import _geoslib > > > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, > > > > 2): Symbol not found: _GEOSArea > > > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > > > Expected in: flat namespace > > > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > > > > > Thanks! > > > > > > > > Ryan > > > > > > > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> wrote: > > > > > > > > Ryan, > > > > > > > > The man page for the mac version of python mentions that it runs > > > 64-bit > > > > by default, but it can be instructed to run 32-bit with: > > > > > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > > > > > So you can try setting this environment variable before running > > > ccplot > > > > -V. But I'm not sure if it helps. > > > > > > > > Peter > > > > > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > > Ryan, > > > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > > > is > > > > 32-bit (or vice-versa). Could you please try: > > > > > > > > file `which python` > > > > file /opt/local/lib/libhdfeos.0.dylib > > > > python -V > > > > python -c 'import platform; print platform.machine(); print > > > > platform.architecture()' > > > > > > > > Also if you can tell me your Mac OS X version... > > > > > > > > Hopefully, having more information will help. > > > > > > > > Cheers, > > > > > > > > Peter > > > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > > > Hi Peter, > > > > > > > > Unfortunately, I'm running into new trouble. Perhaps the issue > > > > might be > > > > specific to my machine? > > > > > > > > Here is output from a simple command which should work if > > > > installation > > > > were successful. > > > > > > > > bash-3.2$ ccplot -V > > > > Traceback (most recent call last): > > > > File "/usr/local/bin/ccplot", line 56, in <module> > > > > from ccplot.hdfeos import HDFEOS > > > > ImportError: > > > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > > > 2): Symbol not found: _for_init > > > > Referenced from: /opt/local/lib/libhdfeos.0.dylib > > > > Expected in: flat namespace > > > > in /opt/local/lib/libhdfeos.0.dylib > > > > > > > > Thanks, > > > > > > > > Ryan > > > > > > > > |