Compilation error for abinit-9.4.2

option, parallelism,...

Moderators: jbeuken, Jordan, pouillon

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Post Reply
bs544
Posts: 1
Joined: Tue Apr 27, 2021 11:18 pm

Compilation error for abinit-9.4.2

Post by bs544 » Thu May 06, 2021 11:00 am

Hi,

I'm trying to go from version 9.2.2 to 9.4.2 using the same configuration file, but it looks like some bits in 02_clib/sockets.c are causing the following errors when I run make:
sockets.c(84): error: incomplete type is not allowed
struct addrinfo hints, *res;
^

sockets.c(90): error: identifier "AI_PASSIVE" is undefined
hints.ai_flags = AI_PASSIVE;
^

sockets.c(93): warning #266: function "getaddrinfo" declared implicitly
ai_err = getaddrinfo(host, service, &hints, &res);
^

sockets.c(97): error: pointer to incomplete class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

sockets.c(97): error: pointer to incomplete class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

sockets.c(97): error: pointer to incomplete class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

sockets.c(101): error: pointer to incomplete class type is not allowed
if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0)
^

sockets.c(101): error: pointer to incomplete class type is not allowed
if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0)
^

sockets.c(103): warning #266: function "freeaddrinfo" declared implicitly
freeaddrinfo(res);
^
I've put the contents of my configuration file below. Is there something I should change in there to sort this out?

Thanks for any help,
Ben

config file:
prefix='/home/bs544/local/lib/abinit-9.2.2/ben'
FC=mpiifort
CC=mpiicc
CXX=mpiicpc

FCFLAGS="-O3 -heap-arrays 64"

enable_mpi_io="yes"

with_optim_flavor="aggressive"
with_mpi="/opt/intel/oneapi/mpi/latest/"
MPI_LIBS="-L/opt/intel/oneapi/mpi/latest/lib -lmpi_lp64"

#LINALG
with_linalg_flavor="mkl"
wihh_fft_flavor="dfti"


# HDF5
with_hdf5=$HDF5_DIR

H5CC="${HDF5_DIR}/bin/h5pcc"
HDF5_CPPFLAGS="-I${HDF5_DIR}/include"
HDF5_CFLAGS="-std=c99"
HDF5_LDFLAGS=""
HDF5_LIBS="-L${HDF5_DIR}/lib -lhdf5 -lhdf5_hl"

# NetCDF
with_netcdf=$NETCDF_DIR

NETCDF_CPPFLAGS="-I${NETCDF_DIR}/include"
NETCDF_FCFLAGS="-I${NETCDF_DIR}/include"
NETCDF_LIBS="-L${NETCDF_DIR}/lib -lnetcdf"

# NetCDF-Fortran
NETCDFF_DIR=${NETCDF_FORTRAN_DIR}

with_netcdf_fortran=${NETCDFF_DIR}
NETCDF_FORTRAN_CPPFLAGS="-I${NETCDFF_DIR}/include"
NETCDF_FORTRAN_FCFLAGS="-I${NETCDFF_DIR}/include"
NETCDF_FORTRAN_LIBS="-L${NETCDFF_DIR}/lib -lnetcdff"

# LibXC
LIBXC_DIR="/home/bs544/local/lib/libxc-4.3.4/ben"

with_libxc=$LIBXC_DIR
LIBXC_CPPFLAGS="-I${LIBXC_DIR}/include"
LIBXC_CFLAGS="-I${LIBXC_DIR}/include"
LIBXC_FCFLAGS="-I${LIBXC_DIR}/include"
LIBXC_LIBS="-L${LIBXC_DIR}/lib -lxc" #f90 -lxcf03 -lxc"

User avatar
jbeuken
Posts: 364
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Compilation error for abinit-9.4.2

Post by jbeuken » Mon May 10, 2021 11:30 am

Hi,

Maybe some packages are missing depending on your OS :?:

We find /usr/include/sys/socket.h :
- for Ubuntu 18 : libc6-dev-amd64
- for CentOS 7 : glibc-headers-2.17-323.el7_9.x86_64
------
Jean-Michel Beuken
Computer Scientist

Post Reply