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

From: Rubén Granero (ruben.granero_at_geo.uni-goettingen.de)
Date: Tue Dec 16 2014 - 12:07:45 CST

Right, I forgot to apply the changes in plugins/molfile_plugin/src/. In any
case, this is no longer a problem, as it has been fixed in PLUMED 2.1.1.
Thanks for your help!

Rubén

2014-12-16 16:22 GMT+01:00 Jim Phillips <jim_at_ks.uiuc.edu>:
>
>
> It looks like you modified the files in the NAMD src directory but not
> plugins/include/libmolfile_plugin.h or plugins/molfile_plugin/src/...
>
> Jim
>
>
>
> On Tue, 16 Dec 2014, Rub?(c)n Granero wrote:
>
> Hi Jim,
>>
>> Thanks for your help. I've tried your suggestion and renamed all affected
>> functions (added PLUMED to their names) but this creates undefined
>> references when I try to compile (see output below). I thought I would
>> need
>> to change the name of the functions where they are defined, but didn't
>> find
>> where that is.
>>
>> obj/ScriptTcl.o: In function `ScriptTcl::ScriptTcl()':
>> ScriptTcl.C:(.text+0x49f9): undefined reference to
>> `molfile_PLUMED_dcdplugin_init'
>> ScriptTcl.C:(.text+0x4a05): undefined reference to
>> `molfile_PLUMED_dcdplugin_register'
>> obj/ScriptTcl.o: In function `ScriptTcl::~ScriptTcl()':
>> ScriptTcl.C:(.text+0x50b6): undefined reference to
>> `molfile_PLUMED_dcdplugin_fini'
>> obj/PluginIOMgr.o: In function `PluginIOMgr::PluginIOMgr()':
>> PluginIOMgr.C:(.text+0x15): undefined reference to
>> `molfile_PLUMED_jsplugin_init'
>> PluginIOMgr.C:(.text+0x23): undefined reference to
>> `molfile_PLUMED_jsplugin_register'
>> obj/PluginIOMgr.o: In function `PluginIOMgr::~PluginIOMgr()':
>> PluginIOMgr.C:(.text+0x31): undefined reference to
>> `molfile_PLUMED_jsplugin_fini'
>> collect2: error: ld returned 1 exit status
>> Fatal Error by charmc in directory
>> /home/rubengpu/bin/NAMD_2.9_Source/Linux-x86_64-g++
>>
>> As it seems that the problem comes from PLUMED rather than NAMD, I'll
>> contact the PLUMED users group to see if I can install PLUMED without the
>> conflictive plugins.
>>
>> Rub?(c)n
>>
>>
>>
>> 2014-12-15 15:37 GMT+01:00 Jim Phillips <jim_at_ks.uiuc.edu>:
>>
>>>
>>>
>>> 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?(c)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?(c)n
>>>>
>>>>
>>>

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