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

Missing CAP cache value for: NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo: #1218

Closed
cbm64chris opened this issue Apr 25, 2023 · 4 comments · Fixed by #1220
Labels
bug Something isn't working

Comments

@cbm64chris
Copy link

cbm64chris commented Apr 25, 2023

Running the plugin mvn gluonfx:compile with a target of ios-sim yields the following error:

Missing CAP cache value for: NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10
com.oracle.svm.core.util.UserError$UserException: Missing CAP cache value for: NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10

I encountered this running a personal project but have been able to reproduce with the gluon-samples/HelloFX.

I can see in @jperedadnr you may have had the missing CAP cache entries for NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo in your fork, but I can't tell if they were ever merged or removed.

I have validated the same goal works for ios and host as expected.

Please let me know if I can help in anyway.
Thx
Chris

Expected Behavior

The goal should compile for x86_64-apple-ios.

Current Behavior

Process
=======
compile

Command Line
============
/Library/Java/JavaVirtualMachines/graalvm-svm-java17-darwin-gluon-22.1.0.1-Final/Contents/Home/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature -H:TempDirectory=/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/tmp -H:EnableURLProtocols=http,https -H:+PrintAnalysisCallTree -H:Log=registerResource: -H:ReflectionConfigurationFiles=/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/reflectionconfig-x86_64-ios.json -H:JNIConfigurationFiles=/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/jniconfig-x86_64-ios.json -H:ResourceConfigurationFiles=/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/resourceconfig-x86_64-ios.json -H:PageSize=16384 -Dsvm.targetName=iOS -Dsvm.targetArch=x86_64 -H:+UseCAPCache -H:CAPCacheDir=/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/capcache -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle,com.sun.media.jfxmedia.MediaErrors,com.sun.webkit.graphics.Images,com.sun.webkit.LocalizedStrings,javafx.scene.web.HTMLEditorSkin,com.sun.org.apache.xerces.internal.impl.msg.XMLMessages -Dsvm.platform=org.graalvm.nativeimage.Platform$IOS_AMD64 -cp /Users/chrislluff/.m2/repository/com/gluonhq/substrate/0.0.58/substrate-0.0.58.jar:/Users/chrislluff/code/club-parent/club-mobile-app/target/gluonfx/x86_64-ios/gvm/tmp/classpathJar.jar com.lufflogic.club.mobile.ClubMobile

Output
======
Warning: Ignoring server-mode native-image argument --no-server.
========================================================================================================================
GraalVM Native Image: Generating 'com.lufflogic.club.mobile.clubmobile' (shared library)...
========================================================================================================================

[1/7] Initializing...                                                                                    (0.0s @ 0.20GB)
Error: Missing CAP cache value for: NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10
com.oracle.svm.core.util.UserError$UserException: Missing CAP cache value for: NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10
	at com.oracle.svm.core.util.UserError.abort(UserError.java:72)
	at com.oracle.svm.hosted.c.info.InfoTreeVisitor.processChildren(InfoTreeVisitor.java:66)
	at com.oracle.svm.hosted.c.query.QueryResultParser.visitStructInfo(QueryResultParser.java:135)
	at com.oracle.svm.hosted.c.info.StructInfo.accept(StructInfo.java:62)
	at com.oracle.svm.hosted.c.info.InfoTreeVisitor.processChildren(InfoTreeVisitor.java:64)
	at com.oracle.svm.hosted.c.info.InfoTreeVisitor.visitNativeCodeInfo(InfoTreeVisitor.java:72)
	at com.oracle.svm.hosted.c.info.NativeCodeInfo.accept(NativeCodeInfo.java:57)
	at com.oracle.svm.hosted.c.query.QueryResultParser.parse(QueryResultParser.java:79)
	at com.oracle.svm.hosted.c.CAnnotationProcessorCache.get(CAnnotationProcessorCache.java:166)
	at com.oracle.svm.hosted.c.CAnnotationProcessor.process(CAnnotationProcessor.java:94)
	at com.oracle.svm.hosted.c.NativeLibraries.finish(NativeLibraries.java:554)
	at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1622)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1065)
	at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:888)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
	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)
------------------------------------------------------------------------------------------------------------------------
                         0.1s (4.8% of total time) in 9 GCs | Peak RSS: 0.58GB | CPU load: 7.68
========================================================================================================================
Failed generating 'com.lufflogic.club.mobile.clubmobile' after 1.8s.
Error: Image build request failed with exit status 1


Result
======
result: 1

Steps to Reproduce

Checkout out HelloFX project, modify the ios profile with the target of ios-sim. Change the compiler release version to 17.

mvn -Pios gluonfx:compile

Your Environment

macOS 13.3.1 (22E261)
2.4 GHz 8-Core Intel Core i9
32 GB 2667 MHz DDR4
OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS)

@cbm64chris cbm64chris added the bug Something isn't working label Apr 25, 2023
@cbm64chris
Copy link
Author

Just to add, I recreated this on aarch64 M1 macOS. Falling back to 1.0.16 of the gluonfx maven plugin allows the ios-sim target to work.

@meghanEmbrace
Copy link

I have also run into this issue. Falling back to 1.0.16 works for the default application but as soon as I add my project dependency I run into issue #1154 (OS: duplicate symbol in prefs).

@meghanEmbrace
Copy link

meghanEmbrace commented Jun 5, 2023

I noticed from #1196 that the following values had been removed. Adding them back allowed me to complete the build but it did then fail on the packaging step.

NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r10:PropertyInfo:offset=96
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r11:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r11:PropertyInfo:offset=104
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r12:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r12:PropertyInfo:offset=112
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r13:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r13:PropertyInfo:offset=120
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r14:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r14:PropertyInfo:offset=128
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r15:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r15:PropertyInfo:offset=136
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r8:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r8:PropertyInfo:offset=80
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r9:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___r9:PropertyInfo:offset=88
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rax:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rax:PropertyInfo:offset=16
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rbp:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rbp:PropertyInfo:offset=64
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rbx:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rbx:PropertyInfo:offset=24
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rcx:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rcx:PropertyInfo:offset=32
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rdi:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rdi:PropertyInfo:offset=48
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rdx:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rdx:PropertyInfo:offset=40
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rflags:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rflags:PropertyInfo:offset=152
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rip:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rip:PropertyInfo:offset=144
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rsi:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rsi:PropertyInfo:offset=56
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rsp:PropertyInfo:size=8
NativeCodeInfo:PosixDirectives:StructInfo:struct___darwin_mcontext64:StructFieldInfo:__ss___rsp:PropertyInfo:offset=72

@meghanEmbrace
Copy link

I also assume this is related to #1098

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 a pull request may close this issue.

2 participants