Troubleshooting Installation

Possible compilation issues with GCC/GFortran >= 10

This is already fixed in recent ProDiMo versions, but in case one wants to compile an old ProDiMo version this might be relevant.

From [https://gcc.gnu.org/gcc-10/porting_to.html]

Argument mismatches

GCC 10 now rejects argument mismatches occurring in the same source file. Those are not permitted by the Fortran standard and, in general, have the potential to generate invalid code. However, the Fortran standard does permit passing an array element or a scalar string (of default character kind or of c_char kind) as an actual argument to an array dummy argument. (For the exact wording, see the Fortran standard on argument association; in particular, Fortran 2018, Sect. 15.5.2.4, Para. 4.)

If short-term fixing of those issues is not feasible, the compiler flag -fallow-argument-mismatch (implied by -std=legacy) downgrades the error to a warning.

If you are using GFortran 10 and above please ensure that the flag is set in the Makefile to allow the compilation of the many legacy code that is used by ProDiMo.

Problems with cfitsio

If ProDiMo compilation has issues with cfitsio, one can:

  • try to get the latest cfistio (on Mac via homebrew or macports for example, or download the source and compile it)
  • the cfitsio library is called libcfitsio.a but for some compilation Flag (static code), libcfitsio.10.dylib and/or libcfitsio.dylib may be needed. Check that those files are also present in the same path than libcfitsio.a. Those files are created when one compiles cfitsio by her/himself.
  • the makefile.gfortran script points to the /usr/local/lib/libcfitsio.a file. Check that the file is the one that you updated! Otherwise, either change the path to the actual most recent file (Brew put the packages in /usr/local/Cellar/.../...) or move the most recent file to /usr/local/lib/ (not the best solution).

likely outdated problems (e.g. for old MAC os X versions etc. )

  • 09/03/2023 This is likely outdated for example, one can use --disable-curl in the configure call (type ./configure -help to see all the options). And the packages from homebrew or macports seem to work fine).

  • (19/04/2018 WFT) On Mac Os, one can remove the architecture flag

    CFLAGS =        -g -O2 -arch i386 -arch x86_64 -Dg77Fortran -fPIC -fno-common
    to
    CFLAGS =        -g -O2 -Dg77Fortran -fPIC -fno-common
  • (12/04/2018 WFT) On Mac Sierra with Xcode 9.2, you may encounter the following problem at the end of the compilation:

    Undefined symbols for architecture x86_64:
    "_curl_easy_cleanup", referenced from:
        _https_open_network in libcfitsio.a(drvrnet.o)
    "_curl_easy_init", referenced from:
        _https_open_network in libcfitsio.a(drvrnet.o)
    "_curl_easy_perform", referenced from:
        _https_open_network in libcfitsio.a(drvrnet.o)
    "_curl_easy_setopt", referenced from:
        _https_open_network in libcfitsio.a(drvrnet.o)
    "_curl_global_cleanup", referenced from:
        _ffchtps in libcfitsio.a(cfileio.o)
    "_curl_global_init", referenced from:
        _ffihtps in libcfitsio.a(cfileio.o)
    "_omp_get_thread_num_", referenced from:
        _formal_solution_ in formal_solution.o
    ld: symbol(s) not found for architecture x86_64
    collect2: error: ld returned 1 exit status

    This is caused by the new Xcode. Since we do not need access to fits files via the web, please follow the instructions download cfitsio (see at the top)

    in the Makefile for cfitsio (after running ./configure) remove DCFITSIO_HAVE_CURL=1. Then at the prompt:

    make
    make install
    cd lib
    nm -a libcfitsio.a | grep “curl”

    If you see

                    U _curl_global_cleanup
                    U _curl_global_init
    0000000000000000 t _find_curlybracket
    00000000000009a0 t _curlToMemCallback
                    U _curl_easy_cleanup
                    U _curl_easy_init

    You need to go where cfitsio source directory {make clean} remove DCFITSIO_HAVE_CURL=1 and recompile again

    make
    make install

Makefile/Compilation issues

  • Solved in recent example makefiles: When you make prodimo, the following message can appear (depending on the OS and make version):
make: m2c: No such file or directory

There is a default rule treating mod files as Modula files. One can disable this rule by adding this following line followed by a blank line to your Makefile if the line is not present:

%.o : %.mod

outdated git version

If you get a compilation error like this:

make
Generate version.f90 ...
fatal: unknown date format format:%Y/%m/%d
version.f90 has changed
...
...

write_MCFOST.f90:827.42:
 call ftpkys(unit,'prodimo',trim(revision),'',status)
                     1
Error: Symbol 'revision' at (1) has no IMPLICIT type
make: *** [write_MCFOST.o] Erreur 1

Your git version is likely too old. See Checkout the Code for the required git version.

outdated cfitsio package

If you get a compilation error like this:

write_FLiTs.o: In function `write_flits_':
~/prodimo/src_develop/write_FLiTs.f90:406: undefined reference to `ftpprdll_'
collect2: error: ld returned 1 exit status
make: *** [prodimo] Error 1

towards the end. You most likely have a too-old version of cfitsio (see []).

MAC OS X update

In some cases, after a Mac OS upgrade (for example Big Sur to Sonoma) the system path may need to be placed explicitly in the login file as well (only do this if you run into problems):

export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib"