[xcrysden] Running XCrySDen

delamora delamora at unam.mx
Thu Aug 29 00:12:49 CEST 2024


I tried to run xcrysden and I get;
******
Version: 1.6.2
******
XCRYSDEN_TOPDIR=/home/Programas/xcrysden-1.6.2
XCRYSDEN_SCRATCH=/home/pablo/xcrys_tmp

/home/Programas/xcrysden-1.6.2/xcrysden: line 275: /home/Programas/xcrysden-1.6.2/bin/xcrys: No such file or directory

Pablo

________________________________
De: xcrysden-bounces at democritos.it <xcrysden-bounces at democritos.it> en nombre de Gavin Abo <gabo13279 at gmail.com>
Enviado: miércoles, 28 de agosto de 2024 01:11 a. m.
Para: xcrysden at democritos.it <xcrysden at democritos.it>
Asunto: Re: [xcrysden] Running XCrySDen


I tried it out.  It seems to work as seen in the screenshot at:


https://github.com/gsabo/xcrysden-Patches/blob/main/Fedora%2040%20XCrySDen%201.6.2.png


Apparently, Fedora 40 ships with gcc version 14:


username at fedora:~$ gfortran --version
GNU Fortran (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1)
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Most of the Fedora 34 steps still applied to Fedora 40, but I had to make some adjustments in order to get it to work as follows.


Since you already have Fedora 40 installed, you can skip to step 8 below.


1. Went to: https://getfedora.org/en/workstation/download/
2. Downloaded Fedora Workstation 40:
Fedora-Workstation-Live-x86_64-40-1.14.iso
3. Downloaded Fedora Media Writer Windows:
FedoraMediaWriter-win32-latest.exe
4. Ran: FedoraMediaWriter-win32-latest.exe
   a. Clicked "I Agree"
   b. Clicked "Install"
   c. Clicked "Next"
   d. With "Run Fedora Media Writer" selected, clicked "Finish"
   e. Selected "Select .iso file", then clicked "Next"
   f. Clicked "Select..."
   g. Selected "Fedora-Workstation-Live-x86_64-40-1.14.iso", then clicked "Open"
   h. Selected USB Drive, then clicked "Write"
   i. Click "Finish"
   j. Closed the Fedora Media Write dialog (upper right x in window)
5. Booted from the USB stick
6. Installed Fedora 40
    a. Selected "Start Fedora-Workstation-Live 40"
    b. Clicked "Install Fedora..."
    c. Selected English and clicked Continue
    d. Clicked "Installation Destination"
    e. Clicked Done
    WARNING: The steps f-h will wipe everything for starting fresh with the drive.
    f. Clicked "Reclaim space"
    g. Clicked "Delete all"
    h. Clicked "Reclaim space"
    i. Clicked "Begin Installation"
    j. Clicked "Finish Installation"
    k. In Fedora Live, click on bar with power icon, click on power icon, click "Restart", click "Restart" button
7. Setup Fedora 40
    a. Clicked "Start Setup"
    b. Click Skip (or setup Wi-Fi)
    c. Turn off "Location Services" and "Automatic Problem Reporting", then click Next
    d. Click "Enable Third-Party Repositories", then click Next
    e. Type a Full Name and Username and click Next
    f. Type a password and click Next
    g. Click "Start Using Fedora Linux"
    h. For tour prompt, click "Skip"
8. Opened a terminal in Fedora 40 and performed the following:

username at fedora:~$ sudo yum install patch ImageMagick openbabel mesa-libGL-devel mesa-libGLU-devel tcl-devel tk-devel fftw-devel libXmu-devel gfortran
...
Is this ok [y/N]: y
...
username at fedora:~$ wget https://sourceforge.net/projects/togl/files/Togl/2.0/Togl2.0-src.tar.gz/download
...
username at fedora:~$ tar xvf download
...
username at fedora:~$ cd Togl2.0/
username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$>  ./configure --with-tcl=/usr/lib64 --with-tk=/usr/lib64 --enable-64bit
...


The Togl 2.0 failed due the gcc version 14 compiler as seen here:


username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$> make
gcc -DPACKAGE_NAME=\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"2.0\" -DPACKAGE_STRING=\"Togl\ 2.0\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DAUTOSTEREOD=\"\"  -I"/usr/include/tcl-private/generic" -I"/usr/include/tcl-private/unix" -I"/usr/include/tk-private/generic" -I"/usr/include/tk-private/unix" -I"/usr/include/tk-private/generic/ttk"     -pipe -m64 -O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC  -c `echo togl.c` -o togl.o
togl.c: In function ‘Togl_Init’:
togl.c:928:26: error: assignment to ‘void (*)(struct Tk_Window_ *, Tk_ClassProcs *, void *)’ from incompatible pointer type ‘void (*)(struct Tk_Window_ *, const Tk_ClassProcs *, void *)’ [-Wincompatible-pointer-types]
  928 |         SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs;
      |                          ^
make: *** [Makefile:357: togl.o] Error 1


However, I was able to patch it for continuing with the build:


username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$> wget https://raw.githubusercontent.com/gsabo/xcrysden-Patches/main/togl.patch

username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$> patch -b togl.c togl.patch
username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$> make

...

username at fedora:~/Togl2.0$<mailto:username at fedora:~/Togl2.0$> cd ..
username at fedora:~$ wget http://www.xcrysden.org/download/xcrysden-1.6.2.tar.gz
...
username at fedora:~$ tar xvf xcrysden-1.6.2.tar.gz
...
username at fedora:~$ cd xcrysden-1.6.2/
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> cp system/Make.sys-semishared Make.sys
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> wget https://raw.githubusercontent.com/gsabo/xcrysden-Patches/main/Make-fedora34.patch
...
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> patch -b Make.sys Make-fedora34.patch
patching file Make.sys
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> make all
...

Note: username in commands below should be replaced with your user name.

username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> echo 'export XCRYSDEN_TOPDIR=/home/username/xcrysden-1.6.2'>>~/.bashrc
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> echo 'export PATH=$PATH:$XCRYSDEN_TOPDIR'>>~/.bashrc
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/username/Togl2.0'>>~/.bashrc
username at fedora:~/xcrysden-1.6.2$<mailto:username at fedora:~/xcrysden-1.6.2$> source ~/.bashrc


Best Regards,

Gavin

XCrySDen user


On 8/26/2024 10:56 PM, delamora wrote:
Dear Gavin,
Thank for your reply, I will try it.
Yes, I have the Fedora 40
Pablo
________________________________
The issue might be because the version of Fedora that you are using does not have the operating system library that it needs to load ftnunit.  Thus, the "error while loading" error.


What is the Fedora version?  The xcrysden-1.5.60-bin-semishared worked with around Fedora versions 25 to 27.


With Fedora 34, xcrysden 1.6.2 was used, but it had to be compiled.


The compile steps used were given the post at:


http://www.democritos.it/pipermail/xcrysden/2021-April/002050.html


At https://fedoraproject.org , I see that Fedora is now at version 40.  I've not tried XCrySDen 1.6.2 with that version if that is what you are using.


With some other code packages, I have seen some GNU compiler compatibility issues encountered with newer Linux distributions that release with gcc/g++ version 13.  With Ubuntu 24.04 LTS that comes with gcc/g++ version 13, though, I was able to fall back as a workaround (while waiting to see if the code developers would provide new versions with code changes for working with the newer compilers) for example by installing a g++ version 10 package using "sudo apt install g++-10".  Don't know yet if there are any issues compiling XCrySDen 1.6.2 with the latest gcc versions or if Fedora has a similar fall back package that can be installed like Ubuntu.


Kind Regards,

Gavin

XCrySDen user


On 8/26/2024 2:24 PM, delamora wrote:
I have Fedora Linux
I installed xcrysden-1.5.60-bin-semishared, but when I try to open it
"xcrysden"
it does not open, it gives the error;

/home/Programas/xcrysden-1.5.60-bin-semishared/bin/ftnunit: error while loading

How can I fix it

Yours

Pablo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.democritos.it/pipermail/xcrysden/attachments/20240828/eb8ed98b/attachment-0001.htm 


More information about the XCrySDen mailing list