Help installing fpm

I have tried 5 times to install fpm in Windows - twice via Miniconda, twice via Anaconda3 and one via windows installer.

The program seemed to install properly in all cases. (However I find running programs from a terminal like going back to the “dark ages”)
When I try “First_Steps” fpm fails to find the build folder - which does exist.
2 log files showing the errors are

app_main.f90.o.log

f951.exe: Warning: Nonexistent include directory 'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
f951.exe: Warning: Nonexistent include directory 'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
app\main.f90:2:7:
    2 |   use first_steps, only: say_hello
      |       1
Fatal Error: Cannot open module file 'first_steps.mod' for reading at (1): No such file or directory
compilation terminated.

src_first_steps.f90.o.log
f951.exe: Warning: Nonexistent include directory 'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
f951.exe: Warning: Nonexistent include directory 'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]

Any help would be appreciated

2 Likes

Hi @ddunn1943, welcome to the forum!

Could you let us know what version of Windows you are using?

Can you also post the terminal output for running the command fpm build --verbose in your first_steps project.

Thanks for your help

I am using Windows 10 and gfortran 12.0.1

The output from “fpm build --verbose” is

Microsoft Windows [Version 10.0.19044.1766]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd \

C:\>cd fortran-lang

C:\fortran-lang>cd first_steps

C:\fortran-lang\first_steps>fpm build --verbose
<INFO> BUILD_NAME: build\gfortran
<INFO> COMPILER: gfortran
<INFO> C COMPILER: gcc
<INFO> COMPILER OPTIONS: -Wall -Wextra -Wimplicit-interface -fPIC
-fmax-errors=1 -g -fcheck=bounds -fcheck=array-temps -fbacktrace
-fcoarray=single
<INFO> C COMPILER OPTIONS:
<INFO> LINKER OPTIONS:
<INFO> INCLUDE DIRECTORIES: []
[ 0%] main.f90
+ gfortran -c app\main.f90 -Wall -Wextra -Wimplicit-interface -fPIC
-fmax-errors=1 -g -fcheck=bounds -fcheck=array-temps -fbacktrace
-fcoarray=single -J build\gfortran_2A42023B310FA28D
-Ibuild\gfortran_2A42023B310FA28D -o
build\gfortran_2A42023B310FA28D\first_steps\app_main.f90.o
f951.exe: Warning: Nonexistent include directory
'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
f951.exe: Warning: Nonexistent include directory
'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
app\main.f90:2:7:

2 | use first_steps, only: say_hello
> 1
Fatal Error: Cannot open module file 'first_steps.mod' for reading at (1): No
such file or directory
compilation terminated.
[ 50%] main.f90 done.

f951.exe: Warning: Nonexistent include directory
'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
f951.exe: Warning: Nonexistent include directory
'build\gfortran_2A42023B310FA28D/' [-Wmissing-include-dirs]
app\main.f90:2:7:

2 | use first_steps, only: say_hello
> 1
Fatal Error: Cannot open module file 'first_steps.mod' for reading at (1): No
such file or directory
compilation terminated.
<ERROR> Compilation failed for object " app_main.f90.o "
<ERROR>stopping due to failed compilation
STOP 1

C:\fortran-lang\first_steps>

Dennis

Welcome to software development :wink: With perhaps the exception of C# and Java I’m not aware of any reasonably popular programming language which does not rely on terminal based tooling. You’ll be expected to use a terminal whether you’re coding in C++, Python, JavaScript, Julia, Rust, or our “own” Fortran.

The default Windows terminal experience is miserable though. I’d recommend using either the integrated terminal in a modern text editor like VSCode or Windows Terminal for a way better experience. If you have previous experience with *nix systems you might be more efficient using Git for Windows as well, which will give you a minimal bash shell but on Windows (MSYS). Bash from Git for Windows works flawlessly in both the VSCode integrated terminal and Windows Terminal.

3 Likes

I find this answer a bit strange but maybe it is just me. I have not used a terminal since the late 90’s. I use Visual Studio with all the various incarnations of Dec / Compaq / Intel (Visual) Fortran, exclusively on Windows, '98, NT, XP … Win10. All my programs have icons to double click to start and use Windows interfaces for inputs and outputs.

I do notice it seems very few Windows users post on this discourse but in my opinion they are the majority of Fortran users. Where I come from the Linux users are a very small fringe minority. I do not really feel welcome here but maybe just my imagination. Also, I am an engineer not a programmer.

I will stay brief in an effort to not derail the original post’s topic, and maybe we can carry this over in another thread.

You can certainly use Fortran (and many other programming languages) purely from an IDE, there are however certain tasks that are much simpler when using a terminal (my opinion at least).

I don’t think that the majority of Fortran users are on Windows, especially since Fortran is one of the goto languages for High Performance Computing which are almost exclusively Linux-based OSs. However, and that is the main reason I replied, you using OS A vs the majority of users using OS B does not matter to this community. All Fortran users are welcome! :slightly_smiling_face:

3 Likes

There’s absolutely nothing wrong with using Windows. I use Windows a lot myself and I develop software targeting Windows because that’s what our users mainly use. @gnikit is right in that for HPC the main OS in Linux, but a lot of engineering software need to work on Windows because a lot of engineers find themselves on corporate computers with Windows installed. Fortran is used both for HPC and engineering software so both OS-es are highly relevant on this discourse.

Even on Windows many tools which is considered best practice for that language is command line based. For example is you want to use external packages in you projects you’ll typically interact with CLI tools like fpm (Fortran), pip, virtualenv, and/or pipenv (Python), cargo (Rust) and npm (Javascript) depending on your language(s) of choice.

Back to @ddunn1943’s original question I just tried the same commands on my Windows machine and it worked fine for me with fpm version 0.6.0. I’m a bit lost, but here are some suggestions that could be worth checking:

  • Has fpm actually created the folder build\gfortran_2A42023B310FA28D? If it doesn’t exists, maybe check the file and folder permissions to se if this somehow has become messed up and you don’t have write access.
  • What version of gfortran are you using? For me, gfortran --version says 10.3.0.
  • Are you able to compile when not using the module? I.e. change app\main to something like the example below and then run fpm run.
program main
    implicit none
    write(*,*) 'Hello world'
end program
2 Likes

Thanks Dennis @ddunn1943. I am also unable to reproduce this issue on my Windows machine currently. To add to the above suggestions, could you also check that the src subfolder exists in the first_steps project directory and that it contains a first_steps.f90 source file?

Thanks for your interest.

I started using Fortran in 1966 on IBM. Access to the compiler was via punched cards.

Terminal access to mainframe computers stated, I think, in late 1970s or early 1980s. I used these for several years to remotely access Cray and Control Data mainframes in the University of London Computer Centre. They did use the Unix operating system - and a bash shell if I remenber correctly. I don’t welcome repeating this experience.

I did, of course, in that era use terminal access to the local university (Reading) servers. I even wrote my own (very crude) terminal, via Visual C. to control a Millimeter Wave Scanner that we (Reading University Physics) designed and built for NASA.

However I have successfully avoided direct use of terminal/command prompt access to Fortran (and very occasionally C) compilers for at least 25 years (apart from recent attempts to use fpm!). I have always managed access via an Editor or IDE.

At the moment I mainly use gfortran 12.0.1 via Eclipse (which has a nice refactoring facility) or ConText editor. I also occasionaly use an old Intel compiler via Visual Studio (because it’s fast) and an old Salford Fortran95 compiler via Plato IDE because it has built-in graphics extensions.

I am amazed that, in spite of the very great progress in programming languages, there are, apparently, a large number of people who are quite happy to use command line access to compilers in a way that I would have been completely familiar with in the 1980s.

4 Likes

Brilliant!

I agree entirely – I’m a theoretical physicist.

Dennis

I am using gfortran 12.0.1.

I have been using gfortran for many years (with a variety of versions) and have had no problem compiling and running programs.

The build directory was created and the object file for first_stops.f90 was there but no object file for main.f90.

Dennis

How about first_steps.mod, is it present in the build folder? I see that fpm use a combination of \ and / in the path on Windows. One possibility (though unlikely?) is that the newer gfortran version is confused by this. If so I would expect the command

gfortran.exe -Jbuild/gfortran_2A42023B310FA28D/ -Ibuild/gfortran_2A42023B310FA28D/ -c src/first_steps.f90 -o build/gfortran_2A42023B310FA28D/first_steps/src_first_steps.f90.o

to succeed with no warnings, but

gfortran.exe -Jbuild\gfortran_2A42023B310FA28D/ -Ibuild\gfortran_2A42023B310FA28D/ -c src/first_steps.f90 -o build/gfortran_2A42023B310FA28D/first_steps/src_first_steps.f90.o

might produce the warnings you got about nonexistent include directory.

I am amazed that, in spite of the very great progress in programming languages, there are, apparently, a large number of people who are quite happy to use command line access to compilers in a way that I would have been completely familiar with in the 1980s.

I would argue that the terminals of today are far more efficient and interactive than their 1980s counterparts. I have to admit though I’ve never experienced a real terminal from the 1980s as my own endeavors did not start before the 1990s :sweat_smile:

1 Like

I learned programming on 8 bits in the 80’s, typing Basic commands was compulsory, then was excited by Windows and graphical interfaces in the 90’s, then turned back to terminal and Linux in the late 2000’s.

I see no difference between a programming language and typing commands in a terminal. The shell is just another programming language: commands, variables, loops, tests, functions… with original mechanisms like substitutions… Scaring at first, but so powerful and even elegant once you have understood those mechanisms. You have the feeling to access more directly to the OS functionalities, acting with more precision, and you can program your OS with scripts. More efforts at first, but more pleasure…

2 Likes

I have found a solution to my problem.

If I change the name of the program in main.f90 to anything but main

eg

program anything_but_main
use first_steps, only: say_hello
implicit none

call say_hello()
end program anything_but_main

then it works.

Is there some problem within fpm which causes an error if the filename and progran name are the same?

Dennis

Definitely something was changed recently… When trying to build gtk-fortran under MSYS2/Windows 10, I now also get a lot of warnings (which finally lead to the failure of the build):

f951.exe: Warning: Nonexistent include directory 'modules/' [-Wmissing-include-dirs]

although that directory does exist.

The software versions are:

  • Windows 10 21H2
  • MINGW64_NT-10.0-19044 3.3.5-341.x86_64
  • cmake version 3.23.2
  • GNU Make 4.3
  • GFortran 12.1.0

Did you use vscode and the Modern Fortran plugin? I seem to have encountered this situation before, when I corrected the Modern Fortran linter path and the problem was resolved.

No, I am just using cmake and make in the MINGW64 terminal.

I also use the same environment as you, Win10-MSYS2-ucrt64 and gfortran-12.1, I run cmake-3.23.2 in powershell to compile gtk-fortran, and I did not encounter the problem you said, but it seems that you have introduced a -Imodules/ option here, which leads to compilation warning.

Details
gtk-fortran on  HEAD (2dbd82e) via △ v3.23.2 
❯ cmake -B build -G "MSYS Makefiles"
-- The Fortran compiler identification is GNU 12.1.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: C:/msys64/ucrt64/bin/gfortran.exe - skipped
-- Building gtk-4-fortran 4.2.1
-- Based on GTK 4.6.2 and GLib 2.72.1
-- GNUInstallDirs: C:/Program Files (x86)/gtk-fortran lib include bin share share/man
-- System: Windows 10.0.19044 AMD64
-- Compiler: GNU 12.1.0 C:/msys64/ucrt64/bin/gfortran.exe
-- Build type is: release
-- Compilation flags:  -pthread -O3 -mtune=native -march=native
-- Found PkgConfig: C:/msys64/ucrt64/bin/pkg-config.exe (found version "1.8.0") 
-- Checking for module 'gtk4'
--   Found gtk4, version 4.6.6
-- Checking for module 'plplot-fortran'
--   Found plplot-fortran, version 5.15.0
-- Checking for module 'plplot'
--   Found plplot, version 5.15.0
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/zoziha/com.zoziha/fortran/experiment/gtk-demo/build/dependencies/gtk-fortran/build

gtk-fortran on  HEAD (2dbd82e) via △ v3.23.2 took 6s 
❯ cd build

gtk-fortran\build on  HEAD (2dbd82e) via △ v3.23.2 
❯ make -j4 
[  [0 % ]1 %B]u ilt Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/cairo-auto.f90.objta
rget manpage
[  1%] Built target pkgconfig
[  1%] Built target usemodules
[  2%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gdk-auto.f90.obj
[  2%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/glib-auto.f90.obj
[  3%] Generating plplot_extra.mod
[  4%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gdkevents-auto.f90.obj
[  5%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/graphene-auto.f90.obj
[  5%] Built target plplot_extra_module
[  6%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gsk-auto.f90.obj
[  7%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/pango-auto.f90.obj
[  8%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk.f90.obj
[  9%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-sup.f90.obj
[ 10%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-assistant.f90.obj
[ 11%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gdk-pixbuf-hl.f90.obj
[ 12%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-draw-hl.f90.obj
[ 13%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-misc.f90.obj
[ 14%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-container.f90.obj
[ 15%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-entry.f90.obj
[ 16%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-combobox.f90.obj
[ 17%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-dialog.f90.obj
[ 18%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-infobar.f90.obj
[ 19%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-progress.f90.obj
[ 20%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-spin-slider.f90.obj
[ 21%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-tree.f90.obj
[ 22%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-button.f90.obj
[ 22%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl-chooser.f90.obj
[ 22%] Building Fortran object src/CMakeFiles/gtk-fortran_object.dir/gtk-hl.f90.obj
[ 24%] Built target gtk-fortran_object
[ 25%] Linking Fortran static library libgtk-4-fortran.a
[ 25%] Linking Fortran shared library libgtk-4-fortran.dll
[ 25%] Built target gtk-fortran_shared
[ 25%] Built target gtk-fortran_static
Scanning dependencies of target gtk-4-fortran
Scanning dependencies of target gtkhello
Scanning dependencies of target gtkzero_gapp
Scanning dependencies of target list_demo
[ 26%] Building Fortran object src/CMakeFiles/gtk-4-fortran.dir/gtk-fortran.out.f90.obj
[ 27%] Building Fortran object examples/CMakeFiles/gtkhello.dir/gtkhello.f90.obj
[ 27%] Building Fortran object examples/CMakeFiles/gtkzero_gapp.dir/gtkzero_gapp.f90.obj
[ 28%] Building Fortran object examples/CMakeFiles/list_demo.dir/list_demo.f90.obj
[ 29%] Linking Fortran executable gtkzero_gapp.exe
[ 30%] Linking Fortran executable gtkhello.exe
[ 31%] Linking Fortran executable list_demo.exe
[ 32%] Linking Fortran executable gtk-4-fortran.exe
[ 32%] Built target gtkzero_gapp
[ 32%] Built target gtkhello
[ 32%] Built target list_demo
[ 32%] Built target gtk-4-fortran
Scanning dependencies of target gio_demo
Scanning dependencies of target tests
Scanning dependencies of target tests_gtk_sup
Scanning dependencies of target notebooks
[ 33%] Building Fortran object examples/CMakeFiles/gio_demo.dir/gio_demo.f90.obj
[ 34%] Building Fortran object examples/CMakeFiles/tests.dir/tests.f90.obj
[ 35%] Building Fortran object examples/CMakeFiles/tests_gtk_sup.dir/tests_gtk_sup.f90.obj
[ 36%] Building Fortran object examples/CMakeFiles/notebooks.dir/notebooks.f90.obj
[ 37%] Linking Fortran executable gio_demo.exe
[ 38%] Linking Fortran executable tests_gtk_sup.exe
[ 39%] Linking Fortran executable tests.exe
[ 40%] Linking Fortran executable notebooks.exe
[ 40%] Built target gio_demo
Scanning dependencies of target julia_pixbuf
[ 40%] Built target tests_gtk_sup
[ 41%] Building Fortran object examples/CMakeFiles/julia_pixbuf.dir/julia_pixbuf.f90.obj
[ 41%] Built target tests
Scanning dependencies of target mandelbrot_pixbuf
Scanning dependencies of target mandelbrot_pixbuf_zoom
[ 42%] Building Fortran object examples/CMakeFiles/mandelbrot_pixbuf.dir/mandelbrot_pixbuf.f90.obj
[ 42%] Built target notebooks
[ 43%] Building Fortran object examples/CMakeFiles/mandelbrot_pixbuf_zoom.dir/mandelbrot_pixbuf_zoom.f90.obj
Scanning dependencies of target menubar
[ 44%] Building Fortran object examples/CMakeFiles/menubar.dir/menubar.f90.obj
[ 45%] Linking Fortran executable julia_pixbuf.exe
[ 45%] Linking Fortran executable mandelbrot_pixbuf.exe
[ 46%] Linking Fortran executable menubar.exe
[ 47%] Linking Fortran executable mandelbrot_pixbuf_zoom.exe
[ 47%] Built target julia_pixbuf
[ 47%] Built target mandelbrot_pixbuf
Scanning dependencies of target cairo-tests
Scanning dependencies of target cairo-basics
[ 47%] Built target menubar
[ 47%] Built target mandelbrot_pixbuf_zoom
[ 48%] Building Fortran object examples/CMakeFiles/cairo-tests.dir/cairo-tests.f90.obj
[ 49%] Building Fortran object examples/CMakeFiles/cairo-basics.dir/cairo-basics.f90.obj
Scanning dependencies of target cairo-basics-click
Scanning dependencies of target bazaar
[ 50%] Building Fortran object examples/CMakeFiles/cairo-basics-click.dir/cairo-basics-click.f90.obj
[ 50%] Building Fortran object examples/CMakeFiles/bazaar.dir/bazaar.f90.obj
[ 51%] Linking Fortran executable cairo-basics.exe
[ 51%] Linking Fortran executable cairo-tests.exe
[ 52%] Linking Fortran executable cairo-basics-click.exe
[ 53%] Linking Fortran executable bazaar.exe
[ 53%] Built target cairo-basics
[ 53%] Built target cairo-tests
Scanning dependencies of target pixbuf_without_gui
Scanning dependencies of target regex
[ 53%] Built target cairo-basics-click
[ 54%] Building Fortran object examples/CMakeFiles/pixbuf_without_gui.dir/pixbuf_without_gui.f90.obj
[ 55%] Building Fortran object examples/CMakeFiles/regex.dir/regex.f90.obj
Scanning dependencies of target hl_assistant
[ 56%] Building Fortran object examples/CMakeFiles/hl_assistant.dir/hl_assistant.f90.obj
[ 56%] Linking Fortran executable pixbuf_without_gui.exe
[ 56%] Built target bazaar
[ 57%] Linking Fortran executable regex.exe
Scanning dependencies of target hl_choosers
[ 58%] Building Fortran object examples/CMakeFiles/hl_choosers.dir/hl_choosers.f90.obj
[ 59%] Linking Fortran executable hl_assistant.exe
[ 59%] Built target pixbuf_without_gui
[ 59%] Built target regex
Scanning dependencies of target hl_combo
Scanning dependencies of target hl_containers
[ 60%] Building Fortran object examples/CMakeFiles/hl_combo.dir/hl_combo.f90.obj
[ 61%] Building Fortran object examples/CMakeFiles/hl_containers.dir/hl_containers.f90.obj
[ 62%] Linking Fortran executable hl_choosers.exe
[ 62%] Built target hl_assistant
Scanning dependencies of target hl_dialog
[ 63%] Linking Fortran executable hl_combo.exe
[ 64%] Building Fortran object examples/CMakeFiles/hl_dialog.dir/hl_dialog.f90.obj
[ 64%] Linking Fortran executable hl_containers.exe
[ 64%] Built target hl_choosers
[ 65%] Linking Fortran executable hl_dialog.exe
Scanning dependencies of target hl_list1
[ 65%] Built target hl_combo
[ 65%] Built target hl_containers
[ 66%] Building Fortran object examples/CMakeFiles/hl_list1.dir/hl_list1.f90.obj
Scanning dependencies of target hl_list_n
Scanning dependencies of target hl_list_renderers
[ 67%] Building Fortran object examples/CMakeFiles/hl_list_n.dir/hl_list_n.f90.obj
[ 67%] Built target hl_dialog
[ 68%] Building Fortran object examples/CMakeFiles/hl_list_renderers.dir/hl_list_renderers.f90.obj
Scanning dependencies of target hl_pbar
[ 69%] Building Fortran object examples/CMakeFiles/hl_pbar.dir/hl_pbar.f90.obj
[ 70%] Linking Fortran executable hl_list1.exe
[ 70%] Linking Fortran executable hl_list_n.exe
[ 71%] Linking Fortran executable hl_list_renderers.exe
[ 72%] Linking Fortran executable hl_pbar.exe
[ 72%] Built target hl_list1
Scanning dependencies of target hl_sliders
[ 72%] Built target hl_list_n
[ 73%] Building Fortran object examples/CMakeFiles/hl_sliders.dir/hl_sliders.f90.obj
[ 73%] Built target hl_pbar
Scanning dependencies of target hl_sliders2
[ 73%] Built target hl_list_renderers
Scanning dependencies of target hl_textview
Scanning dependencies of target hl_tree
[ 74%] Building Fortran object examples/CMakeFiles/hl_sliders2.dir/hl_sliders2.f90.obj
[ 75%] Building Fortran object examples/CMakeFiles/hl_textview.dir/hl_textview.f90.obj
[ 75%] Building Fortran object examples/CMakeFiles/hl_tree.dir/hl_tree.f90.obj
[ 76%] Linking Fortran executable hl_sliders.exe
[ 77%] Linking Fortran executable hl_sliders2.exe
[ 78%] Linking Fortran executable hl_textview.exe
[ 79%] Linking Fortran executable hl_tree.exe
[ 79%] Built target hl_sliders
Scanning dependencies of target hl_cairo1
[ 79%] Built target hl_sliders2
[ 80%] Building Fortran object examples/CMakeFiles/hl_cairo1.dir/hl_cairo1.f90.obj
Scanning dependencies of target hl_cairo_clock
[ 80%] Built target hl_textview
[ 80%] Built target hl_tree
[ 81%] Building Fortran object examples/CMakeFiles/hl_cairo_clock.dir/hl_cairo_clock.f90.obj
Scanning dependencies of target hl_cairo_viewer
Scanning dependencies of target hl_infobar
[ 82%] Building Fortran object examples/CMakeFiles/hl_cairo_viewer.dir/hl_cairo_viewer.f90.obj
[ 83%] Building Fortran object examples/CMakeFiles/hl_infobar.dir/hl_infobar.f90.obj
[ 84%] Linking Fortran executable hl_cairo1.exe
[ 84%] Linking Fortran executable hl_cairo_clock.exe
[ 85%] Linking Fortran executable hl_infobar.exe
[ 86%] Linking Fortran executable hl_cairo_viewer.exe
[ 86%] Built target hl_cairo1
Scanning dependencies of target gtkbuilder2
[ 87%] Building Fortran object examples/CMakeFiles/gtkbuilder2.dir/gtkbuilder2.f90.obj
[ 87%] Built target hl_cairo_clock
Scanning dependencies of target gtkf-sketcher
[ 87%] Built target hl_infobar
[ 88%] Building Fortran object sketcher/CMakeFiles/gtkf-sketcher.dir/gtkf-sketcher.out.f90.obj
[ 88%] Built target hl_cairo_viewer
Scanning dependencies of target hl_plplot8e
Scanning dependencies of target hl_plplot17e
[ 88%] Building Fortran object plplot/CMakeFiles/hl_plplot8e.dir/hl_plplot8e.f90.obj
[ 89%] Building Fortran object plplot/CMakeFiles/hl_plplot17e.dir/hl_plplot17e.f90.obj
[ 90%] Linking Fortran executable gtkbuilder2.exe
[ 90%] Built target gtkbuilder2
[ 91%] Linking Fortran executable hl_plplot17e.exe
Scanning dependencies of target hl_plplot17e_gto
[ 92%] Linking Fortran executable hl_plplot8e.exe
[ 92%] Building Fortran object plplot/CMakeFiles/hl_plplot17e_gto.dir/hl_plplot17e_gto.f90.obj
[ 93%] Linking Fortran executable gtkf-sketcher.exe
[ 93%] Built target hl_plplot17e
[ 93%] Built target hl_plplot8e
[ 93%] Built target gtkf-sketcher
Scanning dependencies of target hl_plplot30e
Scanning dependencies of target hl_plplot1e
[ 94%] Linking Fortran executable hl_plplot17e_gto.exe
Scanning dependencies of target hl_plplot4e
[ 95%] Building Fortran object plplot/CMakeFiles/hl_plplot30e.dir/hl_plplot30e.f90.obj
[ 96%] Building Fortran object plplot/CMakeFiles/hl_plplot1e.dir/hl_plplot1e.f90.obj
[ 97%] Building Fortran object plplot/CMakeFiles/hl_plplot4e.dir/hl_plplot4e.f90.obj
[ 97%] Built target hl_plplot17e_gto
[ 98%] Linking Fortran executable hl_plplot30e.exe
[ 99%] Linking Fortran executable hl_plplot1e.exe
[100%] Linking Fortran executable hl_plplot4e.exe
[100%] Built target hl_plplot30e
[100%] Built target hl_plplot1e
[100%] Built target hl_plplot4e
1 Like

I discovered my problem was a compiler fault. I was using gfortran 12.1.0 (experimental) from Equation.com. When I changed to 13.0.0 (experimental) or version 10.3.0 the problems dissappeared.

I should say I had used the original compiler with no problems but I had only tried my “normal” compiler options

%f -std=f2018 -fcoarray=single -fopenmp -mtune=core2 -o%F.exe -O3 -funroll-loops

where %f is the program name supplied by the editor. fpm uses many more compiler options.

Dennis

I dicovered my problem was with the compiler – gfortan 12.1.0 (experimental) from Equation.com. When I tried version 13.0.0 (experimental) and version 10.3.0 both worked.

Try swapping your compiler!

Dennis