I’m currently involved in the
http-client project, which allows Fortran programmers to make HTTP requests. The project relies on the
stdlib library as a dependency.
Recently, I encountered an issue while using
http-client as a dependency in a new fpm project. When attempting to build the project with
fpm build, I encountered the following error:
$ fpm build <ERROR> *cmd_build* Target error: Unable to find the source for the module dependency: "stdlib_optval," which is used by "build/dependencies/http/src/http/http_client.f90" STOP 1
http as a dependency in the
fpm.toml file like this:
[dependencies] http.git = "https://github.com/fortran-lang/http-client.git"
It seems that the error was related to the
stdlib. To fix the problem, I added
stdlib="*" to the
fpm.toml file of the new project, and now the project builds successfully:
[dependencies] http.git = "https://github.com/fortran-lang/http-client.git" stdlib = "*"
This addition of
stdlib="*" allows the new project to utilize the necessary
stdlib features and resolve the build issue.