Can you call fpm from bash script?

I wanted to link the building of an fpm package with some bash scripts I have but I am facing a problem I cannot comprehend but it is easy to reproduce.

If I create a new package:

$ fpm new test_package

I enter the folder and create a bash script “” that inside is very simple, it only has:

fpm build

and then I try to simply execute it via


it returns an error I cannot understand:

<ERROR>*cmd_build*:package error:Key fortran is not allowed in package file

In my personal project the error is similar, if I try fpm build I get

<ERROR>*cmd_build*:package error:Dependency stdlib must be a table entry

but stdlib is listed in my fpm.toml file under dependencies and indeed if I run fpm build from my terminal it works fine.

Am i missing something?

What version of fpm are you using? The “fortran” key was added in a relatively recent release. So you might have to update your fpm version.

1 Like

I was using 0.9.0, moving to 0.10.0 indeed solved the problem, thank you very much!