Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3
stars
1
forks
source link
Python bindings do not compile against openhpi > 2.14.1 #2350
<pre>
[root@dev openhpi-python-svn-7120]$ python setup.py build
running build
running build_py
file openhpi.py (for module openhpi) not found
file openhpi.py (for module openhpi) not found
running build_ext
building '_openhpi' extension
swigging openhpi.i to openhpi_wrap.c
swig -python -keyword -o openhpi_wrap.c openhpi.i
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/openhpi -I/usr/local/include/openhpi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python2.6 -c openhpi_wrap.c -o build/temp.linux-x86_64-2.6/openhpi_wrap.o
openhpi_wrap.c: In function ‘SWIG_Python_ConvertFunctionPtr’:
openhpi_wrap.c:2034: warning: initialization discards qualifiers from pointer target type
openhpi_wrap.c: In function ‘SWIG_AsCharPtrAndSize’:
openhpi_wrap.c:3805: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
openhpi_wrap.c: In function ‘_wrap_oHpiHandlerCreate’:
openhpi_wrap.c:39279: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
openhpi_wrap.c:39291: warning: passing argument 1 of ‘oHpiHandlerCreate’ makes integer from pointer without a cast
openhpi_wrap.c:39291: warning: passing argument 2 of ‘oHpiHandlerCreate’ from incompatible pointer type
openhpi_wrap.c:39291: error: too few arguments to function ‘oHpiHandlerCreate’
openhpi_wrap.c: In function ‘_wrap_oHpiHandlerDestroy’:
openhpi_wrap.c:39322: error: too few arguments to function ‘oHpiHandlerDestroy’
openhpi_wrap.c: In function ‘_wrap_oHpiHandlerInfo’:
openhpi_wrap.c:39356: warning: passing argument 2 of ‘oHpiHandlerInfo’ makes integer from pointer without a cast
openhpi_wrap.c:39356: error: too few arguments to function ‘oHpiHandlerInfo’
openhpi_wrap.c: In function ‘_wrap_oHpiHandlerGetNext’:
openhpi_wrap.c:39385: warning: passing argument 2 of ‘oHpiHandlerGetNext’ makes integer from pointer without a cast
openhpi_wrap.c:39385: error: too few arguments to function ‘oHpiHandlerGetNext’
openhpi_wrap.c: In function ‘_wrap_oHpiHandlerRetry’:
openhpi_wrap.c:39460: error: too few arguments to function ‘oHpiHandlerRetry’
openhpi_wrap.c: In function ‘_wrap_oHpiGlobalParamGet’:
openhpi_wrap.c:39485: warning: passing argument 1 of ‘oHpiGlobalParamGet’ makes integer from pointer without a cast
openhpi_wrap.c:39485: error: too few arguments to function ‘oHpiGlobalParamGet’
openhpi_wrap.c: In function ‘_wrap_oHpiGlobalParamSet’:
openhpi_wrap.c:39510: warning: passing argument 1 of ‘oHpiGlobalParamSet’ makes integer from pointer without a cast
openhpi_wrap.c:39510: error: too few arguments to function ‘oHpiGlobalParamSet’
openhpi_wrap.c: In function ‘_wrap_oHpiInjectEvent’:
openhpi_wrap.c:39562: warning: passing argument 2 of ‘oHpiInjectEvent’ makes integer from pointer without a cast
openhpi_wrap.c:39562: warning: passing argument 3 of ‘oHpiInjectEvent’ from incompatible pointer type
openhpi_wrap.c:39562: warning: passing argument 4 of ‘oHpiInjectEvent’ from incompatible pointer type
openhpi_wrap.c:39562: error: too few arguments to function ‘oHpiInjectEvent’
openhpi_wrap.c: In function ‘SWIG_Python_FixMethods’:
openhpi_wrap.c:50951: warning: initialization discards qualifiers from pointer target type
error: command 'gcc' failed with exit status 1
</pre>
On CentOS 5.6, compiling against 2.17.0, I get:
<pre> [root@dev openhpi-python-svn-7120]$ python setup.py build running build running build_py file openhpi.py (for module openhpi) not found file openhpi.py (for module openhpi) not found running build_ext building '_openhpi' extension swigging openhpi.i to openhpi_wrap.c swig -python -keyword -o openhpi_wrap.c openhpi.i creating build creating build/temp.linux-x86_64-2.6 gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/openhpi -I/usr/local/include/openhpi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python2.6 -c openhpi_wrap.c -o build/temp.linux-x86_64-2.6/openhpi_wrap.o openhpi_wrap.c: In function ‘SWIG_Python_ConvertFunctionPtr’: openhpi_wrap.c:2034: warning: initialization discards qualifiers from pointer target type openhpi_wrap.c: In function ‘SWIG_AsCharPtrAndSize’: openhpi_wrap.c:3805: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type openhpi_wrap.c: In function ‘_wrap_oHpiHandlerCreate’: openhpi_wrap.c:39279: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type openhpi_wrap.c:39291: warning: passing argument 1 of ‘oHpiHandlerCreate’ makes integer from pointer without a cast openhpi_wrap.c:39291: warning: passing argument 2 of ‘oHpiHandlerCreate’ from incompatible pointer type openhpi_wrap.c:39291: error: too few arguments to function ‘oHpiHandlerCreate’ openhpi_wrap.c: In function ‘_wrap_oHpiHandlerDestroy’: openhpi_wrap.c:39322: error: too few arguments to function ‘oHpiHandlerDestroy’ openhpi_wrap.c: In function ‘_wrap_oHpiHandlerInfo’: openhpi_wrap.c:39356: warning: passing argument 2 of ‘oHpiHandlerInfo’ makes integer from pointer without a cast openhpi_wrap.c:39356: error: too few arguments to function ‘oHpiHandlerInfo’ openhpi_wrap.c: In function ‘_wrap_oHpiHandlerGetNext’: openhpi_wrap.c:39385: warning: passing argument 2 of ‘oHpiHandlerGetNext’ makes integer from pointer without a cast openhpi_wrap.c:39385: error: too few arguments to function ‘oHpiHandlerGetNext’ openhpi_wrap.c: In function ‘_wrap_oHpiHandlerRetry’: openhpi_wrap.c:39460: error: too few arguments to function ‘oHpiHandlerRetry’ openhpi_wrap.c: In function ‘_wrap_oHpiGlobalParamGet’: openhpi_wrap.c:39485: warning: passing argument 1 of ‘oHpiGlobalParamGet’ makes integer from pointer without a cast openhpi_wrap.c:39485: error: too few arguments to function ‘oHpiGlobalParamGet’ openhpi_wrap.c: In function ‘_wrap_oHpiGlobalParamSet’: openhpi_wrap.c:39510: warning: passing argument 1 of ‘oHpiGlobalParamSet’ makes integer from pointer without a cast openhpi_wrap.c:39510: error: too few arguments to function ‘oHpiGlobalParamSet’ openhpi_wrap.c: In function ‘_wrap_oHpiInjectEvent’: openhpi_wrap.c:39562: warning: passing argument 2 of ‘oHpiInjectEvent’ makes integer from pointer without a cast openhpi_wrap.c:39562: warning: passing argument 3 of ‘oHpiInjectEvent’ from incompatible pointer type openhpi_wrap.c:39562: warning: passing argument 4 of ‘oHpiInjectEvent’ from incompatible pointer type openhpi_wrap.c:39562: error: too few arguments to function ‘oHpiInjectEvent’ openhpi_wrap.c: In function ‘SWIG_Python_FixMethods’: openhpi_wrap.c:50951: warning: initialization discards qualifiers from pointer target type error: command 'gcc' failed with exit status 1 </pre>
Additionally Fedora/Redhat already have two patches (which you may find in http://download.fedora.redhat.com/pub/fedora/linux/development/rawhide/source/SRPMS/python-openhpi-1.2-0.4.20090109svn6930.fc15.src.rpm) which make it compatibile against 2.14. I recommend applying them.
Reported by: snifferdev