Undefined reference to parse_file_C

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
mwistey
Newbie
Newbie
Posts: 12
Joined: Fri Sep 26, 2014 2:22 am
License Nr.: 5-1877

Undefined reference to parse_file_C

#1 Post by mwistey » Thu Sep 21, 2017 4:52 am

Compiling VASP 5.4.4 on an Intel Linux cluster, using Intel ifort (IFORT) 17.0.4 20170411 with intelmpi/17.0.4, I get
locproj.f90:(.text+0xa5): undefined reference to `parse_file_C'
locproj.f90:(.text+0xb9): undefined reference to `free_parser_C'
locproj.f90:(.text+0x254): undefined reference to `fill_basis_info_C'
locproj.f90:(.text+0x26d): undefined reference to `free_parser_C'
make[2]: *** [vasp] Error 1

In case anybody else runs into this, it turned out to be a problem in the makefile.include. Specifically, the parser subdirectory was not getting compiled or copied to the build directory. I was using a makefile.include that had been recommended (perhaps for an old cluster or old version of VASP?), which lacked the following:
# For the parser library
CXX_PARS = icpc
LIBS += parser
LLIBS += -Lparser -lparser -lstdc++

Please reply below if this saves you a headache. It would be nice to feel like it wasn't a total waste.

kseb@averell.umh.ac.be
Newbie
Newbie
Posts: 1
Joined: Thu Jul 01, 2010 1:09 pm
Location: Belgique

Re: Undefined reference to parse_file_C

#2 Post by kseb@averell.umh.ac.be » Thu Nov 23, 2017 11:19 am

Hello,

for the same error I added the following line on the end of makefile.include : # For the parser library
CXX_PARS = icpc
LIBS += parser
LLIBS += -Lparser -lparser -lstdc++

And it works.

Thanks,
Sébastien.

Post Reply