0

I am trying to build EXCiT!NG with the g95 compiler. It seams to work until this errors appear:

checking for linker flag to name executables... configure: error: Could not determine flag to name executables
See `config.log' for more details.
../Make.common:107: die Regel für Ziel „lib/libFoX_common.a“ scheiterte
make[2]: *** [lib/libFoX_common.a] Fehler 1
make[2]: Verzeichnis „/home/robin/Dokumente/exciting/build/serial“ wird verlassen
Makefile:3: die Regel für Ziel „all“ scheiterte
make[1]: *** [all] Fehler 2
make[1]: Verzeichnis „/home/robin/Dokumente/exciting/build/serial“ wird verlassen
Makefile:14: die Regel für Ziel „serial“ scheiterte
make: *** [serial] Fehler 2
  • Please check I linked the correct project. Please also note that g95 has been unmaintained for a long time and is not well supported by build script makers and programmers of Fortran projects in general. – Vladimir F Героям слава Jan 09 '19 at 17:08
  • The information we need to help you is likely, as the output states, in the file `config.log`. – francescalus Jan 09 '19 at 17:14
  • I have the same problem with gfortran: – Robin Owelov Jan 10 '19 at 11:48
  • xsltproc ../../xml/schema/schemaexpand.xsl ../../xml/schema/input.xsd > ../../xml/excitinginput.xsd /bin/sh: 1: xsltproc: not found ../Make.common:148: die Regel für Ziel „../../xml/excitinginput.xsd“ scheiterte make[2]: *** [../../xml/excitinginput.xsd] Fehler 127 make[2]: Verzeichnis „/home/robin/Dokumente/exciting/build/serial“ wird verlassen Makefile:3: die Regel für Ziel „all“ scheiterte make[1]: *** [all] Fehler 2 make[1]: Verzeichnis „/home/robin/Dokumente/exciting/build/serial“ wird verlassen Makefile:23: die Regel für Ziel „serial“ scheiterte make: *** [serial] Fehler 2 – Robin Owelov Jan 10 '19 at 11:49
  • I tried it with two different compilers (g95 and gfortran) and two versions of exciting. It it doesn't compile properly. – Robin Owelov Jan 10 '19 at 12:06

1 Answers1

1

I was able to reproduce the problem you have been seeing and was able to successfully compile EXCiT!NG. The big hint was in your comment which mentioned the xsltproc error. Note that the error message says: xsltproc: not found, which means that the command itself is missing and the relevant package needs to be installed; also, one has to be careful to ensure the project is completely "clean" before trying to recompile again.

The following procedure was carried out on a Debian (stretch) system, hence you will need to replace the package installation commands with the appropriate ones for your system.

Prerequisite installation

First, ensure that the required packages exist:

sudo apt install build-essential make gfortran xsltproc git

The build-essential package is required so that the standard C-compilers and libraries are available. make is necessary in order to build the package (as mentioned in the EXCiT!NG README), and it seems that only gfortran is available on Debian systems and hence I haven't tested the setup with g95. The xsltproc package provides the xsltproc command so that the XML libraries (FoX XML) can be compiled; note that this might have been the problem in the error you mention initially, because you got error output such as:

../Make.common:107: die Regel für Ziel „lib/libFoX_common.a“ scheiterte

The git package is required so that the source code could be checked out from GitHub.

Cloning and building the project

After cloning the source code and entering the project directory

git clone git@github.com:exciting/exciting.git
cd exciting/

It was merely a matter of running

make

and selecting the gfortran option at the menu and then to answer "no" to the questions about MPI and SMP, which seemed to be the recommended default answer. Also, I noticed that your error output mentioned the "serial" make target

Makefile:14: die Regel für Ziel „serial“ scheiterte

hence I assume that these are also the settings that you are using.

After that, make completed successfully. Running the test suite via

make test

unfortunately didn't pass, however the errors seem to be due to truncated lines, e.g.

Error: Line truncated at (1) [-Werror=line-truncation]
../../src/src_eigensystem/hmlint.f90:296:132: haaij(if1,if3,ias)=zsum+t1*apwfr(nrmt(is),1,io1,l1,ias)*apwdfr(io2,l1,ias)*1d0/(1d0-veffmt(1,nrmt(is),ias)*y00*a)

which might be a gfortran problem, however it's difficult to say. It could be the case that the software does work as expected; this is something you will have to test by comparing the program's output with a known DFT system.

Reduce potential errors with a clean project directory

Note that cleaning the project after a failed build with

make clean

and rebuilding didn't seem to want to build the project successfully. I had to revert to deleting the project completely and re-cloning from GitHub.

ptc
  • 71
  • 4
  • The truncation error means that the code is written with longer lines than the Fortran standard permts and needs a special flag to allow longer lines. – Vladimir F Героям слава Jan 10 '19 at 20:53
  • Yes, that's what I guessed when I saw it; however, I didn't want to start changing the application code around too much in order to solve the problem. – ptc Jan 10 '19 at 21:11