demeter icon indicating copy to clipboard operation
demeter copied to clipboard

Installation on Ubuntu 20.04 with using Larch instead of Ifeffit

Open jacawaca opened this issue 3 years ago • 2 comments

Hi, I'm trying to build Demeter software on my Ubuntu 20.04 laptop. As it was said in #63 there are no binaries for Ifeffit in Ubuntu 20.04 repositories. Also trying to download .deb from sourceforge didn't succeed as well, because of lacks of some libraries

The following packages have unmet dependencies:
 ifeffit:i386 : Depends: libg2c0:i386 (>= 1:3.3.4-1) but it is not installable
                Depends: libpng12-0:i386 (>= 1.2.5.0-4) but it is not installable
                Depends: pgplot5:i386 (>= 5.2.2-6) but it is not installable
E: Unable to correct problems, you have held broken packages.

Then I try to build Ifeffit on my own by pulling sources from their github page, running $ sudo ./PGPLOT_install but it ended with the following error:

Warning: Possible change of value in conversion from REAL(4) to INTEGER(4) at (1) [-Wconversion]
gcc -c -Wall -fPIC -DPG_PPU -O -I. -I/usr/X11R6/include /home/jacek/src/ifeffit/pgplot/drivers/pndriv.c
In file included from /usr/include/pngconf.h:51,
                 from /usr/include/png.h:339,
                 from /home/jacek/src/ifeffit/pgplot/drivers/pndriv.c:36:
/home/jacek/src/ifeffit/pgplot/drivers/pndriv.c: In function ‘write_image_file’:
/home/jacek/src/ifeffit/pgplot/drivers/pndriv.c:225:21: error: dereferencing pointer to incomplete type ‘png_struct’ {aka ‘struct png_struct_def’}
  225 |   if (setjmp(png_ptr->jmpbuf)) { /* not really sure what I'm doing here... */
      |                     ^~
make: *** [makefile:661: pndriv.o] Błąd 1
 = Cleaning up and preparing for test
 = = = = = = = = = = = = = = = = = = = = = = = = = = 
 = Uh-oh.  PGPLOT is missing some important files!
 = It looks like PGPLOT failed during building or
 = is only partially installed.
 = 
 = Please consult the PGPLOT installation instructions
 = in the subdirectory  pgplot/, and the log file:
 =    /home/jacek/src/ifeffit/PGPLOT_install.log
 = which contains a full list of commands run.
 =
 = You may want to repeat these steps by hand or 
 = consult the PGPLOT installations instructions 
 = in install-unix.txt
 = = = = = = = = = = = = = = = = = = = = = = = = = = 

Finally I tried to build Demeter with Larch. The installation was hard but I finally managed to have conda environment with loarch installed. My question is, whether is it possible to build Demeter with Larch instead of Ifeffit? As we can read here,

Larch can also be used as a backend for the Athena and Artemis programs for XAFS Analysis, just install Larch and the latest version of Demeter, and Demeter should find and use Larch for EXAFS Analysis, replacing the older Ifeffit library and its many limitations.

I don't know whether does it mean that only Demeter needs to be installed first (with Ifeffit I suppose) and then the transition to Larch is possible? Are there any other method to install Demeter on Ubuntu 20.04?

jacawaca avatar Nov 25 '21 12:11 jacawaca

Hi, I would like to know as well, I think I am experiencing the same issue here. Have you managed to fix this in the meantime?

Dorisson27 avatar Jul 06 '22 14:07 Dorisson27

Hi, I would like to know as well, I think I am experiencing the same issue here. Have you managed to fix this in the meantime?

Sorry for late answer. I didn't managed to do it. I needed the software for laboratory (which I finished about half a year ago) and I don't remember much about this problem. To make use of the software, I borrowed laptop with Windows and install Demeter on it.

My lab assistant told me he didn't experience problems with getting Demeter to work on Linux. He suggested using VM. I think he was using some old version of Ubuntu and if I remember correctly the issue wasn't present on older versions of Ubuntu. Nonetheless I can be wrong, since I wasn't doing anything about this for a long time.

jacawaca avatar Jul 26 '22 21:07 jacawaca