Skip to content

Compilation fail as meta-package. #1065

@MilanSkocic

Description

@MilanSkocic

Description

By default STDLIB_BITSET is defined to 1 in include/macros.in implying that the stdlib_bitset is used.
However, the compilation fails:

build/dependencies/stdlib/src/stdlib_math.F90:6:9:

    6 |     use stdlib_bitsets, only: bitset_64, bitset_large
      |         1
Fatal Error: Cannot open module file ‘stdlib_bitsets.mod’ for reading at (1): No such file or directory
compilation terminated.
<ERROR> Compilation failed for object " build_dependencies_stdlib_src_stdlib_math.F90.o "
<ERROR> stopping due to failed compilation
STOP 1

The issue is located in lines 8-10 in stdlib_math.F90

#if STDLIB_BITSET == 1
    use stdlib_bitsets, only: bitset_64, bitset_large
#endif

stdlib_bitsets.f90 is in the src folder and it looks like it was not compiled before stdlib_math.F90.

Expected Behaviour

stdlib_bitsets.f90 gets compiled before stdlib_math.f90 and no compilation failure when STDLIB_BITSET is defined to 1.

Version of stdlib

72ad5fb

Platform and Architecture

Linux (Debian 13)

Additional Information

WORKAROUND: Add in fpm.toml

[preprocess]
[preprocess.cpp]
suffixes = [".F90", ".f90"]
macros = ["MAXRANK=7", "STDLIB_NO_BITSET"]

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