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

Windows native build fails #94

Open
maledoux opened this issue May 13, 2022 · 1 comment
Open

Windows native build fails #94

maledoux opened this issue May 13, 2022 · 1 comment

Comments

@maledoux
Copy link

Using latest main branch, tried compiling natively on Windows 10 20H2 and GraalVM 22.1.0

Getting errors with io.netty.channel.epoll on the server-runner compilation

mvn clean install -Dnative -DskipTests


GraalVM Native Image: Generating 'infinispan-quarkus-server-runner-14.0.0.Dev02-runner' (executable)...

[1/7] Initializing... (7.2s @ 0.53GB)
Version info: 'GraalVM 22.1.0 Java 11 CE'
C compiler: cl.exe (microsoft, x64, 19.29.30140)
Garbage collector: Serial GC
3 user-provided feature(s)

  • io.quarkus.caffeine.runtime.graal.CacheConstructorsAutofeature
  • io.quarkus.runner.AutoFeature
  • io.quarkus.runtime.graal.ResourcesFeature
    15:57:30,876 INFO [org.inf.ser.cor.RequestTracer] OpenTracing integration is disabled
    15:57:31,445 INFO [org.inf.SECURITY] ISPN000947: Using Java SSL Provider
    15:57:35,099 INFO [org.jbo.threads] JBoss Threads version 3.4.2.Final
    15:57:36,117 INFO [org.hib.ann.com.Version] HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
    To see how the classes got initialized, use --trace-class-initialization=io.netty.util.AbstractReferenceCounted,io.netty.channel.epoll.Epoll
    [2/7] Performing analysis... [*] (19.4s @ 1.83GB)
    22,190 (93.78%) of 23,663 classes reachable
    38,182 (70.68%) of 54,019 fields reachable
    117,563 (72.53%) of 162,079 methods reachable
    549 classes, 1,505 fields, and 3,945 methods registered for reflection

Error: Classes that should be initialized at run time got initialized during image building:
io.netty.util.AbstractReferenceCounted the class was requested to be initialized at run time (from 'META-INF\native-image\io.netty\common\native-image.properties' in 'file:///C:/Projects/FunFriday/Infinispan/infinispan-quarkus-main/server-runner/target/infinispan-quarkus-server-runner-14.0.0.Dev02-native-image-source-jar/infinispan-quarkus-server-runner-14.0.0.Dev02-runner.jar' with 'io.netty.util.AbstractReferenceCounted'). To see why io.netty.util.AbstractReferenceCounted got initialized use --trace-class-initialization=io.netty.util.AbstractReferenceCounted
io.netty.channel.epoll.Epoll the class was requested to be initialized at run time (from feature io.quarkus.runner.AutoFeature.beforeAnalysis with 'Epoll.class'). To see why io.netty.channel.epoll.Epoll got initialized use --trace-class-initialization=io.netty.channel.epoll.Epoll

com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
io.netty.util.AbstractReferenceCounted the class was requested to be initialized at run time (from 'META-INF\native-image\io.netty\common\native-image.properties' in 'file:///C:/Projects/FunFriday/Infinispan/infinispan-quarkus-main/server-runner/target/infinispan-quarkus-server-runner-14.0.0.Dev02-native-image-source-jar/infinispan-quarkus-server-runner-14.0.0.Dev02-runner.jar' with 'io.netty.util.AbstractReferenceCounted'). To see why io.netty.util.AbstractReferenceCounted got initialized use --trace-class-initialization=io.netty.util.AbstractReferenceCounted
io.netty.channel.epoll.Epoll the class was requested to be initialized at run time (from feature io.quarkus.runner.AutoFeature.beforeAnalysis with 'Epoll.class'). To see why io.netty.channel.epoll.Epoll got initialized use --trace-class-initialization=io.netty.channel.epoll.Epoll

    at com.oracle.svm.core.util.UserError.abort(UserError.java:72)
    at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:560)
    at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:167)
    at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:726)
    at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:74)
    at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:726)
    at com.oracle.graal.pointsto.PointsToAnalysis.runAnalysis(PointsToAnalysis.java:751)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:723)
    at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:558)
    at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:515)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:407)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
    at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:615)

[INFO] Infinispan Quarkus :: Server Runner ................ FAILURE [ 39.211 s]

@maledoux
Copy link
Author

I added this to my server-runner/src/main/resources/application.properties to get rid of the errors.

quarkus.native.additional-build-args=--initialize-at-run-time=io.lettuce.core.resource.Transports$NativeTransports\,io.lettuce.core.resource.EpollProvider\,o.netty.channel.epoll.Epoll\,io.netty.channel.DefaultFileRegion\,io.netty.util.AbstractReferenceCounted\,io.netty.channel.DefaultFileRegion\,io.netty.channel.epoll.Native\,io.netty.channel.epoll.Epoll\,io.netty.channel.epoll.EpollEventLoop\,io.netty.channel.epoll.EpollEventArray\,io.netty.channel.kqueue.KQueue\,io.netty.channel.kqueue.KQueueEventLoop\,io.netty.channel.kqueue.KQueueEventArray\,io.netty.channel.kqueue.Native\,io.netty.channel.unix.Limits\,io.netty.channel.unix.Errors\,io.netty.channel.unix.IovArray

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

No branches or pull requests

1 participant