fortran-lang/stdlib

fpm build failure in gamma functions when real128 is unsupported (-1)

osada-yum opened this issue · 0 comments

Description

fpm build fails in stdlib_specialfunctions_gamma.f90 when gfortran is built without quadmath.

Console

(...) denotes unnecessary lines:

 $ wget https://github.com/fortran-lang/stdlib/archive/refs/tags/v0.7.0.tar.gz
 $ tar xvf v0.7.0.tar.gz
 $ cd stdlib-0.7.0
 $  python3 config/fypp_deployment.py
 $ LANG=C fpm build --compiler="/usr/local/gcc-noquad-13.2.0/bin/gfortran-noquad-13.2.0" --flag="-mlong-double-64" --verbose
 + mkdir -p build/dependencies
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
Initialized empty Git repository in /tmp/test/stdlib-0.7.0/build/dependencies/test-drive/.git/
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 31 (delta 5), reused 8 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (31/31), 31.43 KiB | 1.50 MiB/s, done.
From https://github.com/fortran-lang/test-drive
 * tag               v0.4.0     -> FETCH_HEAD
 <INFO> BUILD_NAME: build/gfortran-noquad-13.2.0
 <INFO> COMPILER:  /usr/local/gcc-noquad-13.2.0/bin/gfortran-noquad-13.2.0
 <INFO> C COMPILER:  gcc
 <INFO> CXX COMPILER: g++
 <INFO> COMPILER OPTIONS:  -cpp -mlong-double-64
 <INFO> C COMPILER OPTIONS:
 <INFO> CXX COMPILER OPTIONS:
 <INFO> LINKER OPTIONS:
 <INFO> INCLUDE DIRECTORIES:  [././include]
 + mkdir -p build/gfortran-noquad-13.2.0_54AE7E52DB7857DB
 + mkdir -p build/gfortran-noquad-13.2.0_B980C017134ED536
 + mkdir -p build/gfortran-noquad-13.2.0_8A636263EE09C0F1

(...)

[ 15%] stdlib_specialfunctions_gamma.
 + /usr/local/gcc-noquad-13.2.0/bin/gfortran-noquad-13.2.0 -c ././src/temp/stdlib_specialfunctions_gamma.f90  -cpp -mlong-double-64 -fimplicit-none -Werror=implicit-interface -ffree-form -DMAXRANK=7 -I././include -J build/gfortran-noquad-13.2.0_B980C017134ED536 -Ibuild/gfortran-noquad-13.2.0_B980C017134ED536 -o build/gfortran-noquad-13.2.0_B980C017134ED536/stdlib/src_temp_stdlib_specialfunctions_gamma.f90.o
././src/temp/stdlib_specialfunctions_gamma.f90:16:12:

   16 |     real(qp), parameter :: tol_qp = epsilon(1.0_qp)
      |            1
Error: Kind -1 not supported for type REAL at (1)
././src/temp/stdlib_specialfunctions_gamma.f90:383:16:

  383 |         real(qp), parameter :: zero = 0.0_qp, half = 0.5_qp,             &
      |                1
Error: Kind -1 not supported for type REAL at (1)
././src/temp/stdlib_specialfunctions_gamma.f90:385:19:

  385 |         complex(qp) :: y, x, sum
      |                   1
Error: Kind -1 not supported for type COMPLEX at (1)
././src/temp/stdlib_specialfunctions_gamma.f90:389:16:

(...)

f951: some warnings being treated as errors
<ERROR> Compilation failed for object " src_temp_stdlib_specialfunctions_gamma.f90.o "
<ERROR> stopping due to failed compilation
STOP 1

Compiler

gfortran-13.2.0 built with

 $ ./configure --prefix=/usr/local/gcc-noquad-13.2.0 --program-suffix=-noquad-13.2.0 --enable-languages=fortran --disable-bootstrap --disable-multilib --disable-libquadmath --disable-libquadmath-support --host=x86_64-pc-linux-gnu
 $ make
 $ sudo make install

Architecture and compilers

CPU: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz

 $ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy
 $ LANG=C /usr/local/gcc-noquad-13.2.0/bin/gcc-noquad-13.2.0 -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-noquad-13.2.0/bin/gcc-noquad-13.2.0
COLLECT_LTO_WRAPPER=/usr/local/gcc-noquad-13.2.0/libexec/gcc/x86_64-pc-linux-gnu/13.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-noquad-13.2.0 --program-suffix=-noquad-13.2.0 --enable-languages=fortran --disable-bootstrap --disable-multilib --disable-libquadmath --disable-libquadmath-support --host=x86_64-pc-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (GCC)
 $ fypp --version
fypp 3.2
 $ fpm -v
Version:     0.10.1, alpha
Program:     fpm(1)
Description: A Fortran package manager and build system
Home Page:   https://github.com/fortran-lang/fpm
License:     MIT
OS Type:     Linux
 $ python3 --version
Python 3.10.12

Expected Behaviour

The qp should be optional in stdlib/src/stdlib_specialfunctions_gamma.fypp.

    use iso_fortran_env, only : qp => real128

Version of stdlib

6d9d7fd

Platform and Architecture

Ubuntu 22.04.5 LTS, x86_64, CPU: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz

Additional Information

No response