Re: Error compiling NAMD2.9 after patching with PLUMED2.1

From: Jim Phillips (jim_at_ks.uiuc.edu)
Date: Mon Dec 15 2014 - 08:37:26 CST

It appears that PLUMED and NAMD both include the VMD molfile plugins.
Since they have the same function names and neither is a library this is a
conflict. Renaming the affected molfile_XXXplugin_[init|register|fini]
functions everywhere in the NAMD src and plugins directories would work if
there is no way to build PLUMED without the plugins.

Jim

On Mon, 15 Dec 2014, Rubén Granero wrote:

> Hi there,
>
> I've successfully compiled NAMD2.9 (multicore and CUDA) and installed
> PLUMED2.1 in CentOS7. I followed the exact compilation instructions from
> their respective user guides and both of them are working fine. I've also
> patched NAMD with PLUMED, which seems to go without problems; however, when
> I try to recompile NAMD after the patching, it won't do it. It gives a
> fatal error in charmc:
>
> obj/dcdplugin.o: In function `molfile_dcdplugin_init':
> dcdplugin.c:(.text+0x2350): multiple definition of `molfile_dcdplugin_init'
> /usr/local/lib/lib/plumed///src/molfile/dcdplugin.o:dcdplugin.cpp:(.text+0x208d):
> first defined here
> obj/dcdplugin.o: In function `molfile_dcdplugin_register':
> dcdplugin.c:(.text+0x2410): multiple definition of
> `molfile_dcdplugin_register'
> /usr/local/lib/lib/plumed///src/molfile/dcdplugin.o:dcdplugin.cpp:(.text+0x2165):
> first defined here
> obj/dcdplugin.o: In function `molfile_dcdplugin_fini':
> dcdplugin.c:(.text+0x2430): multiple definition of `molfile_dcdplugin_fini'
> /usr/local/lib/lib/plumed///src/molfile/dcdplugin.o:dcdplugin.cpp:(.text+0x217f):
> first defined here
> obj/pdbplugin.o: In function `molfile_pdbplugin_init':
> pdbplugin.c:(.text+0x1b70): multiple definition of `molfile_pdbplugin_init'
> /usr/local/lib/lib/plumed///src/molfile/pdbplugin.o:pdbplugin.cpp:(.text+0x16b5):
> first defined here
> obj/pdbplugin.o: In function `molfile_pdbplugin_register':
> pdbplugin.c:(.text+0x1c50): multiple definition of
> `molfile_pdbplugin_register'
> /usr/local/lib/lib/plumed///src/molfile/pdbplugin.o:pdbplugin.cpp:(.text+0x17cc):
> first defined here
> obj/pdbplugin.o: In function `molfile_pdbplugin_fini':
> pdbplugin.c:(.text+0x1c70): multiple definition of `molfile_pdbplugin_fini'
> /usr/local/lib/lib/plumed///src/molfile/pdbplugin.o:pdbplugin.cpp:(.text+0x17e6):
> first defined here
> collect2: error: ld returned 1 exit status
> Fatal Error by charmc in directory
> /home/rubengpu/bin/NAMD_2.9_Source/Linux-x86_64-g++
>
> And then exits the compilation with this message:
>
> obj/pdbplugin.o obj/psfplugin.o moduleinit4119.o -lmoduleNeighborLB
> -lmoduleHybridLB -lmoduleRefineLB -lmoduleGreedyLB
> .rootdir/charm-6.4.0/multicore-linux64/bin/../lib/libmemory-default.o
> .rootdir/charm-6.4.0/multicore-linux64/bin/../lib/libthreads-default.o -lck
> -lconv-cplus-y -lconv-core -lconv-util -lpthread -lckqt -ldl -lcudart
> -ltcl8.5 -lpthread -lstdc++ -ldl -lsrfftw -lsfftw -lm -lmoduleNeighborLB
> -lmoduleHybridLB -lmoduleRefineLB -lmoduleGreedyLB -lm returned error code 1
> charmc exiting...
> rm -f moduleinit4119.C moduleinit4119.o
> make: *** [namd2] Error 1
>
> I've created a log file of the compilation with the entire output:
> https://drive.google.com/file/d/0B_Lt9Zsl1_ASRk9KZjl2NTZGMW8/view?usp=sharing
>
> I would appreciate if somebody can point out what's failing here.
>
> Rubén
>

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:23:07 CST