Opened 5 years ago

Closed 14 months ago

#57743 closed defect (fixed)

db48 +java: fatal error: 'jni.h' file not found

Reported by: russhousley Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: ZotSci21
Port: db48

Description (last modified by mf2k (Frank Schima))

$sudo port upgrade outdated
--->  Building db48
Error: Failed to build db48: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_db48/db48/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
$open /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_db48/db48/main.log
$

Attachments (1)

main.log (325.7 KB) - added by russhousley 5 years ago.
.../db48/main.log

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by russhousley

Attachment: main.log added

.../db48/main.log

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

In the future, please use WikiFormatting and add the port maintainer(s) to Cc (port info --maintainers db48), if any.

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

Description: modified (diff)
Owner: set to jmroot
Status: newassigned

comment:3 Changed 5 years ago by danielluke (Daniel J. Luke)

you're building with +java but the build isn't able to find jni.h (do you have a jdk installed?)

comment:4 Changed 5 years ago by jmroot (Joshua Root)

Summary: Building db48 fails on MacOS 10.14.1db48 +java build fails on MacOS 10.14.1

Yeah. I suspect this has not been tested with the 10.14-compatible JDK versions, as +java is only on by default on 10.6 and older. Probably needs to use the java portgroup somehow.

comment:5 Changed 5 years ago by sharris40 (Spencer Harris)

There are actually four separate problems here:

  1. java_home isn't properly checked.
  2. The scripts assume the include subdirectory is genunix, not darwin.
  3. Version detection is broken (because of course it is).
  4. The class files must be built for Java 7 or earlier.

Issues 1-3 are simple patches to dist/configure. Issue 4 can be solved by cross-compiling. While we can just set source and target in JAVACFLAGS, we really should have an rt.jar from Java 7. It would probably be best to add a new port that downloads the Java 7 reference implementation from java.net and extracts the architecture-independent library files somewhere in the prefix, add that port as a build dependency to the java variant, and set the bootclasspath to that rt.jar along with setting source and target to 1.7.

comment:6 Changed 5 years ago by jmroot (Joshua Root)

I am a bit curious as to what users need db48+java for. If there's not a real need for it, I'm inclined to just disable the variant.

comment:7 Changed 4 years ago by kencu (Ken)

it's likely being pulled it when some other port is being asked to install +java, eg Octave.

comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: db48 +java build fails on MacOS 10.14.1db48 +java: fatal error: 'jni.h' file not found

comment:9 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ZotSci21 added

Has duplicate #62778.

comment:10 Changed 14 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 34ffea56d67386ade0e9a381903c4a091abf7d60/macports-ports (master):

db48: move java and tcl bindings to subports

Also use the java portgroup and fix other java build issues.

Closes: #45826
Closes: #57743
Closes: #64470
Closes: #65831

Note: See TracTickets for help on using tickets.