Flair geometry and DICOM

Hi Fluka team,

I am running Fluka on Mac OS environment with M4 processor. I was using the previous version of Flair (3.4-3) and the display was working fine for geometry display and calculation purposes. When I tried to import the DICOM file I ran into an issue in the sense that clicking on the Flair DICOM tab and importing a DICOM file would not work. The list of available DICOM files would be empty, even if I tested the file with a DICOM viewer and was sure about its location. When I downloaded and installed the new version of Flair (3.4-4) I was able to access the DICOM files, which solved my initial problem, but could not display geometries. As soon as I am clicking on the “geometry” tab, the system crashes with this error:

./flair: line 18: 24535 Bus error: 10 PYTHON−O−Wignore{DIR}/flair.py “$@”

Another thing is that the display is not as usual, the background is black on the “input” display and file explorer making it hard to read (black font on black background). I tried to reinstall Python, geo viewer, X11 etc but could not fix the issue and cannot use the DICOM nor have a stable display. Not sure what I can try next.

Dear @guemnietafoa,

Normally, updating Flair shouldn’t disrupt its functionalities. However, the issue might be due to changes in the MacPorts environment.

Have you looked at this post? Flair on macOS Sequoia 15.2 - #9 by luillo

If this doesn’t solve the problem, please provide the output of these commands:

  • sw_vers -productVersion
  • pkgutil —pkg-info=com.apple.pkg.CLTools_Executables
  • xcodebuild -version
  • gfortran -v
  • echo $PATH
  • port echo requested
  • port select —summary
  • port installed | grep -w tk
  • echo $DISPLAY

Best,

Luigi

Indeed I did update all the Macports.

I did try the post you referred to before and tried it again but it did not change Flair behavior. Thanks again for your help. Please find bellow the output of the commands.

  • sw_vers -productVersion: 15.6.1

  • pkgutil —pkg-info=com.apple.pkg.CLTools_Executables: 16.4.0.0.1.1747106510

  • xcodebuild -version: xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance

  • gfortran -v: Using built-in specs.

    COLLECT_GCC=gfortran

    COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/aarch64-apple-darwin24/13.4.0/lto-wrapper

    Target: aarch64-apple-darwin24

    Configured with: /opt/local/var/macports/build/gcc13-a82e608c/work/gcc-13.4.0/configure --prefix=/opt/local --build=aarch64-apple-darwin24 --enable-languages=c,c++,objc,obj-c++,lto,fortran,m2,jit --libdir=/opt/local/lib/gcc13 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-13 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-13 --with-gxx-include-dir=/opt/local/include/gcc13/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc13/libc++/include/c++/v1 --with-pkgversion=‘MacPorts gcc13 13.4.0_1+stdlib_flag’ --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk

    Thread model: posix

    Supported LTO compression algorithms: zlib zstd

  • echo $PATH: /Users/alain/EGSnrc/EGSnrc/egs_home/bin/osx:/Users/alain/EGSnrc/EGSnrc/HEN_HOUSE/bin/osx:/Users/alain/EGSnrc/EGSnrc/HEN_HOUSE/scripts/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin

  • port echo requested:

Warning: port definitions are more than two weeks old, consider updating them by running ‘port selfupdate’.

gcc13 13.3.0_2+stdlib_flag

gcc13 13.4.0_1+stdlib_flag

gdb 15.1_015.1_0

gdb 16.3_0 16.3_0

ghostscript 10.05.1_0+x11

ghostscript 10.06.0_0+x11

gnuplot 6.0.3_0+aquaterm+luaterm+pangocairo+qt5+wxwidgets

gnuplot 6.0.3_2+aquaterm+luaterm+pangocairo+qt5+wxwidgets

py311-matplotlib 3.10.6_1+tkinter

py311-pip 25.1.1_0 25.1.1_0

py311-pydic 3.0.1_0m 3.0.1_0

py311-scipy 1.16.2_1+accelerate+gfortran

py312-matplotlib 3.10.6_1+tkinter

py31@25.1.1_0-pip 25.1.13.0.1_00

py312-pydicom 3.0.1_0

py312-scipy 1.16.2_1+accelerate+gfortran

py313-matplotlib 3.10.3_0+tkinter

py313-matplotlib 3.10.6_ 3.0.1_0+tkinter

py313-pydicom 3.0.1_0

py313-scipy 1.16.0_0+accelerate+gfortran

py313-scipy 1.16.2_1+acc 3.13.7_0lerate+gfortran

py313-tkinter 3.13.7_0

tk 8.6.16_0+x11

tk 20090316_0 8.6.17_0+x11

xorg 1.20.11_1 20090316_0 398_0

xorg-server 402_0.20.11_1

xterm 398_0

xterm 402_0

  • port select —summary:Name Selected Options

    ==== ======== =======

    clang none mp-clang-19 none

    fonttools fonttools-313 fonttools-311 fonttools-312 fonttools-313 none

    gcc mp-gcc13 mp-gcc13 none

    llvm none mp-llvm-19 mp-llvm-21 none

    mypy none mypy311 mypy312 mypy313 none

    pip none pip3-apple pip311 pip312 none

    pip2 none none

    pip3 none pip3-apple pip311 pip312 none

    python python313 python311 python312 python313 none

    python3 python313 python311 python312 python313 none

    wxWidgets none wxWidgets-3.0 wxWidgets-3.2 none

  • port installe | grep -w tk: tk8.6.16_0+x11

    tk 8.6.17_0+x11 (active)

    tk-quartz 8.6.16_0

    tk-quartz 8.6.17_0 (active)

    tk-x11 8.6.16_0

    tk-x11 8.6.17_0 (active)

  • echo $DISPLAY: :0.0

Dear @guemnietafoa,

I see you have a mixed environment with HomeBrew, MacPorts, and EGSnrc. I think your Python executable isn’t from MacPorts. You can check this with the command which python3.

In this case, I suggest you follow the instructions in this thread: SIGBUS error on first run - #7 by luillo
In particular, steps 1-4.

Let me know.

Best, Luigi

Dear Luigi,

I did follow the instruction on the thread and did as indicated but it did not solve the problem I have.

After creating a ~/.zshrc file (I am using zsh environment) and enter the given parameters

set_MacPorts() { echo “set MacPorts environment to compile FLUKA” export PATH=“/opt/local/bin:/opt/local/sbin:PATH" } set_HomeBrew() { echo "set HomeBrew environment for the GitLab runner" eval "(/usr/local/bin/brew shellenv)” }

I ran an echo $PATH and I could still see a Homebrew directory. I did the same procedure again but it did not make it disappear. I continued on all the way to step 6 as described and saw the same issue on Flair (Display + boot out when clicking on Geometry tab). Any other advice that I can follow?

Dear @guemnietafoa ,

You need to identify in which environment file the HomeBrew variables are set.
This is typically in ~/.zprofile according to HomeBrew documentation.

Once you’ve implemented the changes suggested earlier, test in a new Terminal.

Cheers, Luigi

Hi Luigi,

Perfect, it worked!! Thanks for your help