Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Error libXft.2.dylib on MAC

Asked by Thomas on 29 Jun 2012

when I try to run an X based program out of MATLAB on the MAC I ge thte following error.

! ~/Desktop/afniIntel_64/3dmaskave
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
  Referenced from: /usr/X11/lib/libXft.2.dylib
  Reason: Incompatible library version: libXft.2.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
 ~/Desktop/afniIntel_64/3dmaskave: Trace/breakpoint trap

I works fine on Ubuntu using the same configurations.. Anyone else face similar problems?

The program is part of an NIH package fro NEuroimaging called AFNI. Current I have recoded the algorithm for 3dmaskave in MATLAB and can work around it but I need to use more modules of that package and do not wan to recode everything in MATLAB.

0 Comments

Thomas

Products

2 Answers

Answer by Thomas on 19 Jul 2012
Accepted answer

I have found the solution for the question:

MATLAB sets its own DYLD_LIBRARY_PATH on the Mac to get over some restrictions of X11.

AFNI the NIH software requires the native X11 libraries and so to run it from MATLAB I need to first unset the path MATLAB has set.

IF I run

system('unset DYLD_LIBRARY_PATH; ./3dmaskave')

it runs fine..

0 Comments

Thomas
Answer by Walter Roberson on 29 Jun 2012

I suggest using otool to see what is getting linked in the two situations.

0 Comments

Walter Roberson

Contact us