tschoonj / xmimsim

Monte Carlo simulation of energy-dispersive X-ray fluorescence spectrometers
Other
32 stars 11 forks source link

build failing for version 8.1 #62

Closed AndreWaehlisch closed 4 years ago

AndreWaehlisch commented 4 years ago

Hello, I am trying to build the newest version 8.1, but I am running into some problems.

First, when running make on the release from http://lvserver.ugent.be/xmi-msim/ I am getting the following error:

$ ./configure --enable-gui
$ make
...
  CC       libxmimsim_gui_la-xmimsim-gui-batch-assistant.lo
xmimsim-gui-batch-assistant.c: In function 'update_weight_fractions':
xmimsim-gui-batch-assistant.c:195:31: error: implicit declaration of function 'strrchr' [-Werror=implicit-function-declaration]
  gchar *xpath_close_bracket = strrchr(xpath_base, ']');
                               ^~~~~~~
xmimsim-gui-batch-assistant.c:195:31: warning: incompatible implicit declaration of built-in function 'strrchr'
xmimsim-gui-batch-assistant.c:195:31: note: include '<string.h>' or provide a declaration of 'strrchr'

I then tried to amend _xmimsim-8.1/include/xmiaux.h, by adding the string.h include.

This lead to the second error:

$ ./configure --enable-gui
$ make
...
  GISCAN   XmiMsimGui-1.0.gir
..../xmimsim-8.1/bin/tmp-introspect643apgir/.libs/XmiMsimGui-1.0: error while loading shared libraries: libxrlf03.so.7: cannot open shared object file: No such file or directory

It looks like xmimsim is looking for libxrlf03.so.7 and libxrl.so.7, while I have installed the newest xraylib 4.0 which provides libxrl.so.11. Additionally installing an old xraylib 3.3 lead to the following error:

symbol lookup error: ..../xmi-msim/xmimsim-8.1/bin/.libs/libxmimsim-gui.so.0: undefined symbol: xmi_input_free

Any advice would be appreciated!

tschoonj commented 4 years ago

Hi Andre,

What version of Linux are you building this on? Haven't seen that error yet! Anyway, I have added the header to xmimsim-gui-batch-assistant.c, and made sure that checks will happen for implicit function declarations from now on. See #63

Your second error is fishy: are you doing something with LD_LIBRARY_PATH? Is it pointing to an old version of xmi-msim ?

AndreWaehlisch commented 4 years ago

Thank you very much for your quick reply. Your idea was right on point, after removing the old installation of xmi-msim the build finished successfully!

ps.: I am running openSUSE Leap 15.1

tschoonj commented 4 years ago

Glad you managed to fix it!

By the way 8.0 introduced support to use XMI-MSIM from Python: feel free to check it out and let me know if you need any help.

Take care

Tom