Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#68232 closed defect (fixed)

john-jumbo @1.9.0_3: does not install executables on arm64

Reported by: JDLH (Jim DeLaHunt) Owned by: catap (Kirill A. Korinsky)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: john-jumbo john-jumbo-devel

Description

Ports john-jumbo @1.9.0_3 and john-jumbo-devel @1.9.0_3 appear to install no executable. This may be limited to arm64 (M1, Apple Silicon) architectures. This appears to be true regardless of the presence or absence of the +threads and +native variants.

How to reproduce: Install ports "john-jumbo" or "john-jumbo-devel". I used a MacBook Pro with an Apple M1 Max CPU and macOS 12.6.8 Monterey. Then attempt to run john's executable.

% sudo port install -k john-jumbo -threads
--->  Computing dependencies for john-jumbo
--->  Fetching archive for john-jumbo
--->  Attempting to fetch john-jumbo-1.9.0_3.darwin_21.arm64.tbz2 from https://packages.macports.org/john-jumbo
--->  Attempting to fetch john-jumbo-1.9.0_3.darwin_21.arm64.tbz2 from http://mirror.fcix.net/macports/packages/john-jumbo
--->  Attempting to fetch john-jumbo-1.9.0_3.darwin_21.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/john-jumbo
--->  Fetching distfiles for john-jumbo
--->  Verifying checksums for john-jumbo
--->  Extracting john-jumbo
--->  Applying patches to john-jumbo
--->  Configuring john-jumbo
--->  Building john-jumbo                                
--->  Staging john-jumbo into destroot                   
--->  Installing john-jumbo @1.9.0_3
--->  Deactivating john-jumbo @1.9.0_3+threads
--->  Cleaning john-jumbo
--->  Activating john-jumbo @1.9.0_3
--->  Cleaning john-jumbo
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  john-jumbo has the following notes:
    This version is built based on a base architecture for convenience, which may not be optimized for your system. To build a version customized for your machine, use the +native variant
    You'll find the john files under /opt/local/share/john/

Observed behaviour:

% john
zsh: command not found: john
% ls -l /opt/local/bin/john
lrwxr-xr-x  1 root  wheel  26 23 Sep 14:22 /opt/local/bin/john -> /opt/local/share/john/john
% ls -l /opt/local/share/john/john
ls: /opt/local/share/john/john: No such file or directory

Expected behaviour: executable for john runs, without errors.

Discussion: Looking at the Portfile for john, the "john" port has a supported_archs directive and a switch statement about how to handle various archictectures, but the "john-jumbo" and "john-jumbo-devel" ports appear to lack these. Is Arm64 included in the default supported_archs list?

Earlier, subport "john-jumbo" also did not install an executable, but this was because it has a build failure. See ticket #67973. That is fixed.

Earlier, port "john" did not install an executable, but this was due to it not patching for Arm architecture. See ticket #67975. That is fixed, but this problem smells like a similar issue but with the other subports.

Change History (9)

comment:1 Changed 14 months ago by JDLH (Jim DeLaHunt)

Looking at the main.log file, I see some interesting things.

I do not see any error messages.

I see evidence of the configure phase, then the build phase starts. An overall make}} happens. The make activity enters the {{{./src directory, visits some subdirectories and compiles code there, then leaves the final subdirectory… and leaves the ./src directory, without compiling anything in ./src/! It then moves on to the destroot phase.

…[skipping previous log]…
:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src" && /usr/bin/make -j10 -w all 
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src" && /usr/bin/make -j10 -w all 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src'
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src/aes'
…[skipping compilation of subdirectories]…
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src/poly1305-donna'
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_john/john-jumbo-devel/work/john-c798c3f39215f6e08c67677eb9b79f65cfe08e40/src'
:debug:build Privilege de-escalation not attempted as not running as root.
:debug:destroot destroot phase started at Sat Sep 23 14:45:36 PDT 2023
:notice:destroot --->  Staging john-jumbo-devel into destroot
…[skipping following log]…

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

Owner: changed from kirill@… to catap

It seems to have installed files on the Ventura arm64 builder at least: https://build.macports.org/builders/ports-13_arm64-builder/builds/36503/steps/install-port/logs/files

Hasn't been built for Monterey or Big Sure yet though.

Version 0, edited 14 months ago by jmroot (Joshua Root) (next)

comment:3 Changed 14 months ago by catap (Kirill A. Korinsky)

The root cause of issue that make all doesn't work as expected: https://github.com/openwall/john/blob/bleeding-jumbo/src/Makefile.in#L971-L975 instead it should use default or another target.

One of PRs review was suggestion to cleanup build target which introduced this issue.

So, here the fix: https://github.com/macports/macports-ports/pull/20564

comment:4 in reply to:  2 Changed 14 months ago by JDLH (Jim DeLaHunt)

Replying to jmroot:

It seems to have installed files on the Ventura arm64 builder at least: https://build.macports.org/builders/ports-13_arm64-builder/builds/36503/steps/install-port/logs/files

What I see there is an entry for /opt/local/bin/john. That does get installed on my system, but it is only a symlink to /opt/local/share/john/john.

That list of files has no entry for /opt/local/share/john/john. Thus I think the Ventura arm64 builder demonstrated this bug.

comment:5 in reply to:  3 ; Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to JDLH:

Ports john-jumbo @1.9.0_3 and john-jumbo-devel @1.9.0_3 appear to install no executable. This may be limited to arm64 (M1, Apple Silicon) architectures. This appears to be true regardless of the presence or absence of the +threads and +native variants.

I'm surprised to see another ticket about these ports, given all of the previous tickets you filed that were now resolved.

Discussion: Looking at the Portfile for john, the "john" port has a supported_archs directive and a switch statement about how to handle various archictectures, but the "john-jumbo" and "john-jumbo-devel" ports appear to lack these. Is Arm64 included in the default supported_archs list?

Yes, as discussed in previous tickets, john doesn't support arm64 and yes it needs a switch statement to tell the custom Makefile what architecture to build for. john-jumbo and its -devel counterpart have been fixed to work on arm64 and use an autotools build system that does not need to be informed about the architecture. Yes, when a portfile does not specify supported_archs, all architectures are assumed to be supported. You can tell that arm64 is among this port's set of supported architectures by the fact that the name of the archive MacPorts tried to download contained "arm64" before the .tbz2 extension.

Replying to catap:

The root cause of issue that make all doesn't work as expected: https://github.com/openwall/john/blob/bleeding-jumbo/src/Makefile.in#L971-L975 instead it should use default or another target.

One of PRs review was suggestion to cleanup build target which introduced this issue.

What I said in that PR was that build.target clean and the architecture switch statement should apply only to the john port, not to all of the subports as you originally had it. I didn't say to remove build.target default.

comment:6 in reply to:  5 Changed 14 months ago by JDLH (Jim DeLaHunt)

Replying to ryandesign:

Replying to JDLH:

Ports john-jumbo @1.9.0_3 and john-jumbo-devel @1.9.0_3 appear to install no executable. This may be limited to arm64 (M1, Apple Silicon) architectures. This appears to be true regardless of the presence or absence of the +threads and +native variants.

I'm surprised to see another ticket about these ports, given all of the previous tickets you filed that were now resolved.

I was surprised too. I suppose that resolving a ticket is not the same as fixing the corresponding problem in the software, or as fixing the one problem without creating another. But, we are a bunch of volunteers working with complex upstream codebases, so we should be understanding. I am grateful to everyone who puts in the work for this project.

comment:7 in reply to:  5 Changed 14 months ago by catap (Kirill A. Korinsky)

Replying to ryandesign:

Replying to catap:

The root cause of issue that make all doesn't work as expected: https://github.com/openwall/john/blob/bleeding-jumbo/src/Makefile.in#L971-L975 instead it should use default or another target.

One of PRs review was suggestion to cleanup build target which introduced this issue.

What I said in that PR was that build.target clean and the architecture switch statement should apply only to the john port, not to all of the subports as you originally had it. I didn't say to remove build.target default.

You didn't but the scope of rework was huge and I simple missed that.

comment:8 Changed 14 months ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 2665dd61f0793e819d0597d89303bc47abc3f15d/macports-ports (master):

john-jumbo{,-devel}: use the right build target; john-jumbo-devel: update to 20230922

Closes: #68232

comment:9 Changed 14 months ago by JDLH (Jim DeLaHunt)

Thank you! I was able to upgrade my installation of john-jumbo-devel, and it runs successfully. I consider this ticket fixed.

Note: See TracTickets for help on using tickets.