Page 1 of 1

Compilation error in Yambo 4.3.1

Posted: Mon Jan 07, 2019 8:14 am
by sitangshu
Dear Sir,

While compiling Yambo 4.3.1, I find this error:
************************************************************************
configure: netCDF-Fortran 4.4.4
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether extra valgrind tests should be run... no
checking whether parallel IO tests should be run... no
checking whether netCDF extra tests should be run (developers only)... no
checking for doxygen... doxygen
checking for dot... no
configure: WARNING: dot not found - will use simple charts in documentation
configure: finding C compiler
checking for gcc... mpicc
checking whether the C compiler works... no
configure: error: in `/home/sitangshu/Softwares/yambo-4.3.1/lib/netcdff/netcdf-fortran-4.4.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
Makefile:34: recipe for target 'configure-stamp' failed
make[2]: *** [configure-stamp] Error 77
make[2]: Leaving directory '/home/sitangshu/Softwares/yambo-4.3.1/lib/netcdff'
Makefile:151: recipe for target 'ext-libs' failed
make[1]: *** [ext-libs] Error 2
make[1]: Leaving directory '/home/sitangshu/Softwares/yambo-4.3.1'
yambo build failed
*******************************************************************************************
I have also attached the config.log file for your perusal. I would be glad if you please let me know the bug...

With regards,
Sitangshu

Re: Compilation error in Yambo 4.3.1

Posted: Mon Jan 07, 2019 8:18 am
by sitangshu
Forgot to mention that I have gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

Regards,
Sitangshu

Re: Compilation error in Yambo 4.3.1

Posted: Mon Jan 07, 2019 9:12 am
by Daniele Varsano
Dear Sitangshu,
it seems you have something odd in the definition of the C compiler when compiling the netcdf library.
You can try to define the compiler explicitly in the configure line:
./configure CC=gcc CPP='gcc -E'

check also the the MPI wrapper mpicc and mpifort points to the correct compilers.

Best,
Daniele

Re: Compilation error in Yambo 4.3.1

Posted: Mon Jan 07, 2019 12:25 pm
by sitangshu
Thank you Daniele,let me check with this..

Regards,
Sitangshu

Re: Compilation error in Yambo 4.3.1

Posted: Mon Jan 07, 2019 12:49 pm
by sitangshu
Dear Daniele,

The problem still remains.
I tried to install the next lower version: 4.3.0 and it surprisingly worked. I am sharing the config.log file of this version..
Please check..

Regards,
Sitangshu

Re: Compilation error in Yambo 4.3.1

Posted: Sun Jan 20, 2019 1:03 pm
by sdwang
Dear all,
I met the same problem and for 4.3.0 it it is OK.
What the problem could be?

Thanks!

SD

Re: Compilation error in Yambo 4.3.1

Posted: Sun Jan 27, 2019 11:41 am
by Daniele Varsano
Dear Shudong and Sitangshu,
we have spotted the problem and sovled it (Thanks to Andrea Ferretti).
You can easily fix it by changing this line in the Makefile.loc file in lib/netcdf and lib/netcdff
by setting it as:
LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/${netcdf_ver}/${hdf5_ver}
note that in the current file the latter string /${hdf5_ver} is missing.

Best,
Daniele

Re: Compilation error in Yambo 4.3.1

Posted: Tue Jan 29, 2019 6:15 am
by sitangshu
Thanks Daniele,

This is working now.!

With regards,
Sitangshu