Skip to content

v0.8.x fails to build projects that could be built with v.7.0 #956

Open
@HugoMVale

Description

@HugoMVale

Description

Projects like this one can be built with v.07.2, but not with 0.8.x. I can't say if this problem has been fixed in v.0.9.0 because this version is not yet available in MSYS2.

I am uncertain about the origin of the problem, but the error message suggests that fpm is adding flags -fimplicit-none -Werror=implicit-interface -ffree-form -J in a untransparent manner.

In the example below, I've added the flag -O just to bypass the default profile and be able to see which other flags were being added.

The build fails equally with fpm build.

(fortran) C:\Code\test-odepack\odepack>fpm --version
Version:     0.8.2, alpha
Program:     fpm(1)
Description: A Fortran package manager and build system
Home Page:   https://github.com/fortran-lang/fpm
License:     MIT
OS Type:     Windows

(fortran) C:\Code\test-odepack\odepack>gfortran --version
GNU Fortran (Rev7, Built by MSYS2 project) 13.1.0
Copyright (C) 2023 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.


(fortran) C:\Code\test-odepack\odepack>fpm build -flag "-O" --verbose
 <INFO> BUILD_NAME: build\gfortran
 <INFO> COMPILER:  gfortran
 <INFO> C COMPILER:  gcc
 <INFO> CXX COMPILER: g++
 <INFO> COMPILER OPTIONS:   -O
 <INFO> C COMPILER OPTIONS:
 <INFO> CXX COMPILER OPTIONS:
 <INFO> LINKER OPTIONS:
 <INFO> INCLUDE DIRECTORIES:  []
 + mkdir build\gfortran_1B7CBBF3E0F91C7C
 + mkdir build\gfortran_E46CF8C2C866941E
[  0%]             odepack_common.f90
 + mkdir build\gfortran_E46CF8C2C866941E\odepack\
[  0%]                        dcopy.f
 + gfortran -c .\.\src\odepack_common.f90   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_odepack_common.f90.o
[  0%]                       dgbtf2.f
 + gfortran -c .\.\src\lapack\dcopy.f   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_lapack_dcopy.f.o
 + gfortran -c .\.\src\lapack\dgbtf2.f   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_lapack_dgbtf2.f.o
[  0%]                 odepack_sub2.f
 + gfortran -c .\.\src\odepack_sub2.f   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_odepack_sub2.f.o
[  0%]                       dgbtrs.f
 + gfortran -c .\.\src\lapack\dgbtrs.f   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_lapack_dgbtrs.f.o
[  0%]                       dgbtrf.f
 + gfortran -c .\.\src\lapack\dgbtrf.f   -O -fimplicit-none -Werror=implicit-interface -ffree-form -J build\gfortran_E46CF8C2C866941E -Ibuild\gfortran_E46CF8C2C866941E -o build\gfortran_E46CF8C2C866941E\odepack\src_lapack_dgbtrf.f.o
.\.\src\odepack_sub2.f:1:2:

.\.\src\lapack\dgbtf2.f:1:2:
    1 | *DECK XERRWD

      |  1
    1 | *> \brief \b DGBTF2 computes the LU factorization of a general band matrix using the unblocked version of the algorithm.
Error: Invalid character in name at (1)
      |  1

Expected Behaviour

  • It should build as previous versions.
  • It should not add flags "behind the back".

Version of fpm

v0.8.x

Platform and Architecture

Windows

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions