Page 1 of 1

configure: error: Fortran compiler cannot create executables

Posted: Fri May 31, 2024 5:06 pm
by safakelif
Hi all,

I encountered an error about Fortran compiler while trying to install eSASS and have followed all the steps here: https://erosita.mpe.mpg.de/edr/DataAnal ... stall.html .

HeSOFT is already installed, gfortran is also installed and all environments are defined. I have tried several solutions suggested in some forums, but the problem is not solved. Is there anyone who has encountered this before?

the step is: ./configure --with-healpix=/home/software/eSASS4DR1/external/Healpix_3.50 --with-headas=$HEADAS

and the error I encountered:

checking whether the Fortran compiler works... no
configure: error: in `/home/software/eSASS4DR1/eSASS/autoconf':
configure: error: Fortran compiler cannot create executables

Re: configure: error: Fortran compiler cannot create executables

Posted: Mon Jun 03, 2024 8:59 am
by AlainGueguen
Hi,
This type of error can have many origins.
To help you, we would need more details :
Like:
- which type of operating system are you running (Linux, which one; Mac, which one, which type of CPU?)
- which compiler are you using? (default one, personally installed )
- did you initialise some environment variables to point to this compiler?

could you send us the exact sequence of commands you typed (after the compilation if healpix)
could you send us an extract of the file autoconf/config.log :
The critical section to understand this problem starts with the line:
"configure:****: checking for Fortran compiler version "
Regards
Alain, on behalf of the eSASS team

Re: configure: error: Fortran compiler cannot create executables

Posted: Mon Jun 10, 2024 1:25 pm
by safakelif
Hi,

Thank you for your feedback. I'm using Ubuntu 24.04 LTS and GCC. The environments defined in bashrc are:

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export FC=/usr/bin/gfortranexport
export PERL=/usr/bin/perl
export PYTHON=/usr/bin/python3
export F77=/usr/bin/gfortran
export HEADAS=/software/heasoft-6.33.2/x86_64-pc-linux-gnu-libc2.39

Apart from these, I did not export any environments during the installation. The installation steps are as follows:

1: I downloaded the script eSASS4EDRmirror.sh

2:./eSASS4EDRmirror.sh eSASS
./eSASS4EDRmirror.sh CALDB

3:./unpack_edr.sh eSASS4EDR sw_edr

4: Then, I ran configure inside the external/Healpix_3.50 directory by selecting the options recommended in "2.2 Building eSASS on x86_64 Linux: GNU autoconf build" section.

5:Then, inside eSASS4EDR/autoconf directory:

./configure --with-healpix=/<esaspath>/external/Healpix_3.50 --with-headas=$HEADAS

And this task produced the configure error. Here is the inside of the config.log file:

configure:3117: $? = 127
configure:3132: checking whether the Fortran compiler works
configure:3154: /usr/bin/gfortranexport conftest.f >&5
./configure: line 3156: /usr/bin/gfortranexport: No such file or directory
configure:3158: $? = 127
configure:3196: result: no
configure: failed program was:
| program main
|
| end
configure:3201: error: in `/home/software/eSASS/eSASS4EDR/autoconf':
configure:3203: error: Fortran compiler cannot create executables
See `config.log' for more details

Yes, there is no "gfortranexport" inside /usr/bin. How can I install/create it?

Re: configure: error: Fortran compiler cannot create executables

Posted: Tue Jun 11, 2024 7:50 am
by AlainGueguen
Hi,
I don't know why the FC environment variable is defined like that :
export FC=/usr/bin/gfortranexport
But on Linux Ubuntu the Fortran compiler is /usr/bin/gfortran
this line should look like
export FC=/usr/bin/gfortran
please try to change your bashrc to this value. start a new terminal and retry the installation.
Regards
Alain on behalf of the eSASS team


PS: I am surprised you could compile heasoft and healpix with this environment variable definition.

Re: configure: error: Fortran compiler cannot create executables

Posted: Wed Jun 12, 2024 11:41 am
by AlainGueguen
Hi,
I just realized that the link you are using to install eSASS is the one from the Early Data Release (EDR)
I encountered an error about Fortran compiler while trying to install eSASS and have followed all the steps here: https://erosita.mpe.mpg.de/edr/DataAnal ... stall.html
If you try to install eSASS from Data Release 1 (DR1), you should look at the new pages dedicated to DR1, which were updated and completed.
https://erosita.mpe.mpg.de/dr1
and more specifically, the ones about the eSASS installation and its section 3.3 installation :
https://erosita.mpe.mpg.de/dr1/eSASS4DR ... stallation

On this page, you'll find a block with the variable to set up for the installation.

Regards

Re: configure: error: Fortran compiler cannot create executables

Posted: Mon Jul 22, 2024 3:27 pm
by safakelif
Hi,

Thank you very much for your help! eSASS is now successfully installed.

Best.