Undefined symbols for architecture x86_64: "_Java_sun_security_pkcs11_wrapper_PKCS11_createNativeKey"
See original GitHub issueI turned to full Xcode (see previous issue with command-line-tools in #37) but still hit the wall with linking:
wojtek@atlantiscity.local ~/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML $ mvn client:link
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< hello:hellofxml >---------------------------
[INFO] Building hellofxml 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- client-maven-plugin:0.0.11:link (default-cli) @ hellofxml ---
Omega :: host triplet = x86_64-macos-macos
Omega :: target triplet = x86_64-macos-macos
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] ==================== LINK TASK ====================
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Processing graalLibs dependencies at /Users/wojtek/.gluon/omega/graalLibs/20.0.0-ea+12/bundle/lib
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Checking graalLibs hashes
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Processing JavaStatic dependencies at /Users/wojtek/.gluon/omega/javaStaticSdk/11-ea+6/macosx-libs-11-ea+6
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Checking java static sdk hashes
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Processing JavaFXStatic dependencies at /Users/wojtek/.gluon/omega/javafxStaticSdk/13-ea+7/macosx-sdk/lib
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Checking javafx static sdk hashes
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Setup dependencies done
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] got o at: /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/tmp/SVM-1565875921376/hellofxml.o
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Linking at /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/tmp
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] Sdk path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk, for type MacOSX
[jue. ago. 15 09:37:57 CLT 2019][DETALLADO] linkcmds = gcc -ObjC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -iframework/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -arch x86_64 -o /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/hellofxml.app/Contents/MacOS/hellofxml -Wl,-exported_symbols_list,/Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/release.symbols /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/hellofxml/AppDelegate.o /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/hellofxml/launcher.o /Users/wojtek/dev/_mine/java/_tmps/client-samples/Maven/HelloFXML/target/client/macos-x86_64/gvm/tmp/SVM-1565875921376/hellofxml.o -L/Users/wojtek/.gluon/omega/graalLibs/20.0.0-ea+12/bundle/lib/svm/clibraries/darwin-amd64 -L/Users/wojtek/.gluon/omega/javaStaticSdk/11-ea+6/macosx-libs-11-ea+6 -L/Users/wojtek/.gluon/omega/javafxStaticSdk/13-ea+7/macosx-sdk/lib -lffi -lpthread -lz -ldl -lstrictmath -llibchelper -lprism_es2 -lglass -ljavafx_font -ljavafx_iio -ljava -lnio -lzip -lnet -ljvm -lobjc -lj2pkcs11 -lsunec -Wl,-framework,Foundation -Wl,-framework,AppKit -Wl,-framework,ApplicationServices -Wl,-framework,OpenGL -Wl,-framework,QuartzCore -Wl,-framework,Security
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] Undefined symbols for architecture x86_64:
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] "_Java_sun_security_pkcs11_wrapper_PKCS11_createNativeKey", referenced from:
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] ___svm_version_info in hellofxml.o
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] ld: symbol(s) not found for architecture x86_64
[jue. ago. 15 09:37:58 CLT 2019][INFORMACIÓN] [SUB] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[jue. ago. 15 09:37:58 CLT 2019][DETALLADO] result of linking = 1
java.lang.RuntimeException: Error linking
at com.gluonhq.omega.target.MacosTargetProcess.link(MacosTargetProcess.java:501)
at com.gluonhq.omega.Omega.nativeLink(Omega.java:86)
at com.gluonhq.NativeLinkMojo.execute(NativeLinkMojo.java:54)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.716 s
[INFO] Finished at: 2019-08-15T09:37:58-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:client-maven-plugin:0.0.11:link (default-cli) on project hellofxml: Error: Error linking -> [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/MojoExecutionException
I’m using:
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
C++: Undefined symbols for architecture x86_64
Thanks, this seems to be the resolution, but when I run this command, I get a new error: Animal.cpp:3:6: error: definition of implicitly ......
Read more >Undefined symbols for architecture x86_64 #3918 - GitHub
While building the tesseract library using CMake and Xcode , it throws error with undefined symbol for x86_64 Undefined symbols for ...
Read more >Undefined symbols for architecture x86_64 - Apple Developer
I'm trying to create an application that sends keystrokes to another process and I keep getting this error: Undefined symbols for architecture x86_64:....
Read more >Undefined symbols for architecture x86 64 - YouTube
Undefined symbols for architecture x86 64 | Compiling CPP c++ programs in MAC or Linux. 17K views 2 years ago.
Read more >Undefined symbols for architecture x86_64 - 7348639
I am trying to build plugin for AI CC in Xcode 6.3.2- I have followed the doc "getting-started-guide.pdf", my project set up differ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Glad that it worked for you finally. We’ll look into the AdoptOpenJDK issues with the security libraries.
Would you mind testing OpenJDK 11? The samples have been tested with this version, it should work for you too.