# fpm

**URL:** https://fortran-lang.discourse.group/c/help/fpm/18.md

[Latest](https://fortran-lang.discourse.group/latest.md) · [Categories](https://fortran-lang.discourse.group/categories.md)

---

## [About the fpm category](https://fortran-lang.discourse.group/t/about-the-fpm-category/4502)

<div class="topic-metadata">

**Author:** [@awvwgk](https://fortran-lang.discourse.group/u/awvwgk)\
**Replies:** 2\
**Last updated:** [August 20, 2025, 2:04pm UTC](https://fortran-lang.discourse.group/t/about-the-fpm-category/4502 "2025-08-20T14:04:18Z")

</div>

This section is for getting help with the Fortran package manager (fpm) Visit the documentation at https://fpm.fortran-lang.org.

---

## [How to build dependencies for test program with fpm](https://fortran-lang.discourse.group/t/how-to-build-dependencies-for-test-program-with-fpm/11058)

<div class="topic-metadata">

**Author:** [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Replies:** 2\
**Last updated:** [August 21, 2026, 6:04am UTC](https://fortran-lang.discourse.group/t/how-to-build-dependencies-for-test-program-with-fpm/11058 "2026-08-21T06:04:46Z")

</div>

I’m trying to add fpm support for the HOHQMesh and FTObjectLibrary programs I reference in a previous thread. I have some fpm questions about how to set up and compile test and example programs that have local dependenci…

---

## [Ading stdlib as a dependency in fpm caused demo build to fail](https://fortran-lang.discourse.group/t/ading-stdlib-as-a-dependency-in-fpm-caused-demo-build-to-fail/11055)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 1\
**Last updated:** [August 17, 2026, 10:52pm UTC](https://fortran-lang.discourse.group/t/ading-stdlib-as-a-dependency-in-fpm-caused-demo-build-to-fail/11055 "2026-08-17T22:52:19Z")

</div>

All I did was add stdlib as a dependency in fpm.toml and the example demo file failed to build and run. In fact, nothing builds successfully. Compilation reached 97% before failure: libstdlib.so …

---

## [Error building RootsFortran](https://fortran-lang.discourse.group/t/error-building-rootsfortran/10773)

<div class="topic-metadata">

**Author:** [@rgaelzer](https://fortran-lang.discourse.group/u/rgaelzer)\
**Replies:** 2\
**Last updated:** [March 10, 2026, 11:39pm UTC](https://fortran-lang.discourse.group/t/error-building-rootsfortran/10773 "2026-03-10T23:39:20Z")

</div>

I just downloaded the latest release (1.5.0) of RootsFortran from After uncompressing the master and running fpm build –profile release I got the error message: Initialized empty Git repository in /home/rudi/comp/f…

---

## [Nvfortran with fpm](https://fortran-lang.discourse.group/t/nvfortran-with-fpm/10771)

<div class="topic-metadata">

**Author:** [@ofmla](https://fortran-lang.discourse.group/u/ofmla)\
**Replies:** 2\
**Last updated:** [March 9, 2026, 4:07pm UTC](https://fortran-lang.discourse.group/t/nvfortran-with-fpm/10771 "2026-03-09T16:07:44Z")

</div>

Hi everyone, I’m trying to build a CUDA Fortran application using fpm (Fortran Package Manager), but I’m running into an error. Command I’m using: fpm build --compiler nvfortran --flag “-acc -Minfo=all -cuda” --V Err…

---

## [ Interest in GSoC project: External preprocessors support in fpm](https://fortran-lang.discourse.group/t/interest-in-gsoc-project-external-preprocessors-support-in-fpm/10732)

<div class="topic-metadata">

**Author:** [@Divya](https://fortran-lang.discourse.group/u/Divya)\
**Replies:** 0\
**Last updated:** [February 20, 2026, 2:25pm UTC](https://fortran-lang.discourse.group/t/interest-in-gsoc-project-external-preprocessors-support-in-fpm/10732 "2026-02-20T14:25:52Z")

</div>

Hello everyone, I am a student preparing for GSoC and I am interested in the project “Support of external third-party preprocessors in fpm”. I understand that the goal of this project is to integrate tools like fypp in…

---

## [MSYS2 fpm compilation](https://fortran-lang.discourse.group/t/msys2-fpm-compilation/10714)

<div class="topic-metadata">

**Author:** [@agisteg](https://fortran-lang.discourse.group/u/agisteg)\
**Replies:** 7\
**Last updated:** [February 18, 2026, 6:53am UTC](https://fortran-lang.discourse.group/t/msys2-fpm-compilation/10714 "2026-02-18T06:53:35Z")

</div>

Has anyone compiled a program using fpm in msys2? I can’t seem to get it to work. It fails at 0% completed or segfaults. Using the default hello world does not compile either. I think the version of fpm may be using mul…

---

## [Fpm repeatedly tries to fetch stdlib dependency on every run – possible rate limiting issue?](https://fortran-lang.discourse.group/t/fpm-repeatedly-tries-to-fetch-stdlib-dependency-on-every-run-possible-rate-limiting-issue/10715)

<div class="topic-metadata">

**Author:** [@14ngp](https://fortran-lang.discourse.group/u/14ngp)\
**Replies:** 2\
**Last updated:** [February 11, 2026, 11:49pm UTC](https://fortran-lang.discourse.group/t/fpm-repeatedly-tries-to-fetch-stdlib-dependency-on-every-run-possible-rate-limiting-issue/10715 "2026-02-11T23:49:24Z")

</div>

I’m using the new meta-packages feature in fpm together with stdlib. However, every time I run a previously compiled command (with identical arguments), fpm appears to attempt re-downloading stdlib from GitHub. I suspect…

---

## [Parallel fpm builds](https://fortran-lang.discourse.group/t/parallel-fpm-builds/10632)

<div class="topic-metadata">

**Author:** [@jeff.irwin](https://fortran-lang.discourse.group/u/jeff.irwin)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 12:35am UTC](https://fortran-lang.discourse.group/t/parallel-fpm-builds/10632 "2026-01-23T00:35:30Z")

</div>

Do the official binary releases of FPM have parallelism enabled? I was browsing the source when I saw this: @note If compiled with OpenMP, targets will be build in parallel where possible. I tried downloading the la…

---

## [New Contributor: Implemented 'fortran-standard' and 'minimal-version' in fpm](https://fortran-lang.discourse.group/t/new-contributor-implemented-fortran-standard-and-minimal-version-in-fpm/10585)

<div class="topic-metadata">

**Author:** [@Adityazzzz](https://fortran-lang.discourse.group/u/Adityazzzz)\
**Replies:** 3\
**Last updated:** [January 2, 2026, 1:25pm UTC](https://fortran-lang.discourse.group/t/new-contributor-implemented-fortran-standard-and-minimal-version-in-fpm/10585 "2026-01-02T13:25:13Z")

</div>

Hi everyone! :waving\_hand: My name is Aditya, and I’m a CS undergrad at IIIT Bhopal. I’ve recently been diving into the internal architecture of fpm to understand how modern build systems handle package manifests and co…

---

## [\[fpm\] can fpm be used to build a dynamic link library?](https://fortran-lang.discourse.group/t/fpm-can-fpm-be-used-to-build-a-dynamic-link-library/5722)

<div class="topic-metadata">

**Author:** [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Replies:** 28\
**Last updated:** [November 6, 2025, 4:07am UTC](https://fortran-lang.discourse.group/t/fpm-can-fpm-be-used-to-build-a-dynamic-link-library/5722 "2025-11-06T04:07:06Z")

</div>

Hi, I was just wondering if fpm could be used to build a dll/so as a library output? I have seen how to generate a static lib but haven’t seen in the manuals any info regarding dynamic libs. Today I manage to do it with…

---

## [How can I get fpm to default to local stdlib instead of git repo?](https://fortran-lang.discourse.group/t/how-can-i-get-fpm-to-default-to-local-stdlib-instead-of-git-repo/10459)

<div class="topic-metadata">

**Author:** [@WaveHello](https://fortran-lang.discourse.group/u/WaveHello)\
**Replies:** 0\
**Last updated:** [October 25, 2025, 3:41am UTC](https://fortran-lang.discourse.group/t/how-can-i-get-fpm-to-default-to-local-stdlib-instead-of-git-repo/10459 "2025-10-25T03:41:43Z")

</div>

Hello, I’m using fpm to build and run a project and want to be able to link against a local version of stdlib, but if the local version isn’t there, fall back to pulling it from the git repo, Is there a simple way to d…

---

## [Introducing FPM as a Guix Package](https://fortran-lang.discourse.group/t/introducing-fpm-as-a-guix-package/9858)

<div class="topic-metadata">

**Author:** [@moriglia](https://fortran-lang.discourse.group/u/moriglia)\
**Replies:** 1\
**Last updated:** [August 27, 2025, 9:06am UTC](https://fortran-lang.discourse.group/t/introducing-fpm-as-a-guix-package/9858 "2025-08-27T09:06:10Z")

</div>

While working on a project and running simulations on different machines, I found it convenient to have a clean shell environment by using Guix. I also thought that it would be convenient to include the Fortran Package M…

---

## [Cleaning build of test-related files](https://fortran-lang.discourse.group/t/cleaning-build-of-test-related-files/9662)

<div class="topic-metadata">

**Author:** [@alirezagh76](https://fortran-lang.discourse.group/u/alirezagh76)\
**Replies:** 4\
**Last updated:** [May 6, 2025, 8:58am UTC](https://fortran-lang.discourse.group/t/cleaning-build-of-test-related-files/9662 "2025-05-06T08:58:59Z")

</div>

Dear FPM developers Cleaning test-related build files can be helpful. Something like: fpm clean --test Can FPM do it currently? I modify test-related files to enforce rebuilding them. Best

---

## [Fpm link issue in conda environment](https://fortran-lang.discourse.group/t/fpm-link-issue-in-conda-environment/9491)

<div class="topic-metadata">

**Author:** [@icpup](https://fortran-lang.discourse.group/u/icpup)\
**Replies:** 6\
**Last updated:** [March 28, 2025, 2:57am UTC](https://fortran-lang.discourse.group/t/fpm-link-issue-in-conda-environment/9491 "2025-03-28T02:57:42Z")

</div>

I have a program need to link external library and module, so in fpm.toml I have: \[build\] link = “mylib” external-modules = “mymodule” and FPM\_LDFLAGS environment variable is defined as absolute path using options “-…

---

## [Add developer version number handling to fpm.toml](https://fortran-lang.discourse.group/t/add-developer-version-number-handling-to-fpm-toml/9465)

<div class="topic-metadata">

**Author:** [@Ahmed\_Elgayar](https://fortran-lang.discourse.group/u/Ahmed_Elgayar)\
**Replies:** 0\
**Last updated:** [March 24, 2025, 3:12pm UTC](https://fortran-lang.discourse.group/t/add-developer-version-number-handling-to-fpm-toml/9465 "2025-03-24T15:12:50Z")

</div>

Hello , Currently I am trying to think of a solution to this issue Add developer version number handling to \`fpm.toml\` · Issue #1101 · fortran-lang/fpm · GitHub , but now I do not understand how the version will change …

---

## [Problem with a source-dir list](https://fortran-lang.discourse.group/t/problem-with-a-source-dir-list/9375)

<div class="topic-metadata">

**Author:** [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Replies:** 3\
**Last updated:** [March 17, 2025, 1:19pm UTC](https://fortran-lang.discourse.group/t/problem-with-a-source-dir-list/9375 "2025-03-17T13:19:30Z")

</div>

According to the comments in the fpm.toml generated with the --full option, in the \[library\] section we can use a list of directories: # this can be a list: #source-dir=\["src", "src2"\] I tried in a new project. I ha…

---

## [Running on computer without fpm and other questions](https://fortran-lang.discourse.group/t/running-on-computer-without-fpm-and-other-questions/9097)

<div class="topic-metadata">

**Author:** [@Meromorphic](https://fortran-lang.discourse.group/u/Meromorphic)\
**Replies:** 22\
**Last updated:** [January 25, 2025, 6:16pm UTC](https://fortran-lang.discourse.group/t/running-on-computer-without-fpm-and-other-questions/9097 "2025-01-25T18:16:21Z")

</div>

Hello. As my largest Fortran codebase gets larger, my Makefile gets more complicated, so I was thinking of moving over to fpm before it gets too large to handle. I was able to get it to build the main simulation file pre…

---

## [Fpm MPI metapackage and mpi modules](https://fortran-lang.discourse.group/t/fpm-mpi-metapackage-and-mpi-modules/7122)

<div class="topic-metadata">

**Author:** [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Replies:** 17\
**Last updated:** [January 4, 2025, 9:05pm UTC](https://fortran-lang.discourse.group/t/fpm-mpi-metapackage-and-mpi-modules/7122 "2025-01-04T21:05:01Z")

</div>

I am in the process of writing some small tutorials for fpm-docs using MPI and I was surprised when I saw that fpm metapackages can only use mpif.h, which was deprecated in MPI-4.1. Is there a benefit of using mpif.h as…

---

## [Installing fpm-0.10.1](https://fortran-lang.discourse.group/t/installing-fpm-0-10-1/8268)

<div class="topic-metadata">

**Author:** [@ormo](https://fortran-lang.discourse.group/u/ormo)\
**Replies:** 23\
**Last updated:** [December 27, 2024, 9:19pm UTC](https://fortran-lang.discourse.group/t/installing-fpm-0-10-1/8268 "2024-12-27T21:19:21Z")

</div>

Installing previous fpm-versions raised no problems. Installing 0.10.1 does not succeed, using Linux-Fedora-40, which provides gcc-gfortran-14.1.1. This is what happens: ormo@rolls5:~/fpm-0.10.1$ ./install.sh % Total …

---

## [Error when using "fpm build"](https://fortran-lang.discourse.group/t/error-when-using-fpm-build/8872)

<div class="topic-metadata">

**Author:** [@igor-inoue.ufv](https://fortran-lang.discourse.group/u/igor-inoue.ufv)\
**Replies:** 10\
**Last updated:** [November 23, 2024, 9:42pm UTC](https://fortran-lang.discourse.group/t/error-when-using-fpm-build/8872 "2024-11-23T21:42:37Z")

</div>

I’m getting the following error when using “fpm build”: cmd\_build Package error: Key test is not allowed in install table The code was running without problems and all of a sudden this error showed up. One thing I did…

---

## ['lib' is not recognized as an internal or external command, operable program or batch file](https://fortran-lang.discourse.group/t/lib-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file/8661)

<div class="topic-metadata">

**Author:** [@r3isenfe1d](https://fortran-lang.discourse.group/u/r3isenfe1d)\
**Replies:** 4\
**Last updated:** [September 29, 2024, 5:29pm UTC](https://fortran-lang.discourse.group/t/lib-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file/8661 "2024-09-29T17:29:17Z")

</div>

Hello, everybody! I am trying to slide a simple program like “Hello, World!” using fpm run --compiler ifx but I get this error message 'lib' is not recognized as an internal or external command. What is lib and what is…

---

## [Trouble with fpm and a simple project](https://fortran-lang.discourse.group/t/trouble-with-fpm-and-a-simple-project/8603)

<div class="topic-metadata">

**Author:** [@gardhor](https://fortran-lang.discourse.group/u/gardhor)\
**Replies:** 2\
**Last updated:** [September 14, 2024, 2:09pm UTC](https://fortran-lang.discourse.group/t/trouble-with-fpm-and-a-simple-project/8603 "2024-09-14T14:09:34Z")

</div>

Hi All, I’m moving some of my code with a fpm installation. Most of them are fine. However, for one, I’ve encountered an unexpected problem. It is probably a stupid mistake from my side, but I cannot figure it out. The…

---

## [How to use intel compiler with fpm?](https://fortran-lang.discourse.group/t/how-to-use-intel-compiler-with-fpm/8406)

<div class="topic-metadata">

**Author:** [@Shahid](https://fortran-lang.discourse.group/u/Shahid)\
**Replies:** 28\
**Last updated:** [September 11, 2024, 3:07pm UTC](https://fortran-lang.discourse.group/t/how-to-use-intel-compiler-with-fpm/8406 "2024-09-11T15:07:53Z")

</div>

I have found some previous discussions on this Is it possible to specify the compiler in the fpm.toml? - Help / fpm - Fortran Discourse (fortran-lang.discourse.group) I still do not understand the steps to use fpm with…

---

## [How to set a path in a Fortran file for a library (dependency) with fpm](https://fortran-lang.discourse.group/t/how-to-set-a-path-in-a-fortran-file-for-a-library-dependency-with-fpm/8557)

<div class="topic-metadata">

**Author:** [@gardhor](https://fortran-lang.discourse.group/u/gardhor)\
**Replies:** 0\
**Last updated:** [September 3, 2024, 7:17pm UTC](https://fortran-lang.discourse.group/t/how-to-set-a-path-in-a-fortran-file-for-a-library-dependency-with-fpm/8557 "2024-09-03T19:17:52Z")

</div>

I want to use fpm with a complex program/library structure and I have an issue setting up a path in a fpm library (dependency) with a cpp.macros. In some libraries, I need an internal directory to store some data to be …

---

## [FPM: Preprocessing into multiple files (real32 and real64)](https://fortran-lang.discourse.group/t/fpm-preprocessing-into-multiple-files-real32-and-real64/8483)

<div class="topic-metadata">

**Author:** [@andrew.lister](https://fortran-lang.discourse.group/u/andrew.lister)\
**Replies:** 10\
**Last updated:** [August 16, 2024, 5:03pm UTC](https://fortran-lang.discourse.group/t/fpm-preprocessing-into-multiple-files-real32-and-real64/8483 "2024-08-16T17:03:08Z")

</div>

Hi, I’m wondering if there’s any support for using a preprocessor to generate different versions of a file which are all expected to be compiled into a single library. In meson I would use compiler.preprocess. E.g. I h…

---

## [A couple of newbie FPM questions](https://fortran-lang.discourse.group/t/a-couple-of-newbie-fpm-questions/8485)

<div class="topic-metadata">

**Author:** [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Replies:** 4\
**Last updated:** [August 16, 2024, 1:49am UTC](https://fortran-lang.discourse.group/t/a-couple-of-newbie-fpm-questions/8485 "2024-08-16T01:49:42Z")

</div>

I’m trying to set up an FPM build for something I’m been working on for a couple of months. I’m currently using Makefiles and they are mostly bullet proof. However there are a couple of things I’ve encountered with FPM t…

---

## [Fpm issue with preprocessor-defined use statements](https://fortran-lang.discourse.group/t/fpm-issue-with-preprocessor-defined-use-statements/8371)

<div class="topic-metadata">

**Author:** [@nedanator](https://fortran-lang.discourse.group/u/nedanator)\
**Replies:** 7\
**Last updated:** [July 22, 2024, 3:26pm UTC](https://fortran-lang.discourse.group/t/fpm-issue-with-preprocessor-defined-use-statements/8371 "2024-07-22T15:26:15Z")

</div>

Hi all. I am trying to set up something like the following (which works fine in cmake makefiles) using fpm. Depending on the preprocessor flag/macro, I want different modules to be imported in the Fortran code. My main…

---

## [Can't install fortran project on Github Action](https://fortran-lang.discourse.group/t/cant-install-fortran-project-on-github-action/8366)

<div class="topic-metadata">

**Author:** [@Diegoolei](https://fortran-lang.discourse.group/u/Diegoolei)\
**Replies:** 4\
**Last updated:** [July 19, 2024, 7:49pm UTC](https://fortran-lang.discourse.group/t/cant-install-fortran-project-on-github-action/8366 "2024-07-19T19:49:50Z")

</div>

Error while trying to execute “fpm install” command. “fpm build” compiles correctly. + mkdir -p /home/runner/work/Fortran77-Cloud-Model/Fortran77-Cloud-Model/build/python/lib # Update: build/gfortran\_C084E46…

---

## [Exporting subroutine symbol in library from fpm](https://fortran-lang.discourse.group/t/exporting-subroutine-symbol-in-library-from-fpm/8321)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 11\
**Last updated:** [July 9, 2024, 6:28pm UTC](https://fortran-lang.discourse.group/t/exporting-subroutine-symbol-in-library-from-fpm/8321 "2024-07-09T18:28:35Z")

</div>

Do you have to do something special to export a subroutine as a symbol in the library created by fpm? For example, just running fpm build on the scaffolded project from fpm new test\_lib\_symbol and looking at the symbols…

[Next page](https://fortran-lang.discourse.group/c/help/fpm/18.md?page=1)
