[MacPorts] #69465: pdftk-java compilation fails: Unable to find a javac compiler
MacPorts
noreply at macports.org
Sat Mar 9 12:38:47 UTC 2024
#69465: pdftk-java compilation fails: Unable to find a javac compiler
--------------------------+------------------------
Reporter: chrisdiamand | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: pdftk-java
--------------------------+------------------------
Hi,
I'm trying to install pdftk-java on a clean installation (I tried `port
clean` first, then wiped the whole installation and started again, but
neither helped).
I'm running this:
{{{
# sudo port install pdftk-java
...
---> Building pdftk-java
Error: Failed to build pdftk-java: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe
there is a bug.
Error: Processing of port pdftk-java failed
---> Some of the ports you installed have notes:
openjdk11 has the following notes:
If you want to make openjdk11 the default JDK, add this to shell
profile:
export
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk11/Contents/Home
}}}
The pertinent bit of the build log is this:
{{{
:notice:build ---> Building pdftk-java
:debug:build Executing org.macports.build (pdftk-java)
:debug:build Environment:
:debug:build CC_PRINT_OPTIONS='YES'
:debug:build
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/.CC_PRINT_OPTIONS'
:debug:build CPATH='/opt/local/include'
:debug:build DEVELOPER_DIR='/Library/Developer/CommandLineTools'
:debug:build JAVA_HOME='/Library/Internet Plug-
Ins/JavaAppletPlugin.plugin/Contents/Home'
:debug:build LIBRARY_PATH='/opt/local/lib'
:debug:build MACOSX_DEPLOYMENT_TARGET='14.0'
:debug:build
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
:info:build Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3" && ant jar
:debug:build system: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3" && ant jar
:info:build Buildfile:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3/build.xml
:info:build Trying to override old definition of task javac
:info:build compile:
:info:build [mkdir] Created dir:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3/build/classes
:info:build BUILD FAILED
:info:build
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3/build.xml:16: Unable to find a javac compiler;
:info:build com.sun.tools.javac.Main is not on the classpath.
:info:build Perhaps JAVA_HOME does not point to the JDK.
:info:build It is currently set to "/Library/Internet Plug-
Ins/JavaAppletPlugin.plugin/Contents/Home"
:info:build Total time: 0 seconds
:info:build Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_textproc_pdftk-java/pdftk-
java/work/pdftk-3.3.3" && ant jar
:info:build Exit code: 1
:error:build Failed to build pdftk-java: command execution failed
:debug:build Error code: CHILDSTATUS 44585 1
}}}
Exporting
`JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk11/Contents/Home`,
either as root or before the `sudo` command has no effect - the log still
thinks it's set to `/Library/Internet Plug-
Ins/JavaAppletPlugin.plugin/Contents/Home`.
Installation of the `openjdk11` dependency seems to have succeeded though,
but I can't figure out why it's then being ignored by the `pdftk-java`
build.
Thanks!
--
Ticket URL: <https://trac.macports.org/ticket/69465>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list