Comptability on PPC64
Closed this issue · 6 comments
We trying too install pydsstools, but have problem with this library:
pydsstools/_lib/x64/core_heclib.cpython-38-x86_64-linux-gnu.so
Is there any source code, for pydsstools/src/core_heclib.c, which we can compile on our system from the beginning ?
@meteorolog90 The setup.py is configured to compile core_heclib.c, which is the core component of this library. I can help you if you provide details about your issue.
This library is not suported on our PPC64:
pydsstools/_lib/x64/core_heclib.cpython-38-x86_64-linux-gnu.so
So i ask for help, how to create this library on your machine. Is this the solution? :#17
@meteorolog90 You can build from source. Download the source code and type following commands in terminal:
python setup.py build
python setup.py install
The above may still fail if the external dependency located in \src\external\dss is not compatible with PPC64. In this case, you may try building this dependency from source from HEC's repository.
With command
python setup.py build python setup.py install
got this error
48 warning: MPC header version 1.1.0 differs from library version 1.2.1.
49 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
50 Compiler executable checksum: e70a722c86fb247d01b399a4c7b5f2f0
51 HecDateTime.cpp:1:10: fatal error: HecDateTime.h: No such file or directory
52 1 | #include "HecDateTime.h"
53 | ^~~~~~~~~~~~~~~
54 compilation terminated.
55 make: *** [Makefile:20: HecDateTime.o] Error 1
56 Building external library: grid.a
57 CWD: /users/ext005/Python3.8_env/hec-hms/pydsstools-master/pydsstools/src/external/gridv6
58 building 'pydsstools._lib.x64.core_heclib' extension
59 powerpc64-unknown-linux-gnu-gcc -pthread -fPIC -Ipydsstools/src/external/dss/headers -Ipydsstools/src/external/gridv6/headers -I/users/ext005/Python3.8_env/hec-hms/
lib/python3.8/site-packages/numpy/core/include -I/users/ext005/Python3.8_env/hec-hms/include -I/usr/include/python3.8 -c pydsstools/src/core_heclib.c -o build/temp.
linux-ppc64-3.8/pydsstools/src/core_heclib.o
60 In file included from /users/ext005/Python3.8_env/hec-hms/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
61 from /users/ext005/Python3.8_env/hec-hms/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
62 from /users/ext005/Python3.8_env/hec-hms/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
63 from pydsstools/src/core_heclib.c:653:
64 /users/ext005/Python3.8_env/hec-hms/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy AP
I, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
65 17 | #warning "Using deprecated NumPy API, disable it with "
66 | ^~~~~~~
67 pydsstools/src/core_heclib.c: In function ▒~@X__pyx_f_10pydsstools_4_lib_3x64_11core_heclib_saveSpatialGrid▒@Y:@
68 pydsstools/src/core_heclib.c:46313:30: warning: assignment discards ▒Xconst▒@~Y qualifier from pointer target type [-Wdiscarded-qualifiers]
69 46313 | (__pyx_v_zsgs[0]).pathname = __pyx_v_pathname;
70 | ^
71 powerpc64-unknown-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed build/temp.linux-ppc64-3.8/pydsstools/src/core_heclib.o -Lpydsstools/src/external/dss/linux
64 -Lpydsstools/src/external/gridv6/build -L/usr/lib64 -l:heclib.a -l:grid.a -lgfortran -lpthread -lm -lquadmath -lz -lstdc++ -o build/lib.linux-ppc64-3.8/pydsstool
s/_lib/x64/core_heclib.cpython-38-powerpc64-linux-gnu.so
72 /usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: skipping incompatible pydsstools/src/external/dss/linux64/heclib.a wh
en searching for -l:heclib.a
73 /usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: skipping incompatible pydsstools/src/external/dss/linux64/heclib.a wh
en searching for -l:heclib.a
74 /usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: cannot find -l:heclib.a
75 /usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: cannot find -l:grid.a
76 /usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: cannot find -lquadmath
77 collect2: error: ld returned 1 exit status
78 error: command 'powerpc64-unknown-linux-gnu-gcc' failed with exit status 1
when use .whl file :
(hec-hms) ext005@hpccmp01:~/Python3.8_env/hec-hms/pydsstools-master/dist> pip install pydsstools-1.7-cp38-cp38-linux_x86_64.whl
ERROR: pydsstools-1.7-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.
So I asked for help. I will try this last solution
Update:
1) compile hec-dss
git clone https://github.com/HydrologicEngineeringCenter/hec-dss
cd hec-dss
cd heclib
make -f Makefile.Linux
ls -l build/lib.linux-ppc64-3.9/pydsstools/_lib/x64/
core_heclib.cpython-39-powerpc64-linux-gnu.so
2) compile pydsstools
git clone https://github.com/gyanz/pydsstools
cd pydsstools
python setup.py build
libquadmath not foud:
/usr/lib/gcc/powerpc64-unknown-linux-gnu/9.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status
Compile hec-dss was ok but compile pydsstools fails. Reason was libquadmath. Is this library important, or can be skiped ?
@meteorolog90 I have listed all linux dependencies in the Readme. Yes, quadmath is one of the dependencies.