Skip to content

OSGi-ify Graal nfi libffi#65

Merged
holgerfriedrich merged 2 commits intoopenhab:mainfrom
HolgerHees:nfi_libffi
Jun 26, 2025
Merged

OSGi-ify Graal nfi libffi#65
holgerfriedrich merged 2 commits intoopenhab:mainfrom
HolgerHees:nfi_libffi

Conversation

@HolgerHees
Copy link
Copy Markdown
Contributor

this lib was missing for cases where native modules where loaded

Signed-off-by: Holger Hees <holger.hees@gmail.com>
@HolgerHees
Copy link
Copy Markdown
Contributor Author

@florian-h05 and @ccutrer can you please review?

Copy link
Copy Markdown
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am no OSGi-ify maintainer, so I can’t merge.

<artifactId>org.graalvm.truffle.truffle-nfi-libffi</artifactId>
<version>${graalvm.version}</version>

<name>GraalVM :: Truffle :: NFI :: LIBFFI</name>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<name>GraalVM :: Truffle :: NFI :: LIBFFI</name>
<name>GraalVM :: Truffle :: NFI :: LibFFI</name>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Holger Hees <holger.hees@gmail.com>
Copy link
Copy Markdown
Member

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reviews, @florian-h05 and @ccutrer.

@holgerfriedrich holgerfriedrich merged commit d09a8e5 into openhab:main Jun 26, 2025
2 checks passed
@holgerfriedrich holgerfriedrich added the bug Something isn't working label Jun 26, 2025
@ccutrer
Copy link
Copy Markdown
Member

ccutrer commented Jun 26, 2025

Oops. LibFFI acts as a TruffleLanguageProvider, so will need these lines added to the osgi.bnd file (like python-language):

Require-Capability: osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"
Provide-Capability: osgi.serviceloader;osgi.serviceloader="com.oracle.truffle.api.provider.TruffleLanguageProvider"  

It will also need to be at start-level 78 when referenced from a feature.xml

@HolgerHees HolgerHees deleted the nfi_libffi branch June 26, 2025 17:26
@florian-h05
Copy link
Copy Markdown
Contributor

I did only check if the BND file looks good, not if it’s missing service loading …

@HolgerHees
Copy link
Copy Markdown
Contributor Author

I did only check if the BND file looks good, not if it’s missing service loading …

I'm not an osgi expert. So I would not see it also if I look into this file ;-)

But I created a follow up pull request to take care of this

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants