Skip to content

Build errors with flang #990

Closed
Closed
@ivan-pi

Description

@ivan-pi

Description

When building with a recent version of flang (installed using brew), I get the following error:

$ cmake .. -G Ninja -DCMAKE_Fortran_COMPILER=flang -DCMAKE_Fortran_FLAGS="-O3 -march=native" -DCMAKE_C_COMPILER=clang
...
$ ninja -j 8
...

error: Semantic errors in src/CMakeFiles/fortran_stdlib.dir/stdlib_error.f90-pp.f90
/code/rbfx-new/standalone/batched-assembly/stdlib/build/src/stdlib_error.f90:245:14: error: Left-hand side of assignment is not definable
               ierr_out = ierr
               ^^^^^^^^
/code/rbfx-new/standalone/batched-assembly/stdlib/build/src/stdlib_error.f90:245:14: because: 'ierr_out' is polymorphic in a pure subprogram
               ierr_out = ierr
               ^^^^^^^^
/code/rbfx-new/standalone/batched-assembly/stdlib/build/src/stdlib_error.f90:239:56: Declaration of 'ierr_out'
           class(state_type), optional, intent(inout) :: ierr_out
                                                         ^^^^^^^^

Expected Behaviour

Build should succeed.

Version of stdlib

c14d599

Platform and Architecture

MacOS (Aarch64)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuild: cmakeIssue with stdlib's CMake build filescompiler: flangSpecific to classic flang 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