Opened 8 months ago

Closed 8 months ago

#69564 closed defect (fixed)

gildas @202403a: Error in path to executables; Intel macos 10.13.6

Reported by: simonradford Owned by: bardeau
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: haspatch Cc:
Port: gildas

Description

While upgrading gildas (202311a -> 202403a), I encountered a build error. It appears there is an error (typo) in the path where the executables are installed. A workaround is to create a symlink. This allows the programs to function correctly.

The executables are installed in: /opt/local/lib/gildas/x86_64-macosx-gfortran/bin
But the lanuch scripts (in /opt/loca/bin) expect the executables in: /opt/local/lib/gildas/x86_64-macos-gfortran/bin
Notice the difference, "macosx" vs. "macos"

Workaround: Create a symlink

cd /opt/local/lib/gildas/
sudo ln -s x86_64-macosx-gfortran x86_64-macos-gfortran/

MacPorts build errors:

--->  Activating gildas @202403a_0+gcc12+openmp
--->  Cleaning gildas
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
Error: Port gildas is still broken after rebuilding it more than 3 times.
Error: rev-upgrade failed: Port gildas still broken after rebuilding 3 times

System: Intel Macos 10.13.6
(Installation on ARM is ok.)


# definitions in launch script

cat /opt/local/bin/greg



#!/bin/sh -e

export GAG_GAG="${HOME}/.gag"
export GAG_ROOT_DIR="/opt/local/lib/gildas"
export GAG_PATH="${GAG_ROOT_DIR}/etc"
export GAG_EXEC_SYSTEM="x86_64-macos-gfortran"
...
exec ${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/bin/greg ${*}

Change History (9)

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

Owner: set to bardeau
Status: newassigned

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

Apparently it varies. According to the port contents shown at https://ports.macports.org/port/gildas/details/, it's installed at "-macos-" on macOS 11 and later and "-macosx-" on macOS 10.15 and earlier. If the Portfile doesn't know in advance, it could detect what got built by using glob.

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

Looks like the admin/define-system.sh script computes this string by stripping the spaces from and then lowercasing the output of sw_vers -productName, which is indeed macOS on macOS 11 and later and Mac OS X on macOS 10.15 and earlier.

comment:4 Changed 8 months ago by bardeau

Hi everyone, I am about to propose a patch which solves this issue, but I am wondering if ${os.major} is the right variable to check:

set my_env_vers     [if {${os.major}<11} {list macosx} {list macos}]

Do you have any advice?

comment:5 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

On macOS, os.major is the major version of Darwin. On macOS 11, the major Darwin version is 20, not 11. (You can easily verify this by having the portfile output its value, e.g. by using ui_msg.)

comment:6 Changed 8 months ago by bardeau

I have just submitted a pull request, using sw_vers -productName to ensure full consistency between Gildas compilation and MacPorts installation.

comment:7 in reply to:  6 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Replying to bardeau:

I have just submitted a pull request

Namely https://github.com/macports/macports-ports/pull/23249

comment:8 Changed 8 months ago by bardeau

In 16760b429fa61c72a8da07cf16a6a49a24a798d0/macports-ports (master):

Gildas: fixed installation under macOS 10.15 and earlier

Fixes: ticket #69564

comment:9 Changed 8 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.