Opened 4 years ago

Closed 2 years ago

#61860 closed defect (fixed)

octave: enable arm64 build

Reported by: kencu (Ken) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 Cc: Schamschula (Marius Schamschula), jsalort (Julien Salort)
Port: octave

Description

arm64 versions of octave exist on several unix variants

the portfile currently only considers Intel and powerpc archs. arm64 arch considerations will have to be added, and then a suitable target generated.

and then we can see what else might need to be done to make it build.

Attachments (1)

main.log (5.6 MB) - added by jsalort (Julien Salort) 3 years ago.

Change History (8)

comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

comment:2 Changed 4 years ago by Schamschula (Marius Schamschula)

Indeed: At the tip of the iceberg, configure fails, because it's looking in the wrong place for libfortran

configure:13431: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/libexec/qt5/lib -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 conftest.c -lm  -L/opt/local/lib/gccdevel -lgfortran -lm >&5
ld: warning: directory not found for option '-L/opt/local/lib/gccdevel'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)

gcc-devel installs its libs in /opt/local/lib/libgcc/

Changed 3 years ago by jsalort (Julien Salort)

Attachment: main.log added

comment:3 Changed 3 years ago by jsalort (Julien Salort)

It builds fine on Monterey here, with the +openblas -sundials variant to circumvent vecLibFort not compiling (#63717) and sundials also not compiling. However, it fails to stage destroot. Apparently, it does not find libgfortran.5.dylib. I do have this file on /opt/local/lib/libgcc, but I don't know how to fix it.

% port version
Version: 2.7.1

% uname -a
Darwin shikahr-1.home 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64

% sudo port install octave +openblas -sundials
Password:
--->  Computing dependencies for octave
--->  Fetching archive for octave
--->  Attempting to fetch octave-6.4.0_1+app+docs+gfortran+graphicsmagick+openblas+qt5+sound.darwin_21.arm64.tbz2 from https://packages.macports.org/octave
--->  Attempting to fetch octave-6.4.0_1+app+docs+gfortran+graphicsmagick+openblas+qt5+sound.darwin_21.arm64.tbz2 from https://nue.de.packages.macports.org/octave
--->  Attempting to fetch octave-6.4.0_1+app+docs+gfortran+graphicsmagick+openblas+qt5+sound.darwin_21.arm64.tbz2 from https://fra.de.packages.macports.org/octave
--->  Fetching distfiles for octave
--->  Verifying checksums for octave
--->  Extracting octave
--->  Applying patches to octave
--->  Configuring octave
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  MIN: found in octave-6.4.0/config.log
--->  Building octave
--->  Staging octave into destroot                       
Error: Failed to destroot octave: command execution failed

Attached above is the main.log.

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 3 years ago by jsalort (Julien Salort)

Cc: jsalort added

comment:5 Changed 3 years ago by jsalort (Julien Salort)

Following up, actually the reason it did not work is because it compiles and links with /usr/bin/clang. Octave compiles fine with +openblas +gcc11 -sundials. However, the graphics don't work for some reason that I haven't figured out. Also, I have added

if { ${os.arch} eq "arm" } {
    set short_host_name aarch64-apple-${os.platform}${os.major}.x.x
}

in post-patch. I don't submit a PR, because there are still issues to be resolved (sundials, and the graphics).

comment:6 in reply to:  2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

There is a PR now at: https://github.com/macports/macports-ports/pull/13862

Replying to Schamschula:

gcc-devel installs its libs in /opt/local/lib/libgcc/

Presumably this is caused by this line in the portfile:

if {${gccdir} eq "gccdevel"} {set gccdir gcc-devel}

comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)

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