Skip to content

Commit

Permalink
Refs #4204. RHEL6 needs to load stdc++ very early.
Browse files Browse the repository at this point in the history
If stdc++ is not loaded early the thrown exceptions cause crashes instead.
  • Loading branch information
martyngigg committed Nov 28, 2011
1 parent cd00ef3 commit 4bf9327
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Code/Mantid/Framework/PythonAPI/MantidFramework.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ def get_libpath(mainlib, dependency):
# ldd produces a string that always has 4 columns. The full path
# is in the 3rd column
return out.split()[2]
# stdc++ has to be loaded first or exceptions don't get translated
# properly across bounadries
# NeXus has to be loaded as well as there seems to be an issue with
# the thread-local storage not being initialized properly unles
# it is loaded before other libraries.
dlloader(get_libpath(os.path.join('libMantidKernel.so'), 'stdc++'))
dlloader(get_libpath(os.path.join('libMantidKernel.so'), 'libNeXus'))
dlloader(os.path.join(_bin, 'libMantidKernel.so'))
dlloader(os.path.join(_bin, 'libMantidGeometry.so'))
Expand Down

0 comments on commit 4bf9327

Please sign in to comment.