Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during Make #146

Closed
nikhiltalati opened this issue May 29, 2023 · 7 comments
Closed

Error during Make #146

nikhiltalati opened this issue May 29, 2023 · 7 comments
Assignees

Comments

@nikhiltalati
Copy link

/usr/sap/php7-sapnwrfc/sapnwrfc.c: In function ‘zim_Connection_getFunction’:
/usr/include/php/20190902/Zend/zend_types.h:701:37: warning: passing argument 2 of ‘zend_update_property_str’ from incompatible pointer type [-Wincompatible
-pointer-types]
701 | #define Z_OBJ(zval) (zval).value.obj
| ~~~~~~~~~~~~^~~~
| |
| zend_object * {aka struct _zend_object }
/usr/include/php/20190902/Zend/zend_types.h:702:28: note: in expansion of macro ‘Z_OBJ’
702 | #define Z_OBJ_P(zval_p) Z_OBJ(
(zval_p))
| ^~~~~
/usr/sap/php7-sapnwrfc/sapnwrfc.c:586:52: note: in expansion of macro ‘Z_OBJ_P’
586 | zend_update_property_str(sapnwrfc_function_ce, Z_OBJ_P(return_value), "name", sizeof("name")-1, zend_string_copy(function_name));
| ^~~~~~~
In file included from /usr/include/php/20190902/main/php.h:38,
from /usr/sap/php7-sapnwrfc/sapnwrfc.c:14:
/usr/include/php/20190902/Zend/zend_API.h:343:71: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘zend_object *’ {aka ‘struct
_zend_object *’}
343 | ZEND_API void zend_update_property_str(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_string *value);
| ~~~~~~^~~~~~
/usr/sap/php7-sapnwrfc/sapnwrfc.c: In function ‘register_sapnwrfc_function_object’:
/usr/sap/php7-sapnwrfc/sapnwrfc.c:1061:141: warning: implicit declaration of function ‘ZEND_TYPE_INIT_MASK’; did you mean ‘ZEND_TYPE_IS_CLASS’? [-Wimplicit-
function-declaration]
1061 | zend_declare_typed_property(sapnwrfc_function_ce, property_name_name, &property_name_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_I
NIT_MASK(MAY_BE_STRING));
| ^~~~~~~~~~~

      |                                                                                                                                          ZEND_TYPE_I
S_CLASS                                                                                                                                                     
/usr/sap/php7-sapnwrfc/sapnwrfc.c:1061:161: error: ‘MAY_BE_STRING’ undeclared (first use in this function)                                                  
 1061 | d_property(sapnwrfc_function_ce, property_name_name, &property_name_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ST
RING));                                                                                                                                                     
      |                                                                                                                                            ^~~~~~~~~
~~~~                                                                                                                                                        
                                                                                                                                                            
/usr/sap/php7-sapnwrfc/sapnwrfc.c:1061:161: note: each undeclared identifier is reported only once for each function it appears in                          
In file included from /usr/sap/nwrfcsdk/include/sapnwrfc.h:9,                                                                                               
                 from /usr/sap/php7-sapnwrfc/string_helper.h:10,                                                                                            
                 from /usr/sap/php7-sapnwrfc/sapnwrfc.c:21:                                                                                                 
At top level:                                                                                                                                               
/usr/sap/nwrfcsdk/include/sapuc.h:855:24: warning: ‘sccsidU16’ defined but not used [-Wunused-variable]                                                     
  855 |   static const SAP_UC* sccsidU16 = NULL;                                                                                                            
      |                        ^~~~~~~~~                                                                                                                    
make: *** [Makefile:192: sapnwrfc.lo] Error 1                                                                                                               
root@afcvubtwapp:/usr/sap/php7-sapnwrfc#                                    
@davisenra
Copy link

I'm having the same issue.
A workaround for now is just using the previous version. Checkout into the 609b162 commit before running make.

@gkralik
Copy link
Owner

gkralik commented Jul 17, 2023

I'll have a look at this.

@gkralik gkralik self-assigned this Jul 17, 2023
@kea
Copy link
Contributor

kea commented Aug 16, 2023

@nikhiltalati @davisenra, could you please tell me which version of PHP and OS you use?

@davisenra
Copy link

macOS Monterey (12.6.7)
Docker Desktop (4.20.1)
Docker Engine (24.0.2)
PHP 7.2.34 (built: Dec 11 2020 10:56:30)

PHP is running on a Docker container.

@kea
Copy link
Contributor

kea commented Aug 17, 2023

@davisenra, could you please test my PR to see if it fixes your problem?

gkralik added a commit that referenced this issue Aug 18, 2023
@davisenra
Copy link

For sure! I'll test at work today and quote you here with my results.

@davisenra
Copy link

@kea worked like a charm! Building just fine on PHP 7.2, thank you for the effort :)

Captura de Tela 2023-08-18 às 10 35 24

@gkralik gkralik closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants