tschoonj / xraylib

A library for X-ray matter interaction cross sections for X-ray fluorescence applications
https://github.com/tschoonj/xraylib/wiki
Other
123 stars 56 forks source link

Not installing in Homebrew #85

Closed NGeorgescu closed 5 years ago

NGeorgescu commented 6 years ago

Hi,

I am having a hard time installing in homebrew 1.7.1 on OSX 10.13.6. The following

$ brew install brewsci/science/xmi-msim
==> Installing xmi-msim from brewsci/science
==> Installing dependencies for brewsci/science/xmi-msim: isl, gsl, fgsl, gdbm, libxml2, libxslt, glib, szip, hdf5, swig, xraylib
==> Installing brewsci/science/xmi-msim dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.20.high_sierra.bottle
######################################################################## 100.0%
==> Pouring isl-0.20.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/isl/0.20: 71 files, 3.9MB
==> Installing brewsci/science/xmi-msim dependency: gsl
==> Downloading https://homebrew.bintray.com/bottles/gsl-2.5.high_sierra.bottle.
######################################################################## 100.0%
==> Pouring gsl-2.5.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/gsl/2.5: 271 files, 9.2MB
==> Installing brewsci/science/xmi-msim dependency: fgsl
==> Downloading https://www.lrz.de/services/software/mathematik/gsl/fortran/down
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/fgsl/1.2.0_3
==> make
==> make check
==> make install
๐Ÿบ  /usr/local/Cellar/fgsl/1.2.0_3: 1,039 files, 16.9MB, built in 2 minutes 15 seconds
==> Installing brewsci/science/xmi-msim dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.17.high_sierra.bottl
######################################################################## 100.0%
==> Pouring gdbm-1.17.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/gdbm/1.17: 20 files, 581.4KB
==> Installing brewsci/science/xmi-msim dependency: libxml2
==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.7.high_sierra.b
######################################################################## 100.0%
==> Pouring libxml2-2.9.7.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/libxml2/lib
    CPPFLAGS: -I/usr/local/opt/libxml2/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/libxml2/lib/pkgconfig

==> Summary
๐Ÿบ  /usr/local/Cellar/libxml2/2.9.7: 281 files, 10.4MB
==> Installing brewsci/science/xmi-msim dependency: libxslt
==> Downloading https://homebrew.bintray.com/bottles/libxslt-1.1.32.high_sierra.
######################################################################## 100.0%
==> Pouring libxslt-1.1.32.high_sierra.bottle.tar.gz
==> Caveats
To allow the nokogiri gem to link against this libxslt run:
  gem install nokogiri -- --with-xslt-dir=/usr/local/opt/libxslt

This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxslt/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/libxslt/lib
    CPPFLAGS: -I/usr/local/opt/libxslt/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/libxslt/lib/pkgconfig

==> Summary
๐Ÿบ  /usr/local/Cellar/libxslt/1.1.32: 148 files, 3MB
==> Installing brewsci/science/xmi-msim dependency: glib
==> Downloading https://homebrew.bintray.com/bottles/glib-2.56.1.high_sierra.bot
######################################################################## 100.0%
==> Pouring glib-2.56.1.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/glib/2.56.1: 430 files, 23.7MB
==> Installing brewsci/science/xmi-msim dependency: szip
==> Downloading https://homebrew.bintray.com/bottles/szip-2.1.1_1.high_sierra.bo
######################################################################## 100.0%
==> Pouring szip-2.1.1_1.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/szip/2.1.1_1: 11 files, 108.7KB
==> Installing brewsci/science/xmi-msim dependency: hdf5
==> Downloading https://homebrew.bintray.com/bottles/hdf5-1.10.2_1.high_sierra.b
######################################################################## 100.0%
==> Pouring hdf5-1.10.2_1.high_sierra.bottle.tar.gz
Warning: hdf5 dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
๐Ÿบ  /usr/local/Cellar/hdf5/1.10.2_1: 261 files, 15MB
==> Installing brewsci/science/xmi-msim dependency: swig
==> Downloading https://homebrew.bintray.com/bottles/swig-3.0.12.high_sierra.bot
######################################################################## 100.0%
==> Pouring swig-3.0.12.high_sierra.bottle.tar.gz
๐Ÿบ  /usr/local/Cellar/swig/3.0.12: 755 files, 5.5MB
==> Installing brewsci/science/xmi-msim dependency: xraylib
==> Downloading https://xraylib.tomschoonjans.eu/xraylib-3.3.0.tar.gz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/xraylib/3.3.0 --disabl
==> make
==> make install
๐Ÿบ  /usr/local/Cellar/xraylib/3.3.0: 34 files, 33.8MB, built in 1 minute 9 seconds
==> Installing brewsci/science/xmi-msim
==> Downloading https://homebrew.bintray.com/bottles-science/xmi-msim-7.0.high_s
######################################################################## 100.0%
==> Pouring xmi-msim-7.0.high_sierra.bottle.tar.gz
==> Generating xmimsimdata.h5 โ€“ this may take a while
==> /usr/local/Cellar/xmi-msim/7.0/bin/xmimsim-db
Last 15 lines from /Users/nsg/Library/Logs/Homebrew/xmi-msim/post_install.01.xmimsim-db:
2018-08-02 14:57:28 -0400

/usr/local/Cellar/xmi-msim/7.0/bin/xmimsim-db

dyld: Library not loaded: /usr/local/opt/xraylib/lib/libxrlf03.7.dylib
  Referenced from: /usr/local/Cellar/xmi-msim/7.0/bin/xmimsim-db
  Reason: image not found
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall brewsci/science/xmi-msim`
==> Summary
๐Ÿบ  /usr/local/Cellar/xmi-msim/7.0: 65 files, 9.9MB
==> Caveats
==> libxml2
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/libxml2/lib
    CPPFLAGS: -I/usr/local/opt/libxml2/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/libxml2/lib/pkgconfig

==> libxslt
To allow the nokogiri gem to link against this libxslt run:
  gem install nokogiri -- --with-xslt-dir=/usr/local/opt/libxslt

This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/libxslt/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/libxslt/lib
    CPPFLAGS: -I/usr/local/opt/libxslt/include
For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/libxslt/lib/pkgconfig

However xmimsim fails to run:

$ xmimsim
dyld: Library not loaded: /usr/local/opt/xraylib/lib/libxrlf03.7.dylib
  Referenced from: /usr/local/bin/xmimsim
  Reason: image not found
Abort trap: 6

The problem is not confined to xmimsim:

$ xraylib
Traceback (most recent call last):
  File "/usr/local/bin/xraylib", line 20, in <module>
    from xraylib import *
ModuleNotFoundError: No module named 'xraylib'

In case it matters, I am using brew-installed python2.7 as my default python. I can't seem to get it to run at all. Even the dmg of xmimsim crashes upon first boot up. Any help is appreciated.

Thanks in advance.

tschoonj commented 6 years ago

When the homebrew-science was closed down, many formulas were moved to brewsci, but I was not involved in this, and I do not support my old formulas in this tap.

Instead I moved xraylib and xmi-msim to my own home-brew tap at https://github.com/tschoonj/homebrew-tap. You may want to try it there.

However, since you are a Mac user, why not use the XMI-MSIM app which you can download from http://lvserver.ugent.be/xmi-msim?

NGeorgescu commented 6 years ago

Works great, thanks!

you may consider editing this page: https://github.com/tschoonj/xmimsim/wiki/Installation-instructions which is the top result for googling "xmimsim install" to reflect this.

NGeorgescu commented 5 years ago

Hey by the way, @tschoonj , I made an xmimsim library as a frontend for python.

https://pypi.org/project/xmimsim/

https://github.com/NGeorgescu/xmimsim

tschoonj commented 5 years ago

Cool, will check it out.

I have wanted to do something like this for quite some time, but using cython and gobject-introspection instead of pure python so I can use the C and Fortran routines for I/O and launching the simulations.

but no time ๐Ÿ˜ข

With some luck I should be able to push out a new XMI-MSIM release early next year...

tschoonj commented 5 years ago

The xraylib and xmi-msim wikis have (finally) been updated with proper instructions for installation through Homebrew.

I have also put several fixes into the xraylib formula itself...

Thanks again for opening this issue!