Opened 2 years ago

Closed 2 years ago

#66104 closed defect (fixed)

octave-control broken under arm64

Reported by: Schamschula (Marius Schamschula) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: octave-control

Description

When building octave-control on an arm64 machine I get the following failure:

cd sltmp; /usr/bin/arch -arch arm64 /opt/local/bin/mkoctfile-7.2.0 --verbose -w -c MA02ID.f; rm MA02ID.f; /usr/bin/arch -arch arm64 /opt/local/bin/mkoctfile-7.2.0 --verbose -c *.f;
/opt/local/bin/gfortran-mp-12 -c -fPIC -pipe -Os -m32 -m64     -w MA02ID.f -o MA02ID.o
gfortran-mp-12: error: unrecognized command-line option '-m32'
/opt/local/bin/gfortran-mp-12 -c -fPIC -pipe -Os -m32 -m64     AB01MD.f -o AB01MD.o
gfortran-mp-12: error: unrecognized command-line option '-m32'
make: *** [slicotlibrary.a] Error 1

I have not been able to figure out where -m32 comes from. mkoctfile does provide

mkoctfile -p FFLAGS
-pipe -Os -m64 -std=legacy

Change History (2)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

MacPorts is setting it in the environment:

FFLAGS='-pipe -Os -m32 -m64'

https://build.macports.org/builders/ports-11_arm64-builder/builds/69062/steps/install-port/logs/stdio

It's coming from the octave portgroup which says:

        # fortran arch flag is not set automatically
        if {${configure.build_arch} eq "x86_64" || ${configure.build_arch} eq "ppc64"} {
            configure.fflags-append -m64
        } else {
            configure.fflags-append -m32
        }

The 64-bit case needs to have arm64 added to it, like this:

        if {${configure.build_arch} in [list arm64 ppc64 x86_64]} {

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

Resolution: fixed
Status: assignedclosed

In 1e805f752160619533987bc0b9f0e6665a1b6d0e/macports-ports (master):

octave-1.0.tcl: Fix configure.fflags on arm64

Closes: #66104

Note: See TracTickets for help on using tickets.