Build on s390x architecture- could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError
See original GitHub issueDescription
I’m using the plugin to build Docker images on x86_64, ppc64le & s390x architectures. Plugin is working fine on x86_64, ppc64le but is failing as following on s390x:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.29.0:build (build) on project ci.docker: Execution build of goal io.fabric8:docker-maven-plugin:0.29.0:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.29.0:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider
[ERROR] : could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError: could not locate stub library in jar file. Tried [jni/s390x-Linux/libjffi-1.2.so, /jni/s390x-Linux/libjffi-1.2.so] [ERROR] at com.kenai.jffi.internal.StubLoader.getStubLibraryStream(StubLoader.java:412) [ERROR] at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:355) [ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:258) [ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:449) [ERROR] at java.lang.Class.forNameImpl(Native Method) [ERROR] at java.lang.Class.forName(Class.java:403) [ERROR] at com.kenai.jffi.Init.load(Init.java:68) [ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49) [ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45) [ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103) [ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242) [ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237) [ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155) [ERROR] at com.kenai.jffi.Type.size(Type.java:138) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178) [ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49) [ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29) [ERROR] at java.lang.J9VMInternals.newInstanceImpl(Native Method) [ERROR] at java.lang.Class.newInstance(Class.java:1848) [ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68) [ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57) [ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35) [ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:73) [ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:76) [ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:101) [ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:60) [ERROR] at io.fabric8.maven.docker.access.util.LocalSocketUtil.canConnectUnixSocket(LocalSocketUtil.java:38) [ERROR] at io.fabric8.maven.docker.access.DockerConnectionDetector$UnixSocketDockerHostProvider.getConnectionParameter(DockerConnectionDetector.java:109) [ERROR] at io.fabric8.maven.docker.access.DockerConnectionDetector.detectConnectionParameter(DockerConnectionDetector.java:78) [ERROR] at io.fabric8.maven.docker.service.DockerAccessFactory.createDockerAccess(DockerAccessFactory.java:34) [ERROR] at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:222) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:191) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) [ERROR] at java.lang.reflect.Method.invoke(Method.java:508) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :ci.docker
Info
- d-m-p version : 0.29.0
- Maven version (
mvn -v
) : 3.5.0 - Tested on Xenial & Trusty Ubuntu (s390x arch) with libjffi-jni libjffi-java modules installed
- JDK: IBM JDK8
- Docker version : 18.06.3-ce
- If it’s a bug, how to reproduce :
- If it’s a feature request, what is your use case :
- Sample project : [GitHub Clone URL] (private repository)
Thanks a lot, any help would be appreciated. (also tried the skip.docker.machine option without success)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7
@saschpe thanks for bringing this up. I’d propose to monitor https://github.com/jnr/jnr-unixsocket/issues/95 and soon as this is fixed and released, we can update the dependencies.
The same issue occurs on Apple M1 machines.