Bus error while trying to plot

Unsure if this is an issue with ROOT or macOS Sequoia, but I thought this may help others facing the same issue.

ROOT (6.22.06, 6.26.06, 6.28.06) was working fine while I was still on macOS Sonoma on my M1 MacBook Pro, but since the update, I keep encountering a Bus Error while plotting.

My initial installation was using Homebrew, but I have since then tried reinstalling from the official ROOT website, both using the direct download and trying to build from source.

I have gone through several posts on here about issues after the update and have since then tried all the steps mentioned, including updating to 6.32.06 (both from Homebrew and building from source) and updating to macOS 15.0.1 and CLT 16.0.0.0.1 but the error persists. What seems to be weird is that I have no errors while compiling or building, and ROOT works fine until I try to Draw() or open TCanvas. Here is a snippet of the error message:

root [0] TCanvas c

 *** Break *** bus error
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] PNGReadPlugin::InitializePluginData(IIOImageReadSession*, IIODictionary*, IIODictionary*, CGImageMetadata*, CGColorSpace**, ReadPluginData&, PNGPluginData&, __CFDictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOReadPlugin::callInitialize() (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::copyPropertiesAtIndex(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] CGImageSourceCopyPropertiesAtIndex (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] ImageSourceOptionsForCGImageSource_index_ (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSBitmapImageRep _imagesWithData:hfsFileType:extension:zone:expandImageContentNow:includeAllReps:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSBitmapImageRep _imageRepsWithData:hfsFileType:extension:expandImageContentNow:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSImageRep _imageRepsWithContentsOfURL:expandImageContentNow:giveUpOnNetworkURLsWithoutGoodExtensions:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] -[NSImage initWithContentsOfURL:] (no debug info)

Thoughts?


ROOT Version: 6.32.06
Platform: MacOS 15.0.1
Compiler: XCode 16.0.0.0.1


Hello @boon_toor,
welcome to the ROOT forum!

I am not sure about the causes of your issue. What if you disable web graphics by launching root --web=off? Do you still get this error?

Monica

Hi,

ROOT 6.32 does not use web graphics by default.
But you can try it if normal graphics does not work for you -
just run your macro with root -web.

Regards,
Sergey

Hey all, thanks for the suggestions! I tried that, but no change. Could it be something to do with the way some of the libraries are setup?

Which command line tool (CLT) do you have ?
You can check with:

/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables

It should be:

package-id: com.apple.pkg.CLTools_Executables
version: 16.0.0.0.1.1724870825
volume: /
location: /
install-time: 1726750321

Yup, that is what I have as well

There was a similar issue here:

What about reinstalling master from source:

git clone https://github.com/root-project/root.git root
mkdir root-build
cd root-build
cmake ../root
make -j8
source bin/thisroot.sh
root --web=off

Also here:

Update:

ROOT works using the web interface if I use root --web. However, I still cannot use the cocoa backend for graphics.

I completely removed and reinstalled both Homebrew and Command Line Tools. CMake seems to be looking in the right place:

-- Building ROOT version 6.32.06
-- Checking internet connectivity
-- Checking internet connectivity - found
-- The default C++ standard in use by the detected compiler (/Library/Developer/CommandLineTools/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.
-- Performing Test HAS_LIBCXX11
-- Performing Test HAS_LIBCXX11 - Success
-- Found a macOS system 15.0
-- Found an AArch64 system
-- ROOT default compression algorithm: zlib
-- Cannot enable cudnn without enabling cuda or tmva-gpu: cudnn is disabled.
-- Looking for ZLib
-- Building freetype version 2.12.1 included in ROOT itself
-- Looking for PCRE
-- Looking for LZMA
-- Looking for ZSTD
-- Looking for LZ4
-- Building AfterImage library included in ROOT itself
-- Looking for Python
-- Found Python3: /opt/homebrew/bin/python3.13 (found suitable version "3.13.0", minimum required is "3.8") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Looking for OpenGL
-- Looking for LibXml2
-- Looking for SQLite
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
-- Looking for XROOTD
-- Looking for BLAS for optional parts of TMVA
-- PyROOT: development package found. Building for version 3.13.0
-- Building LLVM in 'Release' mode.
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)


CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/llvm/CMakeLists.txt:6 (include)


-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found libtool - /Library/Developer/CommandLineTools/usr/bin/libtool
-- Found Python3: /opt/homebrew/bin/python3.13 (found suitable version "3.13.0", minimum required is "3.0") found components: Interpreter
-- The xar file format has been deprecated: LLVM_HAVE_LIBXAR might be removed in the future.
-- Native target architecture is AArch64
-- Threads disabled.
-- Doxygen disabled.
-- Found ld64 - /Library/Developer/CommandLineTools/usr/bin/ld
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: arm64-apple-darwin24.0.0
-- LLVM default target triple: arm64-apple-darwin24.0.0
-- Building with -fPIC
-- Targeting AArch64
-- Targeting NVPTX
CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/clang/CMakeLists.txt:6 (include)


CMake Deprecation Warning at interpreter/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  interpreter/llvm-project/clang/CMakeLists.txt:6 (include)


-- Clang version: 16.0.6
-- Host linker version: 1115.7.3
-- Building Cling as part of ROOT
-- Cling version (from VERSION file): ROOT_1.1~dev
-- Cling will look for C++ headers in '/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1' at runtime.
-- And if not found, will invoke: '/Library/Developer/CommandLineTools/usr/bin/c++ -isysroot;/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk' for them.
-- Found arc4random_buf in stdlib.h
CMake Warning at net/http/CMakeLists.txt:90 (MESSAGE):
  Not able to recognize SSL version 3.4.0, disable SSL


-- Distributed RDataFrame enabled
-- RapidYAML not found, only compiling RooFit with nlohmann-json parser
-- ROOT Configuration 

System:            Darwin-24.0.0
ROOT Platform:     macosx
ROOT Architecture: macosxarm64
Processor:         8 core Apple M1 (arm64)
Build type:        Release
Install path:      /usr/local
Compiler:          AppleClang 16.0.0.16000026
C++ standard:      17
Compiler flags:
 - C:                          -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread
 - C (built type specific):   -O3 -DNDEBUG
 - C++:                        -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++
 - C++ (built type specific): -O3 -DNDEBUG
Linker flags:
 - Executable:      -mmacosx-version-min=15.0
 - Module:         
 - Shared:         

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_davix builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_tbb builtin_vdt builtin_xxhash clad cocoa dataframe davix gdml http imt libcxx opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd
-- Configuring done (6.6s)
-- Generating done (6.4s)

That is, /Library/Developer/CommandLineTools/ is the output of xcode-select -p.

I tried otool -L root to check which libraries were being referenced and I found the following:

root:
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 24.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1800.101.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2575.20.19)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 3107.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 3107.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

What is unusual is that none of the above files seem to exist on my system?

What Kind of CPU is your Mac ? Apple or Intel ?

Apple, M1 MacBook Pro

Hey all,

The problem seemed to be with the way dynamic libraries are virtually linked. Opening the .zshrc file and changing

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/homebrew/lib/

to

export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/lib/

fixed the issue.

Thank you for your time!

1 Like