From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat Mar 06 2021 - 16:30:09 CST

Rene,
  Glad that got you through the linkage hurdles.

Unfortunately, the link libraries vary quite a bit by platform
and even by version and/or compile-time choices for libraries like
FLTK and Tcl/Tk, so the standard VMD 'configure' script is written
for what had been the most typical (and importantly, most stable!)
versions of these libraries, and their associated configuration
parameters. For example, when FLTK first added support for Xft,
it was somewhat buggy and many Linux distributions lacked it.
As of today Xft is pretty widespread in current Linux distros, so
I expect we could enable it by default going forward. There are
several more config options like that which all need to be revisited
periodically, both for stability and universal availability.

Best,
  John Stone

On Sat, Mar 06, 2021 at 11:20:35PM +0100, René Hafner TUK wrote:
> Hi John,
>
> sorry that was a dumb question...
>
> I finally got it now! :)
>
> I furthermore had to add the following libraries to the link line
>
> "... -lfltk -lX11 -lXext -lXrender -lXft -lfontconfig -lXcursor -lXfixes
> -lXinerama"
>
> in order to make it work.
>
> Tomorrow I will try it with the latest version from VMD cvs to get the
> latest fixes for colvars_dashboard too.
>
> Thanks a lot for the support, also to you @Giacomo.
>
> René
>
> On 3/6/2021 10:26 PM, John Stone wrote:
>
> Rene,
> Looks like your Tk build needs -lfontconfig added to the link line...
>
> Best,
> John
>
> On Sat, Mar 06, 2021 at 10:21:00PM +0100, René Hafner TUK wrote:
>
> Hi John,
>
> thanks info about the update of the colvars. I wil try that once I
> fixed the compilation issue.
>
> Though I get 2 steps further when adding
>
> "-lfltk - lX11 -lXext -lXrender -lXft"
>
> Now I get:
>
> /lib/../lib64/libtk8.5.so: undefined reference to symbol 'FcUtf8ToUcs4'
>
> //usr/lib64/libfontconfig.so.1: error adding symbols: DSO missing from
> command line
>
> Any hints what the issue is here?
>
> Kind regards
>
> René
>
> On 3/6/2021 7:37 PM, John Stone wrote:
>
> Hi René,
> FYI, for your benefit, I synced up the VMD tree with the latest
> colvars git master last night.
>
> Regarding your linkage problem:
> It appears that your FLTK builds are compiled with the use of some
> X11 extension functions. To ensure they are correctly resolved at
> link time, you'll need to make sure that you're adding libXext to the
> link flags. You can either edit the configure script to add that for
> the FLTK section, or you can edit the generated Makefile and add it
> manually in the linkage list that follows fltk for your build, e.g.:
> .. -ltk8.6 -ltcl8.6 -lz -lmolfile_plugin -lfltk -lX11 -lXext -lm -ldl ...
>
> Make sure you place -lXext after -lX11.
> I should warn you that depending on how you've compiled FLTK, you may
> need to make further changes, to add linkage of libXrender libXft, and/or
> other libraries. They would all amount to the same sort of changes,
> adding -lXrender -lXft etc, to configure or the generated Makefile.
>
> One of the complexities of using GUI toolkits like FLTK and Tk is
> that they themselves have additional dependencies that change with
> version and/or build configuration, and their dependencies must
> also be completely satisfied at link time when you use them with VMD.
>
> Best regards,
> John Stone
> [[1]1]vmd_at_ks.uiuc.edu
>
> On Sat, Mar 06, 2021 at 05:14:12PM +0100, René Hafner TUK wrote:
>
> Hi Giacomo,
>
> I got LEPTON working but the not VMD GUI compilation.
>
> * I forgot to include lepton into VMDs "./configure TK TCL ..
> LEPTON" - though this part is resolved now
>
> I can successfully compile without FLTK but not with FLTK.
>
>
>
> Here is the error log after
>
> `./configure LINUXAMD64 OPENGL FLTK TK TCL PTHREADS COLVARS LEPTON
>
> cd src
>
> make
>
> ....compiliing stuff....
>
> Linking vmd_LINUXAMD64 ...
> Stride.o: In function `ss_from_stride(DrawMolecule*)':
> Stride.C:(.text+0x35f): warning: the use of `tempnam' is dangerous, better
> use `mkstemp'
> /usr/bin/ld: ../lib/fltk/LINUXAMD64/libfltk.a(Fl_Double_Window.o):
> undefined reference to symbol 'XdbeAllocateBackBufferName'
> //usr/lib64/libXext.so.6: error adding symbols: DSO missing from command
> line
> collect2: error: ld returned 1 exit status
> make: *** [vmd_LINUXAMD64] Error 1
>
> `
>
> I tried multiple version of FLTK by now:
>
> * 1.0.11
>
> *1.3.4-2
>
> * 1.3.5
>
> and installed them as describe in VMDSourceDIR/lib/fltk/README.
>
> the error still persists.
>
> Which version are you and it does working with in general?
>
> Kind regards
>
> René
>
> On 3/5/2021 6:46 PM, Giacomo Fiorin wrote:
>
> Hi René, those should be enough. I just tested that the patches do work
> with the latest CVS snapshots of the VMD and plugins repositories, both
> of which you can download at:
> [1][2][2]https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> (In the process, I also updated the patch files to track the latest
> snapshots, thus silencing warnings about the offsets having changed).
> When everything goes correctly you should see the following line printed
> when you first initialize Colvars (either from the command line or the
> Dashboard):
> colvars: This version was built with the C++11 standard or higher.
> There isn't a similar message for Lepton (other than a customFunction
> variable just working), but I presume that you applied both patches in
> the same way.
> As for the Dashboard, I strongly recommend updating its version either
> before or after compilation (it is only Tcl/Tk code so it doesn't
> need compilation). The version of the Dashboard that the VMD repository
> currently contains is buggy.
> Can you do the following?
> 1) Specify what error message you got telling you that Lepton isn't
> enabled.
> 2) Check that you can successfully build VMD and plugins without any
> patches; if anything went wrong there, the VMD team may also help.
> Giacomo
> On Thu, Mar 4, 2021 at 3:36 PM René Hafner TUK
> [3][3]<[2]hamburge_at_physik.uni-kl.de> wrote:
>
> Dear VMD developers,
>
> I would like to able to have my colvar files using "customFunction"
> being parsed by VMD colvars cv_dashboard.
>
> I succesfully compiled VMD 1.9.4. alpha51 using the provided
>
> + source code on the website
>
> + plugins
>
> + lepton files from
> [3][4][4]https://github.com/openmm/openmm/tree/master/libraries/lepton
>
> +patches for c++11 and lepton from
> [4][5][5]https://github.com/giacomofiorin/vmd-patches
>
> As far as I understood only lepton support (which requires C++11 for
> VMD, therefore the patches) was missing to support this feature.
>
> What am I missing here?
>
> Kind regards
>
> René
>
> --
> --
> Dipl.-Phys. René Hafner
> TU Kaiserslautern
> Germany
>
> --
> --
> Dipl.-Phys. René Hafner
> TU Kaiserslautern
> Germany
>
> References
>
> Visible links
> 1. [6][6]https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 2. [7][7]mailto:hamburge_at_physik.uni-kl.de
> 3. [8][8]https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7zbwVFieg$
> 4. [9][9]https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7wypfAkUg$
>
>
> --
> --
> Dipl.-Phys. René Hafner
> TU Kaiserslautern
> Germany
>
> References
>
> Visible links
> 1. [10]mailto:vmd_at_ks.uiuc.edu
> 2. [11]https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 3. mailto:[[12]2]hamburge_at_physik.uni-kl.de
> 4. [13]https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!sdVGylMd7Uo8B24R3CtpNfmITZp-SamrD_j3ACun8UAs11BBfWfFSD4h2pn-ARyu$
> 5. [14]https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!sdVGylMd7Uo8B24R3CtpNfmITZp-SamrD_j3ACun8UAs11BBfWfFSD4h2v_eAkgK$
> 6. [15]https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 7. [16]mailto:hamburge_at_physik.uni-kl.de
> 8. [17]https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7zbwVFieg$
> 9. [18]https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7wypfAkUg$
>
>
> --
> --
> Dipl.-Phys. René Hafner
> TU Kaiserslautern
> Germany
>
> References
>
> Visible links
> 1. mailto:1]vmd_at_ks.uiuc.edu
> 2. https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 3. mailto:[2]hamburge_at_physik.uni-kl.de
> 4. https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!qV5u3ETwI3LvLSY59EF9T1ni9pWvl8Vi-ZyaYbOVPVkxPskrFYoJqC7L40V5OWU6QA$
> 5. https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!qV5u3ETwI3LvLSY59EF9T1ni9pWvl8Vi-ZyaYbOVPVkxPskrFYoJqC7L40Wd2Fkmtg$
> 6. https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 7. mailto:hamburge_at_physik.uni-kl.de
> 8. https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7zbwVFieg$
> 9. https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7wypfAkUg$
> 10. mailto:vmd_at_ks.uiuc.edu
> 11. https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 12. mailto:2]hamburge_at_physik.uni-kl.de
> 13. https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!sdVGylMd7Uo8B24R3CtpNfmITZp-SamrD_j3ACun8UAs11BBfWfFSD4h2pn-ARyu$
> 14. https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!sdVGylMd7Uo8B24R3CtpNfmITZp-SamrD_j3ACun8UAs11BBfWfFSD4h2v_eAkgK$
> 15. https://www.ks.uiuc.edu/Research/vmd/doxygen/cvsget.html
> 16. mailto:hamburge_at_physik.uni-kl.de
> 17. https://urldefense.com/v3/__https://github.com/openmm/openmm/tree/master/libraries/lepton__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7zbwVFieg$
> 18. https://urldefense.com/v3/__https://github.com/giacomofiorin/vmd-patches__;!!DZ3fjg!qZVLzfQlbkaM4vcGDznkmngKT53QGhjghQ5MwpFCsMyhvXSok4eQTirXp7wypfAkUg$

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/