The latest (lepton) version causes compilation error of NAMD
Hi,
When the latest devel version of NAMD was patched with the master (with downloaded lepton) version of Colvars, the compilation yielded the following error:
Make.depends:1: *** recipe commences before first target. Stop.
However, everything works if an old version (2022.5) of Colvars (without lepton) was used.
Any suggestion about how to address this issue is appreciated.
Thanks, Haohao
This is caused by a problem at the beginning of Make.depends:
$(CC) $(CXXFLAGS) $(COPTO)obj/AVXTiles.o $(COPTC) src/AVXTiles.c
$(CC) $(CXXFLAGS) $(COPTO)obj/AVXTilesKernel.o $(COPTC) src/AVXTilesKernel.c
$(CC) $(CXXFLAGS) $(COPTO)obj/AVXTileLists.o $(COPTC) src/AVXTileLists.c
obj/ComputeMoa.o: \
obj/.exists \
src/ComputeMoa.C \
Trying to figure out how to prevent this from happening.
Alternately, it could come from various conflicts between the Makefile of NAMD and a previous version. It's hard to say more without more details.
Thanks for your reply! Is there any way to circumvent this issue?
Based on my experience today, I would recommend:
- check all Makefiles for traces of incomplete merges (lines with <<<< ==== >>>>) and remove them :-)
- make clean
- make depends
- make
Thanks! I will try!
Haohao
@fhh2626 You should be able to patch the clean namd/devel repo now and build without issues. Thanks for your report!
Thanks for the fix!
Hi, @jhenin ,
I got
in function `Lepton::ParsedExpression::createCompiledVectorExpression(int) const': ParsedExpression.cpp:(.text+0xbba): undefined reference to `Lepton::CompiledVectorExpression::CompiledVectorExpression(Lepton::ParsedExpression const&, int)'
error when compiling NAMD with the latest of Colvars. I used the master branch of OpenMM. Could you please have a look at it?
Thanks, Haohao
@fhh2626 Sorry, we had agreed to stop tracking the NAMD core files but I forgot to disable the script that keeps them up to date in the Colvars repository nightly.
The latest commit fixes this, and the test runs correctly now: https://github.com/Colvars/colvars/runs/8169263173?check_suite_focus=true
@giacomofiorin Sorry, I downloaded the latest version but still got the same issue.
Can you please try with clean worktrees for both Colvars and NAMD and using the devel-tools/compile-namd.sh provided in this repo?
It worked when I use OpenMM 7.7 instead of the master branch. I assume that there is a major update of Lepton inducting the conflict with Colvars.
Strange, I cannot reproduce this issue. By default update-colvars-code.sh clones the master branch of OpenMM as well, and this is working for me.
Same here, the error is from an outdated build recipe from Lepton that misses a new file that they added upstream. But the Colvars patch script has been updating this recipe for a while now.
The problem fixed in #494 was Colvars overwriting NAMD 3's Makefile with the NAMD 2 one, which needed fixing but seems unrelated to this issue.
That said, we can confirm on three different platform (@jhenin's computer, mine and the GH Actions environment) that there are no issues with Lepton.
To move forward I'd recommend confirming what I asked earlier, i.e. using clean repositories and a build procedure for NAMD that can be reproduced easily (doesn't have to be the one I mentioned, but it should be clear what it is).
@giacomofiorin Sorry I did not succeed in using devel-tools/compile-namd.sh.
Still, I used a clean computer, downloaded the latest version of NAMD (devel branch), Colvars (master branch) and OpenMM (master branch). Then I downloaded charm-6.10.2 and proper versions of tcl and fftw (which I provided here).
I first patched NAMD using the Colvars and OpenMM. Then untar charm, tcl and fftw in the NAMD folder and compile charm and NAMD. I still got this issue in function Lepton::ParsedExpression::createCompiledVectorExpression(int) const': ParsedExpression.cpp:(.text+0xbba): undefined reference to Lepton::CompiledVectorExpression::CompiledVectorExpression(Lepton::ParsedExpression const&, int)' Not sure why.
How did you patch NAMD? If you use something different from the procedure listed here, please include it in detail.
How did you patch NAMD? If you use something different from the procedure listed here, please include it in detail.
export OPENMM_SOURCE=.......
update-colvars-code.sh .......
@fhh2626 Please be more complete. We have already tried several times and the procedure used in the CI: https://github.com/Colvars/colvars/blob/da4ccd8af334d3b3f831915e7042ae6216fe268e/.github/workflows/backend-template.yml#L144-L147 works offline as well.
Can you post here a link to a full script that reproduces your issue on a recent Linux AMD64 machine? Your pick of the distribution, but if you can use a pre-build VM that is freely downloadable (e.g. from OSBoxes), it's all the better. Presumably since you used pre-compiled versions of Tcl and FFTW, there are no further dependencies to install than the C++ compiler and GNU Make. Please include also the commands that you used to clone repositories, etc. You can't distribute a copy of NAMD, but do specify the commit SHA from its repository.