Skip to content

stdlib build error with fpm (macOS Apple Silicon) #527

Closed
@wiremoons

Description

@wiremoons

Description

Hi

I have attempted to build and install stdlib using fpm build --profile release but get the following error message:

 + mkdir -p build/dependencies
 + mkdir -p build/gfortran_5F75F7C92365B9B9/stdlib
 + gfortran -c ././src/stdlib_kinds.f90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/src_stdlib_kinds.f90.o
 + gfortran -c ././src/stdlib_system.F90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/src_stdlib_system.F90.o
 + gfortran -c test/test_sleep.f90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/test_test_sleep.f90.o
 + gfortran -c ././src/stdlib_ascii.f90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/src_stdlib_ascii.f90.o
 + gfortran -c ././src/stdlib_bitsets.f90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/src_stdlib_bitsets.f90.o
 + gfortran -c ././src/stdlib_optval.f90 -O3 -Wimplicit-interface -fPIC -fmax-errors=1 -funroll-loops -fcoarray=single -J build/gfortran_5F75F7C92365B9B9/stdlib -I build/gfortran_5F75F7C92365B9B9/stdlib  -o build/gfortran_5F75F7C92365B9B9/stdlib/src_stdlib_optval.f90.o
././src/stdlib_optval.f90:70:12:

   70 |     real(qp), intent(in), optional :: x
      |            1
Error: Kind -1 not supported for type REAL at (1)
compilation terminated due to -fmax-errors=1.
 <ERROR> Compilation failed for object "src_stdlib_optval.f90.o"
STOP 1

Versions being used:

% fpm -v
Version:     0.3.0, alpha
Program:     fpm(1)
Description: A Fortran package manager and build system
Home Page:   https://github.com/fortran-lang/fpm
License:     MIT
OS Type:     macOS

% gfortran --version
GNU Fortran (Homebrew GCC 11.2.0) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% sw_vers
ProductName:	macOS
ProductVersion:	11.6
BuildVersion:	20G165

Steps used to build:

git clone https://github.com/fortran-lang/stdlib
cd stdlib
git checkout stdlib-fpm
fpm build --profile release

I am running on a new Apple computer using Apple Silicon M1 CPU - which maybe the cause? I have run into other build errors previously to do with REAL issues - so it maybe the same problem?

For reference in case it helps: urbanjost/M_strings#2

Thanks for any help / advice!

Simon

Expected Behaviour

That stdlib builds OK using fpm using gfortran on macOS arm64.

Version of stdlib

Current version obtained using the steps document above.

Platform and Architecture

macOS (arm64) Apple Silicon M1 Big Sur version 11.6

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler: gfortranSpecific to GCC Fortran compilerplatform: MacOSBuild issues specific to the MacOS platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions