Hello,
I am struggling with compiling plumed 2.3.2 with libmatheval 1.1.11, I tried many times, but it is still not working.
Thanks to Davide Branduardi's previous post, I can compile libmatheval successfully without guile, using icc
Then, I set:
export LD_LIBRARY_PATH=/... path .../libmatheval1.1.11/lib/:$LD_LIBRARY_PATH
export LDFLAGS=-L/... path .../libmatheval1.1.11/lib
export CPPFLAGS=-I/... path .../libmatheval1.1.11/lib
PS: I also saw someone set the variables linked to libmatheval1.1.11/lib/.libs, I also tried that, also not working
then I go to plumed2.3.2, and do the configuration with
./configure CXX=mpiicpc CC=icc --prefix=/ ... path ... /
After the configuration, I add the flags to Makefile.conf:
DYNAMIC_LIBS= -lmatheval -L/pica/h1/qinghual/Programs/plumed2/libmatheval1.1.11/lib/
CPPFLAGS= -D__PLUMED_HAS_MATHEVAL=1 -I/pica/h1/qinghual/Programs/plumed2/libmatheval1.1.11/lib
LDFLAGS= -rdynamic /pica/h1/qinghual/Programs/plumed2/libmatheval1.1.11/lib/
then run make and make install, but I got the error like this:
~/libmatheval1.1.11/lib/libmatheval.so: undefined reference to `yywrap'
I googled, I found that this problem might come from flex (flex 2.5.37 was installed on the cluster ) , then I tried to compile libmatheval by adding a flag of "--noyywrap" to flex in the Makefile, as sugguested here:
https://github.com/UWPRG/Plumed/blob/master/compile_plumed_gromacs_matheval.mdbut I still got the same error
I even tried to install my own flex (flex 2.6.4 ), then install libmatheval, and then plumed, but it is still the same error I got.
As I read, the function of yywrap is not necessary for libmatheval, any suggestion on how to fix this problem? Thanks a lot!
All the best,
Qinghua