Developing an app which benefits from OpenMP;
but it appears the library is not installed on the phone (XPeria 10 II )?
Seems to be installed on mine, though something else might have pulled it in.
Which is exactly what you should do - define it in your app’s Requires list so it gets installed automatically.
You should do that for all direct dependencies and don’t rely on its presence on the target device, default availability of libraries might change.
The funny thing is, in my build target its present. So I would assume that it would be present on device as well, be it pulled it, or preinstalled…
Edit:
[SailfishOS-5.0.0.62-aarch64] harbour-facekey $ rpm -qf /usr/lib64/libgomp.so
libgomp-10.3.1-1.8.6.jolla.aarch64
More interestingly, package seems to be lacking pkgconfig?
[SailfishOS-5.0.0.62-aarch64] harbour-facekey $ rpm -ql libgomp-10.3.1-1.8.6.jolla.aarch64
/usr/lib64/libgomp.so
/usr/lib64/libgomp.so.1
/usr/lib64/libgomp.so.1.0.0
[SailfishOS-5.0.0.62-aarch64] harbour-facekey $ zypper search libgomp
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+---------+----------------------------------------+--------
i | libgomp | GCC OpenMP v4.5 shared support library | package
[SailfishOS-5.0.0.62-aarch64] harbour-facekey $ zypper search libgomp-devel
Loading repository data...
Reading installed packages...
No matching items found.
I mean, assuming is exactly the wrong thing, your app should pull its dependencies. If they’re already present, nothing happens anyway but if they’re not they get installed automatically.
Any chance you use BitSailor on the target device? Cause that one pulls it.
The plot thickens;
there’s no direct dependency to libgomp in bitsailor:
but it depends on libsecret , which I would assume could benefit from it…soooo
→ EDIT#2 after checking, sailfish-secrets/rpm/sailfish-secrets.spec at master · sailfishos/sailfish-secrets · GitHub nope. Interesting.
It depends on gcc which depends on libgomp.
Bingo. So a dev dependency only..(non-dev people usually dont install gcc on their phones, right)?
Yep, nope.
You should definitely NOT Require (as opposed to BuildRequire) gcc, or any -devel packages, nor anything pkgconfig().
If your app links to a lib, then the RPM builder should detect that and add the dependency automatically.
If your binary needs the lib for some other reason (e.g. it’s using dlopen() instead of linking), OR if you use __requires_exclude_from, then the RPM builder will not recognize the dep and you will have to add a Requires: manually.
Regarding the linked .yaml:
Why is harbour-bitsailor/rpm/harbour-bitsailor.yaml at cb1b32c4379f056de337f4465cc7b0ef889a8ee9 · RikudouSage/harbour-bitsailor · GitHub there? Does the app use make and gcc at runtime??
Does the app use
makeandgccat runtime?
Nothing like dynamic compilation, eh ![]()
Lol. Well you could do it purely in QML/node… ![]()
Not in BitSailor case, it installs bitwarden cli at runtime and that needs gcc to build the native part.
Not make IIRC, no idea why I added it. It installs bw cli through npm, though, which might need gcc to build native parts.