SAP / PyRFC

Asynchronous, non-blocking SAP NW RFC SDK bindings for Python
http://sap.github.io/PyRFC
Apache License 2.0
501 stars 133 forks source link

Build errors when building 2.0.5 and 2.0.6 #184

Closed mpeuss closed 4 years ago

mpeuss commented 4 years ago

I'm trying to build a version from the newest source but it fails, see errors below. All versions up to 2.0.4 can be build without any errors


>> python setup.py bdist_wheel 
running bdist_wheel
running build
running build_py
copying src/pyrfc/__init__.py -> build/lib.linux-x86_64-2.7/pyrfc
running build_ext
building 'pyrfc.pyrfc' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-UKCoZ3/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNDEBUG -D_LARGEFILE_SOURCE -D_CONSOLE -D_FILE_OFFSET_BITS=64 -DSAPonUNIX -DSAPwithUNICODE -DSAPwithTHREADS -DSAPonLIN -I/usr/include/python2.7 -c src/pyrfc/_pyrfc.cpp -o build/temp.linux-x86_64-2.7/src/pyrfc/_pyrfc.o -Wall -O2 -fexceptions -funsigned-char -fno-strict-aliasing -Wall -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-function -Wcast-align -fPIC -pthread -minline-all-stringops -I/home/test/projects/pyrfc-env/include
src/pyrfc/_pyrfc.cpp:1009:3: error: ‘RFC_THROUGHPUT_HANDLE’ does not name a type; did you mean ‘RFC_UNIT_HANDLE’?
   RFC_THROUGHPUT_HANDLE _throughput_handle;
   ^~~~~~~~~~~~~~~~~~~~~
   RFC_UNIT_HANDLE
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_f_5pyrfc_5pyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES, __pyx_opt_args_5pyrfc_5pyrfc_wrapConnectionAttributes*)’:
src/pyrfc/_pyrfc.cpp:24511:67: error: ‘RFC_ATTRIBUTES {aka struct _RFC_ATTRIBUTES}’ has no member named ‘partnerIP’; did you mean ‘partnerRel’?
   __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_attributes.partnerIP, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
                                                                   ^~~~~~~~~
                                                                   partnerRel
src/pyrfc/_pyrfc.cpp:24526:67: error: ‘RFC_ATTRIBUTES {aka struct _RFC_ATTRIBUTES}’ has no member named ‘partnerIPv6’; did you mean ‘partnerHost’?
   __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_attributes.partnerIPv6, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
                                                                   ^~~~~~~~~~~
                                                                   partnerHost
src/pyrfc/_pyrfc.cpp: In function ‘int __pyx_pf_5pyrfc_5pyrfc_10Throughput___init__(__pyx_obj_5pyrfc_5pyrfc_Throughput*, PyObject*)’:
src/pyrfc/_pyrfc.cpp:29264:17: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_self->_throughput_handle = NULL;
                 ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29288:17: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_self->_throughput_handle = RfcCreateThroughput((&__pyx_v_errorInfo));
                 ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29288:38: error: ‘RfcCreateThroughput’ was not declared in this scope
   __pyx_v_self->_throughput_handle = RfcCreateThroughput((&__pyx_v_errorInfo));
                                      ^~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29288:38: note: suggested alternative: ‘RfcCreateStructure’
   __pyx_v_self->_throughput_handle = RfcCreateThroughput((&__pyx_v_errorInfo));
                                      ^~~~~~~~~~~~~~~~~~~
                                      RfcCreateStructure
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_7_handle___get__(__pyx_obj_5pyrfc_5pyrfc_Throughput*)’:
src/pyrfc/_pyrfc.cpp:29615:76: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_t_1 = __Pyx_PyInt_From_unsigned_long(((unsigned long)__pyx_v_self->_throughput_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2355, __pyx_L1_error)
                                                                            ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_2setOnConnection(__pyx_obj_5pyrfc_5pyrfc_Throughput*, __pyx_obj_5pyrfc_5pyrfc_Connection*)’:
src/pyrfc/_pyrfc.cpp:29684:88: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcSetThroughputOnConnection(__pyx_v_connection->_handle, __pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                                                                                        ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29684:16: error: ‘RfcSetThroughputOnConnection’ was not declared in this scope
   __pyx_v_rc = RfcSetThroughputOnConnection(__pyx_v_connection->_handle, __pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29684:16: note: suggested alternative: ‘RfcOpenConnection’
   __pyx_v_rc = RfcSetThroughputOnConnection(__pyx_v_connection->_handle, __pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                RfcOpenConnection
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_4getFromConnection(__pyx_obj_5pyrfc_5pyrfc_Connection*)’:
src/pyrfc/_pyrfc.cpp:29833:3: error: ‘RFC_THROUGHPUT_HANDLE’ was not declared in this scope
   RFC_THROUGHPUT_HANDLE __pyx_v_throughput;
   ^~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29833:3: note: suggested alternative: ‘RFC_UNIT_HANDLE’
   RFC_THROUGHPUT_HANDLE __pyx_v_throughput;
   ^~~~~~~~~~~~~~~~~~~~~
   RFC_UNIT_HANDLE
src/pyrfc/_pyrfc.cpp:29853:3: error: ‘__pyx_v_throughput’ was not declared in this scope
   __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));
   ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29853:3: note: suggested alternative: ‘__pyx_k_throughput’
   __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));
   ^~~~~~~~~~~~~~~~~~
   __pyx_k_throughput
src/pyrfc/_pyrfc.cpp:29853:24: error: ‘RfcGetThroughputFromConnection’ was not declared in this scope
   __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:29853:24: note: suggested alternative: ‘__pyx_n_s_getFromConnection’
   __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        __pyx_n_s_getFromConnection
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_6removeFromConnection(__pyx_obj_5pyrfc_5pyrfc_Throughput*, __pyx_obj_5pyrfc_5pyrfc_Connection*)’:
src/pyrfc/_pyrfc.cpp:30067:16: error: ‘RfcRemoveThroughputFromConnection’ was not declared in this scope
   __pyx_v_rc = RfcRemoveThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_8reset(__pyx_obj_5pyrfc_5pyrfc_Throughput*)’:
src/pyrfc/_pyrfc.cpp:30187:49: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcResetThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                                                 ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30187:16: error: ‘RfcResetThroughput’ was not declared in this scope
   __pyx_v_rc = RfcResetThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30187:16: note: suggested alternative: ‘__pyx_k_Throughput’
   __pyx_v_rc = RfcResetThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~
                __pyx_k_Throughput
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_f_5pyrfc_5pyrfc_10Throughput__destroy(__pyx_obj_5pyrfc_5pyrfc_Throughput*)’:
src/pyrfc/_pyrfc.cpp:30310:31: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_t_4 = ((__pyx_v_self->_throughput_handle != NULL) != 0);
                               ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30320:53: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
     __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                                                     ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30320:18: error: ‘RfcDestroyThroughput’ was not declared in this scope
     __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                  ^~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30320:18: note: suggested alternative: ‘RfcDestroyStructure’
     __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));
                  ^~~~~~~~~~~~~~~~~~~~
                  RfcDestroyStructure
src/pyrfc/_pyrfc.cpp:30329:19: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
     __pyx_v_self->_throughput_handle = NULL;
                   ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp: In function ‘PyObject* __pyx_pf_5pyrfc_5pyrfc_10Throughput_5stats___get__(__pyx_obj_5pyrfc_5pyrfc_Throughput*)’:
src/pyrfc/_pyrfc.cpp:30671:31: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_t_2 = ((__pyx_v_self->_throughput_handle == NULL) != 0);
                               ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30718:50: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetNumberOfCalls(__pyx_v_self->_throughput_handle, (&__pyx_v_numberOfCalls), (&__pyx_v_errorInfo));
                                                  ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30718:16: error: ‘RfcGetNumberOfCalls’ was not declared in this scope
   __pyx_v_rc = RfcGetNumberOfCalls(__pyx_v_self->_throughput_handle, (&__pyx_v_numberOfCalls), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30718:16: note: suggested alternative: ‘__pyx_v_numberOfCalls’
   __pyx_v_rc = RfcGetNumberOfCalls(__pyx_v_self->_throughput_handle, (&__pyx_v_numberOfCalls), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~
                __pyx_v_numberOfCalls
src/pyrfc/_pyrfc.cpp:30771:46: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetSentBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_sentBytes), (&__pyx_v_errorInfo));
                                              ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30771:16: error: ‘RfcGetSentBytes’ was not declared in this scope
   __pyx_v_rc = RfcGetSentBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_sentBytes), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30771:16: note: suggested alternative: ‘RfcSetBytes’
   __pyx_v_rc = RfcGetSentBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_sentBytes), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~
                RfcSetBytes
src/pyrfc/_pyrfc.cpp:30824:50: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetReceivedBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_receivedBytes), (&__pyx_v_errorInfo));
                                                  ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30824:16: error: ‘RfcGetReceivedBytes’ was not declared in this scope
   __pyx_v_rc = RfcGetReceivedBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_receivedBytes), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30824:16: note: suggested alternative: ‘RfcGetBytes’
   __pyx_v_rc = RfcGetReceivedBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_receivedBytes), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~
                RfcGetBytes
src/pyrfc/_pyrfc.cpp:30877:52: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetApplicationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_applicationTime), (&__pyx_v_errorInfo));
                                                    ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30877:16: error: ‘RfcGetApplicationTime’ was not declared in this scope
   __pyx_v_rc = RfcGetApplicationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_applicationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30877:16: note: suggested alternative: ‘RfcGetFunctionName’
   __pyx_v_rc = RfcGetApplicationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_applicationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~
                RfcGetFunctionName
src/pyrfc/_pyrfc.cpp:30930:46: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetTotalTime(__pyx_v_self->_throughput_handle, (&__pyx_v_totalTime), (&__pyx_v_errorInfo));
                                              ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30930:16: error: ‘RfcGetTotalTime’ was not declared in this scope
   __pyx_v_rc = RfcGetTotalTime(__pyx_v_self->_throughput_handle, (&__pyx_v_totalTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30930:16: note: suggested alternative: ‘RfcGetTime’
   __pyx_v_rc = RfcGetTotalTime(__pyx_v_self->_throughput_handle, (&__pyx_v_totalTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~
                RfcGetTime
src/pyrfc/_pyrfc.cpp:30983:54: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetSerializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_serializationTime), (&__pyx_v_errorInfo));
                                                      ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30983:16: error: ‘RfcGetSerializationTime’ was not declared in this scope
   __pyx_v_rc = RfcGetSerializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_serializationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:30983:16: note: suggested alternative: ‘__pyx_v_serializationTime’
   __pyx_v_rc = RfcGetSerializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_serializationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~
                __pyx_v_serializationTime
src/pyrfc/_pyrfc.cpp:31036:56: error: ‘struct __pyx_obj_5pyrfc_5pyrfc_Throughput’ has no member named ‘_throughput_handle’
   __pyx_v_rc = RfcGetDeserializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_deserializationTime), (&__pyx_v_errorInfo));
                                                        ^~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:31036:16: error: ‘RfcGetDeserializationTime’ was not declared in this scope
   __pyx_v_rc = RfcGetDeserializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_deserializationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~~~
src/pyrfc/_pyrfc.cpp:31036:16: note: suggested alternative: ‘__pyx_v_serializationTime’
   __pyx_v_rc = RfcGetDeserializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_deserializationTime), (&__pyx_v_errorInfo));
                ^~~~~~~~~~~~~~~~~~~~~~~~~
                __pyx_v_serializationTime
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1```
bsrdjan commented 4 years ago

Please upgrade to the latest SAP NWRFC SDK: 7.50 PL6

The Throughput functionality is not available in older SDK versions, causing such PyRFC build errors.

mpeuss commented 4 years ago

Thanks for your hint. I was able to build the package using the latest SDK.