Opened 10 months ago
Last modified 9 months ago
#69213 new defect
openjdk21 @21.0.2_1: opportunistically attempts to use diffutils
Reported by: | cooljeanius (Eric Gallager) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.0 |
Keywords: | Cc: | breun (Nils Breunese) | |
Port: | openjdk21 |
Description
Attempting to build openjdk21 (a dependency for abcl) with trace mode results in the following error:
checking for gdiff... configure: error: Could not find required tool for DIFF configure exiting with result code 1 Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_openjdk21/openjdk21/work/jdk21u-jdk-21.0.2-ga" && /opt/local/bin/bash configure --prefix=/opt/local/Library/Java --with-debug-level=release --with-native-debug-symbols=none --with-version-string=21.0.2+13 --with-sysroot=`xcrun --sdk macosx --show-sdk-path` --with-extra-cflags="-Os" --with-extra-cxxflags="-Os -stdlib=libc++" --with-extra-ldflags="-L/opt/local/lib -Wl,-headerpad_max_install_names" --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk-21-azul-zulu.jdk/Contents/Home --with-freetype=system --with-freetype-include=/opt/local/include/freetype2 --with-freetype-lib=/opt/local/lib --disable-warnings-as-errors --disable-precompiled-headers --with-vendor-name="MacPorts" --with-vendor-url="https://www.macports.org" --with-vendor-bug-url="https://trac.macports.org/newticket?port=openjdk21" --with-vendor-vm-bug-url="https://trac.macports.org/newticket?port=openjdk21" --with-conf-name=release --with-debug-level=release --with-jvm-variants=server Exit code: 1 Error: Failed to configure openjdk21: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_openjdk21/openjdk21/work/jdk21u-jdk-21.0.2-ga/config.log Warning: The following existing files were hidden from the build system by trace mode: /opt/local/bin/file /opt/local/bin/gdiff /opt/local/bin/ggrep /opt/local/bin/gsed /private/var/select/sh
It looks like a dependency on diffutils is needed (and possibly also some dependencies on file, grep, and gsed as well, although those can probably be bin-style dependencies instead).
Change History (10)
comment:1 follow-up: 3 Changed 10 months ago by jmroot (Joshua Root)
comment:2 Changed 10 months ago by breun (Nils Breunese)
I was not familiar with trace mode yet. What command are you running exactly? I tried reproducing this, but when I run sudo port -t install openjdk21
, installing gmake
already fails:
❯ sudo port -t install openjdk21 ---> Computing dependencies for openjdk21 The following dependencies will be installed: autoconf gmake m4 Continue? [Y/n]: y ---> Fetching archive for gmake ---> Attempting to fetch gmake-4.4.1_0.darwin_23.arm64.tbz2 from https://packages.macports.org/gmake ---> Attempting to fetch gmake-4.4.1_0.darwin_23.arm64.tbz2.rmd160 from https://packages.macports.org/gmake ---> Installing gmake @4.4.1_0 ---> Activating gmake @4.4.1_0 Error: Failed to activate gmake: command execution failed while executing "system $cmdstring" Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gmake/gmake/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port openjdk21 failed ~ took 13s ❌1 ❯ less /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gmake/gmake/main.log
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gmake/gmake/main.log
contains this error:
:msg:activate ---> Activating gmake @4.4.1_0 :debug:activate Using bsdtar with HFS+ compression (if valid) :debug:activate Using /usr/bin/bzip2 :debug:activate system: /usr/bin/bzip2 -d -c /opt/local/var/macports/software/gmake/gmake-4.4.1_0.darwin_23.arm64.tbz2 | ( bsdtar -xvp --hfsCompression -f - ) :info:activate Command failed: /usr/bin/bzip2 -d -c /opt/local/var/macports/software/gmake/gmake-4.4.1_0.darwin_23.arm64.tbz2 | ( bsdtar -xvp --hfsCompression -f - ) :info:activate Killed by signal: 9 :error:activate Failed to activate gmake: command execution failed :error:activate while executing :error:activate "system $cmdstring" :debug:activate Error code: CHILDKILLED 3184 SIGKILL {kill signal} :debug:activate Backtrace: command execution failed :debug:activate while executing :debug:activate "system $cmdstring" :debug:activate while executing :debug:activate "throw [dict get $eOptions -errorcode] [dict get $eOptions -errorinfo]" :debug:activate (procedure "extract_archive_to_tmpdir" line 158) :debug:activate invoked from within :debug:activate "extract_archive_to_tmpdir $location" :debug:activate (procedure "_activate_contents" line 9) :debug:activate invoked from within :debug:activate "_activate_contents $requested $rename_list" :debug:activate (procedure "portimage::activate" line 70) :debug:activate invoked from within :debug:activate "registry_activate $subport $_inregistry_version $_inregistry_revision $_inregistry_variants $optionlist" :debug:activate (procedure "portactivate::activate_main" line 20) :debug:activate invoked from within :debug:activate "$procedure $targetname"
Does this indicate a bug in the gmake
port?
comment:3 follow-up: 4 Changed 10 months ago by breun (Nils Breunese)
Replying to jmroot:
But it succeeds without trace mode and without diffutils installed?
I don't have the diffutils
port installed, but maybe without trace mode /usr/bin/diff
is used?
comment:4 follow-up: 6 Changed 10 months ago by jmroot (Joshua Root)
Trace mode is broken on arm64, see #66358.
Replying to breun:
I don't have the
diffutils
port installed, but maybe without trace mode/usr/bin/diff
is used?
Yes, that's likely the case. Similarly, we don't add dependencies on gawk, grep, gsed etc. to all the (very numerous) ports that will use them if present, but also work fine with /usr/bin/awk et al.
comment:5 Changed 10 months ago by breun (Nils Breunese)
Maybe trace mode shouldn't hide those binaries then?
comment:6 follow-up: 7 Changed 10 months ago by cooljeanius (Eric Gallager)
Replying to jmroot:
But it succeeds without trace mode and without diffutils installed?
No, without trace mode, it runs into a different build error, which looked like it would have required further investigation, and probably would have been more difficult to figure out what exactly the issue was, so I thought I could just work around it by trying trace mode instead. Also, if I try to uninstall diffutils
, it warns me against doing so with the following output:
DEBUG: uninstall phase started at Sun Jan 28 14:29:37 EST 2024 DEBUG: Executing org.macports.uninstall (diffutils) Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents. The following ports will break: useful-ports @0.1_9 gutils-suite-core @1.1_3 Continue? [y/N]: n
(the "useful-ports" one is from my local portfile repository)
Replying to breun:
I was not familiar with trace mode yet. What command are you running exactly?
sudo port -udct upgrade outdated
(since abcl
is the first outdated port that it tries to upgrade)
Replying to jmroot:
Trace mode is broken on arm64, see #66358.
(I'm on x86_64, for reference)
comment:7 follow-up: 8 Changed 10 months ago by breun (Nils Breunese)
Replying to cooljeanius:
Replying to jmroot:
But it succeeds without trace mode and without diffutils installed?
No, without trace mode, it runs into a different build error, which looked like it would have required further investigation, and probably would have been more difficult to figure out what exactly the issue was, so I thought I could just work around it by trying trace mode instead.
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms doesn't provide very concrete minimum build OS requirements, but according to https://ports.macports.org/port/openjdk21/details/ openjdk21
builds fine on 10.14 Mojave and later. I don't know if that is expected or not, but maybe this port should be restricted to 10.14+.
If you're on 10.14+, could you create a ticket for that build error? I could be interesting to see that one. If you're on 10.13 or older, I don't know if the port can be made to build on that.
comment:8 Changed 10 months ago by cooljeanius (Eric Gallager)
Replying to breun:
Replying to cooljeanius:
Replying to jmroot:
But it succeeds without trace mode and without diffutils installed?
No, without trace mode, it runs into a different build error, which looked like it would have required further investigation, and probably would have been more difficult to figure out what exactly the issue was, so I thought I could just work around it by trying trace mode instead.
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms doesn't provide very concrete minimum build OS requirements, but according to https://ports.macports.org/port/openjdk21/details/
openjdk21
builds fine on 10.14 Mojave and later. I don't know if that is expected or not, but maybe this port should be restricted to 10.14+.If you're on 10.14+, could you create a ticket for that build error? I could be interesting to see that one. If you're on 10.13 or older, I don't know if the port can be made to build on that.
I'm on Big Sur; the build error looks a lot like the one from #66325
comment:9 follow-up: 10 Changed 10 months ago by breun (Nils Breunese)
https://ports.macports.org/port/openjdk21/details/ shows successful builds on Big Sur for both arm64 and x86_64. Maybe you could create a separate ticket for the build error you get on Big Sur without trace mode?
comment:10 Changed 9 months ago by cooljeanius (Eric Gallager)
Replying to breun:
https://ports.macports.org/port/openjdk21/details/ shows successful builds on Big Sur for both arm64 and x86_64. Maybe you could create a separate ticket for the build error you get on Big Sur without trace mode?
OK, I opened #69440 for that.
But it succeeds without trace mode and without diffutils installed?