[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
Thu Oct 25 18:06:03 EDT 2012


On 2012-10-25 13:37-0600 Clinton Stimpson wrote:

> Alan,
>
> I've been watching this somewhat.  If this gets narrowed down enough to a
> relatively simple example, I could try it out myself too.
> I didn't see the example attached to this email thread, so maybe someone can
> send me the example.

Hi Clint:

I am glad you are watching this thread.

I have just discovered an extremely simple test case of the whole
problem which I have attached.  I missed this previously in the heat
of the moment, but the really simple "hello world" test case I
referred to at the start of this thread "that always worked" did so
because I was using the bootstrapped CMake in that case.  It continues
to work now for the bootstrapped case, but fails with the bad fortran
link command for the downloaded CMake case.

The really simple test case consists of a Fortran library that prints
out "Hello World" and a main routine that calls it.

I have included in the tar ball the complete build trees for the good
(bootstrapped CMake) and bad (downloaded CMake) test cases that I
generated here.  So you will likely want to unpack the tarball twice,
once to an area to preserve my results for comparison with yours and
once to an area where you want to generate your own results.

The first step is to tailor the set_msys_test_fortran.wine_sh
so that all paths point to the correct area on your system.
Be particularly careful with TEST_FORTRAN_BUILD_PATH since
one of the commands in the bash script
build_msys_test_fortran.wine_sh (see below) is

rm -rf $TEST_FORTRAN_BUILD_PATH/*

That bash script does have one safety check to test whether
$TEST_FORTRAN_BUILD_PATH is empty, but if you set
TEST_FORTRAN_BUILD_PATH to a wrong PATH, the script will remove
everything under that PATH so be careful out there! Also if you have
bash script suggestions for making that rm -rf command safer, please
let me know.

After tailoring set_msys_test_fortran.wine_sh, run this as follows under bash.exe for Windows (or Wine):

# Set up all PATHS.
bash.exe-3.1$ . set_msys_test_fortran.wine_sh
# Attempt the build the simple example using bash
bash.exe-3.1$ bash build_msys_test_fortran.wine_sh

If you tailor set_msys_test_fortran.wine_sh to point to downloaded
CMake, the simple Fortran test build fails on Wine-1.5.15 with
MinGW-4.7.0 and the latest MSYS.  However, if you tailor
set_msys_test_fortran.wine_sh to point to CMake that is
bootstrap-built on that platform, the simple Fortran test build
succeeds on that platform.

Alan
__________________________
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