[cmake-developers] Incomplete gfortran library link command sometimes mysteriously occurs with MinGW/MSYS on Wine-1.5.15 platform

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Oct 23 15:57:25 EDT 2012

Here is the current status of the hunt for the solution of this issue.
In sum, the subject line should be changed to "Incomplete gfortran
library link command always issued for downloaded Microsoft version of
CMake but not for a bootstrapped version of CMake for MinGW/MSYS on

My original concerns about CMake generating bad Fortran link commands
on a Windows platform involved results from two closely related
software projects, ephcom and te_gen. An older version of ephcom
tested well on Linux and CMake/MinGW/MSYS/Wine last year, and the
latest version tests well on Linux currently. te_gen is recently
resurrected (last released in 1999) Fortran software that strongly
depends on ephcom and which tests well on Linux currently, but which
had never been tested on Windows (CMake/MinGW/MSYS/Wine) before.

Both te_gen and ephcom demonstrated that the downloaded Windows binary
version of CMake-2.8.9 issued incorrect Fortran library linking
commands while a version of CMake-2.8.9 that had been bootstrap-built
on MinGW/MSYS/Wine issued the correct Fortran library linking
commands. David and Bill are currently looking at a scripted build of
ephcom to see whether they can replicate the issue on a Microsoft
version of Windows.  I have also given them detailed results from the
good link and bad link build trees to help them figure out what is
wrong with the downloaded Windows binary version of CMake-2.8.9.

With the bootstrapped CMake-2.8.9, I got good test results for the
current ephcom for MinGW corresponding to 4.5.2 and Wine-1.5.15.
However, te_gen had run-time errors.  Those were unlikely to be
anything to do with the CMake bad generated link issue, but you never
know, so I have been working hard on fixing those te_gen run-time
issues in the last several day, and I just had complete success there.
It turned out that MinGW has peculiarities in the way it handles
Fortran common blocks, and the errors from that had being magnified by
bugs (leading to segfaults and stackdumps) in the ephcom and te_gen
error reporting system.  I solved both issues by the appropriate
ephcom and te_gen code changes, and the result is te_gen gave a good
test result on MinGW/MSYS/Wine for the first time this morning!  That
result is identical to the same test run on Linux other than the
expected difference in floating-point noise between the two results.
So I am very happy at the moment, and I think these tests are a strong
indication that there is nothing obviously wrong with the CMake-2.8.9
source code or the bootstrap build of that source code on

However, the bad generated Fortran link issue with the downloaded
binary Windows version of CMake-2.8.9 is still a concern.  In an ideal
world that should be producing the same good link commands for Fortran
that the bootstrapped version does.  If David and Bill cannot
replicate the problem on Microsoft Windows or figure out what is going
on from all the detailed build-tree results I gave them for the bad
link and good link cases, I would be willing to do any additional
experiments here they request to help see what is going wrong with the
downloaded binary Windows version of CMake on Wine.

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).

Linux-powered Science

More information about the cmake-developers mailing list