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

Targeting Android - Issue with compilation #326

Open
EuroV8 opened this issue Jun 26, 2023 · 5 comments
Open

Targeting Android - Issue with compilation #326

EuroV8 opened this issue Jun 26, 2023 · 5 comments
Assignees

Comments

@EuroV8
Copy link

EuroV8 commented Jun 26, 2023

Hello,
I am trying to compile a mobile app targeting Android with buildozer (the app is built using the Kivy framework), and I'm using (obviously) pyrfc inside.

  • I have installed the SAP NWRFC SDK 750 and followed installaton instructions (ie. env. variables and created the appropriate file in ld.so.conf.d)
    I'm using :
  • Manjaro Linux, kernel version 6.1.31-2
  • Python 3.11.3
  • SAP NW RFC SDK 7.50.11 (Linux x86-64)
  • PyRFC 2.8.3 (latest as of writing)

And I'm getting this error:
ld: error: /usr/local/sap/nwrfcsdk/lib/libsapnwrfc.so is incompatible with aarch64linux ld: error: /usr/local/sap/nwrfcsdk/lib/libsapucum.so is incompatible with aarch64linux clang-14: error: linker command failed with exit code 1 (use -v to see invocation) error: command '/home/[username]/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++' failed with exit code 1 error: subprocess-exited-with-error

Maybe my question is dumb, or rhetorical, but could this be remedied by installing an SDK for the target platform (if it even exists for arm64?), or is it simply not possible to target android using pyrfc&nwrfcsdk?

I'm sorry if this is something quite obvious, but I am quite confused as to what I should/what I can do now,
Thanks.

@bsrdjan bsrdjan self-assigned this Jun 27, 2023
@bsrdjan
Copy link
Member

bsrdjan commented Jun 27, 2023

SAP NWRFC SDK and PyRFC are not supported on Android platform, see the list of supported platforms:
https://github.com/SAP/PyRFC#supported-platforms

Can you share some more info why would you need RFC connectivity from mobile Android device, direct to ABAP system? Mobile devices usually talk to some middleware, on-premise or cloud and the middleware is connected to ABAP backend. Would Android device in your scenario connect direct to ABAP backend and why?

@EuroV8
Copy link
Author

EuroV8 commented Jun 27, 2023

Thanks for your response.
I'm evaluating the feasibility of creating an easily portable app that would be usable, among others, on Android devices, for things such as goods receipts and QI inspections, as a native Android app. I am aware that apps usually pass through webservices to achieve the same goals, I was trying to evaluate if such functionnalities are also achievable with Python.
The app would then call appropriate BAPIs to perform the aforementionned tasks.

@mpf82
Copy link

mpf82 commented Jun 27, 2023

AFAIK, you may not distribute the SDK, see this docker container related discussion #194 (comment) ( Someone correct me if I'm wrong. )

So your users would have to somehow install the SDK themselves, ontop of your portable app, making it "less portable" (or at least less convenient).

@bsrdjan
Copy link
Member

bsrdjan commented Jun 27, 2023

The scenario looks similar to SAP ITSmobile and makes sense I think. SAP ITSmobile is older technology, providing direct access to ABAP system SAP GUI, from mobile device web-browser. It is used in scenarios you mentioned and many others.

SAP NWRFC SDK is PyRFC dependency and installed separately. As @mpf82 explained, some mechanism is required to pull the SDK to Android mobile devices, but SDK does not work on Android.

These platforms are supported and Android is not planned in near future:

https://launchpad.support.sap.com/#/notes/2573790

@EuroV8
Copy link
Author

EuroV8 commented Jun 27, 2023

Again, thanks for your answers.
My concerns were unfortunately correct, it's a shame that Android isn't supported, because it would make for a much easier framework for app development, at least for people with much less SAP experience such as myself.
I will look into SAP's ITSMobile, my main goal was integrating a QR-Code reading functionnality using mobile devices' cameras, which wasn't very difficult to do with Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants