gkralik / php7-sapnwrfc

SAP NW RFC SDK extension for PHP 7.3+ & PHP 8
https://gkralik.github.io/php7-sapnwrfc
MIT License
90 stars 35 forks source link

Build PHP 7.4&8.1 on Mac M1 #123

Closed szabizs closed 2 years ago

szabizs commented 2 years ago

Bug Report

Q A
PHP version 7.4.26 & 8.1
SAP NW RFC SDK version 7.5 PL 6 & PL 8
Extension version/git ref 2.0.0-beta2 - 2021-12-05

Summary

I have the path configured and tried with PL6 and PL8 but without success.

Current behavior

The build is giving me some errors:

Warning: PHP Startup: Unable to load dynamic library 'sapnwrfc.so' (tried: /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so, 0x0009): symbol not found in flat namespace '_RfcAppendNewRow')

How to reproduce

=====================================================================
PHP         : /opt/homebrew/Cellar/php@7.4/7.4.26_1/bin/php 
Warning: PHP Startup: Unable to load dynamic library 'sapnwrfc.so' (tried: /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so, 0x0009): symbol not found in flat namespace '_RfcAppendNewRow'), /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so, 0x0009): tried: '/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so' (no such file), '/usr/local/lib/sapnwrfc.so.so' (no such file), '/usr/lib/sapnwrfc.so.so' (no such file))) in Unknown on line 0

PHP_SAPI    : cli
PHP_VERSION : 7.4.26
ZEND_VERSION: 3.4.0
PHP_OS      : Darwin - Darwin Szabis-MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
INI actual  : /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/tmp-php.ini
More .INIs  :   
---------------------------------------------------------------------
PHP         : /opt/homebrew/Cellar/php@7.4/7.4.26_1/bin/phpdbg 
PHP_SAPI    : PHP Warning:  PHP Startup: Unable to load dynamic library 'sapnwrfc.so' (tried: /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so, 0x0009): symbol not found in flat namespace '_RfcAppendNewRow'), /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so, 0x0009): tried: '/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so' (no such file), '/usr/local/lib/sapnwrfc.so.so' (no such file), '/usr/lib/sapnwrfc.so.so' (no such file))) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'sapnwrfc.so' (tried: /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so, 0x0009): symbol not found in flat namespace '_RfcAppendNewRow'), /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so (dlopen(/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so, 0x0009): tried: '/Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/modules/sapnwrfc.so.so' (no such file), '/usr/local/lib/sapnwrfc.so.so' (no such file), '/usr/lib/sapnwrfc.so.so' (no such file))) in Unknown on line 0
phpdbg
PHP_VERSION : 7.4.26
ZEND_VERSION: 3.4.0
PHP_OS      : Darwin - Darwin Szabis-MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
INI actual  : /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc/tmp-php.ini
More .INIs  : 
---------------------------------------------------------------------
CWD         : /Users/szabizsoldos/Programming/php/build_php/php7-sapnwrfc
Extra dirs  : 
VALGRIND    : Not used
=====================================================================

/edit Added code fences.

gkralik commented 2 years ago

Thanks for reporting this. Unfortunately, I neither have experience with macOS nor access to a machine.

szabizs commented 2 years ago

Thanks for reporting this. Unfortunately, I neither have experience with macOS nor access to a machine.

basically its a linux so no big difference on that matter

gkralik commented 2 years ago

Does SAP provide the SDK for ARM - M1 is an ARM, isn't it?

szabizs commented 2 years ago

Does SAP provide the SDK for ARM - M1 is an ARM, isn't it?

Yes it is ARM, but I don't see that in the list, only macos specific.

image

szabizs commented 2 years ago

I'm thinking on creating a docker image and build the SAPNWRFC extension there and continue development on that image until ARM will start working.

LE So with docker, built on windows, it's working on Mac M1 also.

image

gkralik commented 2 years ago

Nothing we can do as long as SAP does not provide ARM builds.