Opened 9 months ago

Closed 8 months ago

#67975 closed defect (fixed)

john @1.9.0_1: 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: arm64 Cc:
Port: john

Description

Port john @1.9.0_1 appears to install no executable. This may be limited to arm64 (M1, Apple Silicon) architectures.

How to reproduce: Install port "john". 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 -k install john
--->  Fetching archive for john
--->  Attempting to fetch john-1.9.0_1.darwin_21.arm64.tbz2 from https://packages.macports.org/john
--->  Attempting to fetch john-1.9.0_1.darwin_21.arm64.tbz2.rmd160 from https://packages.macports.org/john
--->  Installing john @1.9.0_1
--->  Activating john @1.9.0_1
--->  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 has the following notes:
    You'll find the john files under /opt/local/share/john/
% john
zsh: command not found: john

Observed behaviour:

% john
zsh: command not found: john
% ls -l /opt/local/bin/john
lrwxr-xr-x  1 root  admin  26  7 Nov  2021 /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: Subport "john-jumbo" also does not install an executable, but this is because it has a build failure. See ticket #67973.

Tickets #67973 and #62859 are related to building ports "john" and "john-jumbo" on arm64 architectures. It is not clear if they are related to this issue.

I suspect that this may be arm64-related, but I don't have evidence for that. I can't image that this has never worked, and arm64 architectures are the most recent change which seems relevant.

Change History (5)

comment:1 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

I agree. By looking at the file information in the port health section of the MacPorts web page for this port, I see that the two arm64 builds for which we have data install four fewer files than the x86_64 builds: on arm64, john, unafs, unique, and unshadow in /opt/local/share/john are missing. The builds happened long enough ago that we don't have the logs anymore. Could you attach your log? Run sudo port destroot john and then attach the file identified by port logfile john. In addition to fixing this build failure, we should fix the fact that the build did not stop with an error when it happened.

comment:2 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Ah, no need for a log; I can see why this happens by reading the Portfile code.

john uses a custom Makefile and the Portfile sets build.target to "clean" (this is weird but the build instructions for john say to do this), and then appends another target depending on the architecture, but there are only cases for ppc, ppc64, i386, and x86_64. There is no case for arm64, so on arm64, the only target that gets used is "clean", which of course succeeds at cleaning the project.

john-jumbo uses an autotools build and the Portfile sets build.target to "default" so this problem does not happen there.

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

I noticed that the switch statement in the Portfile lacked an arm64 case, and wondered if that was the problem; but I don't know MacPorts well enough to be confident in that. In addition to adding an arm64 case, maybe we should add a default case which fails the configure noisily if there is no case for the configure.build_arch in use (anticipating the next time Apple changes architectures).

comment:4 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: arm64 added
Summary: john @1.9.0_1: does not install executable (maybe arm64-related)john @1.9.0_1: does not install executables on arm64

Yes, I am adding a default case to make the build fail on unknown architectures.

john 1.9.0 does not provide a target for arm64 on macOS in its custom Makefile so I will mark the port as not supporting arm64 systems. It will then install for x86_64 on arm64 systems. This problem does not affect john-jumbo's autotools build system and it presumably won't affect the next version of john if it switches to the autotools build system. (The custom Makefile was already renamed to Makefile.legacy in the upstream repository in 2014.)

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

Owner: set to catap
Resolution: fixed
Status: newclosed

In 061c6023c18b92e8c2291824210f7d703bdb6dc4/macports-ports (master):

john-jumbo: fix build on arm64; add devel subport; claim maintainership

Closes: #42379
Closes: #62859
Closes: #67973
Closes: #67974
Closes: #67975

Note: See TracTickets for help on using tickets.