Opened 9 years ago

Closed 14 months ago

#45745 closed defect (fixed)

soprano @2.9.4_5+universal: Undefined symbols for architecture (fill in non-host architecture): _JNI_CreateJavaVM

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc: petrov@…, chrstphrchvz (Christopher Chavez)
Port: soprano

Description

Undefined symbols for architecture i386:
  "_JNI_CreateJavaVM", referenced from:
      JNIWrapper::instance() in jniwrapper.cpp.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Attachments (1)

main.log (797.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 4 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: petrov@… added
Keywords: yosemite removed
Summary: soprano @2.9.4+universal fails on Yosemitesoprano @2.9.4+universal: Undefined symbols for architecture i386: _JNI_CreateJavaVM

Has duplicate #49902.

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Owner: pixilla deleted
Status: newassigned

See #57827

comment:3 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

soprano has since been updated to 2.9.4_4. Is this ticket still relevant (particularly given the improvements made in [314102b37f/macports-ports]), or can it be closed?

comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

The problem still exists, as originally reported.

Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:6 Changed 16 months ago by kencu (Ken)

Summary: soprano @2.9.4+universal: Undefined symbols for architecture i386: _JNI_CreateJavaVMsoprano @2.9.4_5+universal: Undefined symbols for architecture i386: _JNI_CreateJavaVM

comment:7 Changed 16 months ago by kencu (Ken)

So this port can't build universal on an M1 Mac (or perhaps on any Mac) because the JVM isn't universal.

I am not sure if we might hack together a universal java-19 installation for M1 Macs -- it might be possible.

Edit: I did this for openjdk-18, but it was unstable. https://github.com/kencu/macports-ports/commits/openjdk18universal

But you can install soprano +universal if you disable all the JAVA stuff. To do that, I just forced it all off everywhere, like this:

% diff -u Portfile `port file soprano`
--- Portfile	2022-12-29 23:19:54
+++ /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/soprano/Portfile	2023-01-02 14:43:19
@@ -2,7 +2,7 @@
 
 PortSystem          1.0
 PortGroup           kde4 1.1
-PortGroup           java 1.0
+#PortGroup           java 1.0
 
 name                soprano
 version             2.9.4
@@ -28,9 +28,9 @@
                     size    1958856
 
 # Required java version.
-java.version        11+
+#java.version        11+
 # LTS JDK port to install if required java not found
-java.fallback       openjdk11
+#java.fallback       openjdk11
 
 depends_lib-append  port:strigi \
                     port:raptor2 \
@@ -49,6 +49,14 @@
 
 configure.args-append \
                     -DSOPRANO_DISABLE_CLUCENE_INDEX=1
+
+# prevent finding java if installed
+configure.env-append "JAVA_HOME="
+configure.args-append -DJAVA_AWT_INCLUDE_PATH= \
+                      -DJAVA_AWT_LIBRARY= \
+                      -DJAVA_INCLUDE_PATH= \
+                      -DJAVA_INCLUDE_PATH2= \
+                      -DJAVA_JVM_LIBRARY=
 
 livecheck.type      sourceforge
 livecheck.url       http://sourceforge.net/projects/soprano/files/Soprano/

if soprano is really disabled badly without JAVA support, then some other plan will be needed.

Last edited 15 months ago by kencu (Ken) (previous) (diff)

comment:8 Changed 16 months ago by kencu (Ken)

Summary: soprano @2.9.4_5+universal: Undefined symbols for architecture i386: _JNI_CreateJavaVMsoprano @2.9.4_5+universal: Undefined symbols for architecture: _JNI_CreateJavaVM

comment:9 Changed 16 months ago by kencu (Ken)

Summary: soprano @2.9.4_5+universal: Undefined symbols for architecture: _JNI_CreateJavaVMsoprano @2.9.4_5+universal: Undefined symbols for architecture (fill in non-host architecture): _JNI_CreateJavaVM

comment:10 Changed 14 months ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: assignedclosed

In 0af732b43cb96a154a45f391d9d9f93b004bcc2f/macports-ports (master):

soprano: disable java backend

the JavaVM requirement is a problem, as there is no current universal JavaVM for arm64/x86_64
and the kde ports can't build as arm64. So they would need an x86_64 JavaVM installed if there
is one. Any JavaVM the user has installed on an arm Mac is unlikely to be Intel arch.
just disable the java backend to allow the kde4 ports to build.

closes: #66783
closes: #45745

Note: See TracTickets for help on using tickets.