2
$\begingroup$

The Mac package installing program "brew" suggests I remove some of these dynamic libraries, but I am worried that mathematica 9 might depend on them. As far as mathematica 9 is concerned, is it OK to remove them? And, how does one know?

Unexpected dylibs:
    /usr/local/lib/libasan.0.dylib
    /usr/local/lib/libatomic.1.dylib
    /usr/local/lib/libg2c.0.0.0.dylib
    /usr/local/lib/libg2c.0.dylib
    /usr/local/lib/libg2c.dylib
    /usr/local/lib/libgcc_ext.10.4.dylib
    /usr/local/lib/libgcc_ext.10.5.dylib
    /usr/local/lib/libgcc_s.1.dylib
    /usr/local/lib/libgfortran.3.dylib
    /usr/local/lib/libgomp.1.dylib
    /usr/local/lib/libitm.1.dylib
    /usr/local/lib/libquadmath.0.dylib
    /usr/local/lib/libssp.0.dylib
    /usr/local/lib/libstdc++.6.dylib
$\endgroup$
  • 2
    $\begingroup$ First: I can't tell for sure, so don't risk breaking your system on this. But I doubt Mathematica depends on anything in /usr/local/ as those don't come with the system. Things that don't come with the system and Mma depends on should be in the app bundle. $\endgroup$ – Szabolcs Nov 4 '13 at 23:08
  • $\begingroup$ I would keep libg2c and libgfortran, if you want RLink to work - unless you also have those libs installed elsewhere. $\endgroup$ – Leonid Shifrin Nov 5 '13 at 12:19
1
$\begingroup$

As already pointed out by Szabolcs, everything under /usr/local/ is not part of the default operating system. If you read about Filesystem Hierarchy you find a clearer explanation

Historically and strictly according to the standard, /usr/local/ is for data that must be stored on the local host (as opposed to /usr/, which may be mounted across a network). Most of the time /usr/local/ is used for installing software/data that are not part of the standard operating system distribution (in such case, /usr/ would only contain software/data that are part of the standard operating system distribution). It is possible that the FHS standard may in the future be changed to reflect this de facto convention).

Therefore, it is not possible for Mathematica to rely on anything under this location if they want to ensure that the software runs on every Mac.

I am worried that mathematica 9 might depend on them.

Why don't you check it then? The right thing for this on OSX is a terminal and otool. On my system Mathematica is installed under /Applications/Development. This is maybe different for your system. So what you do is, you open a terminal and change the directory to the place of the Mathematica binaries:

cd /Applications/Development/Mathematica.app/Contents/MacOS

then you call

otool -L Mathematica

and you get a list of all required dynamic libraries

/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0)
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI (compatibility version 1.0.0, current version 49.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
@executable_path/libaspell.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libOSMesa.1.4.dylib (compatibility version 1.4.0, current version 1.4.0)
@executable_path/../Frameworks/mathlink.framework/Versions/3.16/mathlink (compatibility version 3.16.0, current version 3.24.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 1783.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.43.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.62.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.36.0)

as you see, none of the direct dependencies lies under /usr/local

$\endgroup$
  • 1
    $\begingroup$ Thanks, I didn't know about otool. $\endgroup$ – user1416227 Nov 5 '13 at 18:55
1
$\begingroup$

I am running Mathematica V9.0.1 on OS X 10.6.8, and the files you show are not found in my /usr/local/lib directory. I conclude from this that Mathematica itself does not need these files. However, I can not rule out the possibility that some add-on package you have installed might be using them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.