Can't run xcrysden crystallographic software. Missing library.

Hi. I need this software very much for my project.
I didn’t find it in any opensuse repositories. So I went on the official website and downloaded Linux x86_64 binary packages (64bit) from there:
I extracted the archive in ~/ folder and run ./xcrystden I got the following message:


(base) aleksandr@desktop:~/xcrysden-1.6.2-bin-shared> ./xcrysden 

+-----------------------------------------------------------------+
|*****************************************************************|
|*                                                               *|
|*  XCrySDen -- (X-Window) CRYstalline Structures and DENsities  *|
|*               =         ===         =              ===        *|
|*---------------------------------------------------------------*|
|*                                                               *|
|*    Anton Kokalj (tone.kokalj@ijs.si)                          *|
|*    Jozef Stefan Institute, Ljubljana, Slovenia                *|
|*                                                               *|
|*    Copyright (c) 1996--2019 by Anton Kokalj                   *|
|*                                                               *|
|*****************************************************************|
+-----------------------------------------------------------------+

  Version: 1.6.2

  Please report bugs to: tone.kokalj@ijs.si


  TERMS OF USE:
  -------------
  XCRYSDEN is released under the GNU General Public License.

  Whenever graphics generated by XCRYSDEN are used in scientific
  publications, it shall be greatly appreciated to include an explicit
  reference. The preferred form is the following:

  [ref] A. Kokalj, J. Mol. Graph. Model., Vol. 17, pp. 176-179, 1999.
        Code available from http://www.xcrysden.org/.

XCRYSDEN_TOPDIR=/home/aleksandr/xcrysden-1.6.2-bin-shared
XCRYSDEN_SCRATCH=/tmp

/home/aleksandr/xcrysden-1.6.2-bin-shared/bin/xcrys: error while loading shared libraries: libTogl.so.2: cannot open shared object file: No such file or directory

I don’t know how to get this libTogl.so.2 to make everything work. I tried installing “Togl” from here, but it didn’t help.
Please help.

Hi
The Science repository is only version 1.7 (not touched for 12 years…) not 2.0 (which is still circa 2008)… let me see if can build.

It exists in devel:languages:tcl as togl2 but not building for the enabled repos (not Leap either)

Hi
Got past the configure issue, but needs more work on the tk side with code changes… needs someone with more skills that me on the tk side to fix. Maybe contact the Togl developers and see if they can help.

So should I contact them and ask to make an .rpm package for their latest Togl?

Hi
Well update the code for newer versions of TCL and TK… if they do that, can take care of an rpm…

This is the error I get;


   27s] togl.c: In function 'Togl_Init':
   27s] togl.c:928:26: warning: assignment from incompatible pointer type -Wincompatible-pointer-types]
   27s]          SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs;
   27s]                           ^
   27s] In file included from togl.c:3810:0:
   27s] toglFont.c: At top level:
   27s] toglFont.c:136:5: error: unknown type name 'TkFont'
   27s]      TkFont  font;               /* Stuff used by generic font package.  Must be

https://software.opensuse.org/package/tk
https://www.tcl.tk/software/tcltk/8.6.html

Hi
No, that is NOT the issue, the current tcl/tk does not use that header (TkFont.h) any more, remember this code is from 2008.

https://wiki.tcl-lang.org/page/OpenGL

XCrySDen is outdated. Try another package.

download the file below:](https://sourceforge.net/projects/togl/files/)Togl - Browse Files at SourceForge.net

cd -
tar -zxvf …
cd Togl2.0-8.4-Linux/lib
ln -s Togl2.0/libTogl2.0.so libTogl.so.2

edit the file .bashrc
export LD_LIBRARY_PATH="$HOME/Togl2.0-8.4-Linux/lib/:$LD_LIBRARY_PATH"

Finally,
sudo zypper install free-ttf-fonts

I succeeded. Hope it works for you.
:slight_smile:

1 Like

install fonts in my WSL. The fonts becomes normal.
sudo zypper install fonts

Hi, ead180. Thank u so much for the solution. It worked like a charm for me.

Really, thanx.