Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

X11 in Leopard

I'm not sure if anyone is having this problem, but I cannot open the Gimp and Inkscape anymore after upgrading to Leopard. Any suggestions?

MacBook Pro, Mac OS X (10.5), HOLY CRAP I HAVE LEOPARD!!!!!

Posted on Oct 26, 2007 9:45 AM

Reply
123 replies

Nov 15, 2007 7:10 PM in response to Michael Thorn

Hi,

Thanks for all your help! Unfortunately, I am unable to get Gimp.app 2.2.11 running. It aborts during the "Caching Fonts" stage. The problem report looks interesting, however:

Dyld Error Message:
Library not loaded: /usr/X11/lib/libfontconfig.1.dylib
Referenced from: /usr/X11R6/lib/libXft.2.dylib
Reason: Incompatible library version: libXft.2.dylib requires version 3.0.0 or later, but libfontconfig.1.dylib provides version 2.0.0

Is libfontconfig a deprecated library, or is an update available for it?

(Or am I chasing an untamed ornithoid without cause? 🙂 )

Thanks again,

Darryl

Nov 15, 2007 8:57 PM in response to djm042

djm042 wrote:
Hi,

Thanks for all your help! Unfortunately, I am unable to get Gimp.app 2.2.11 running. It aborts during the "Caching Fonts" stage. The problem report looks interesting, however:

Dyld Error Message:
Library not loaded: /usr/X11/lib/libfontconfig.1.dylib
Referenced from: /usr/X11R6/lib/libXft.2.dylib
Reason: Incompatible library version: libXft.2.dylib requires version 3.0.0 or later, but libfontconfig.1.dylib provides version 2.0.0

Is libfontconfig a deprecated library, or is an update available for it?


This may seem strange, but the error message is misleading. The libfontconfig.1.dylib it's complaining about is the one inside the Gimp.app bundle (I can't remember the exact path off-hand). The problem is that when Gimp runs, all of the libraries in the bundle take priority over the ones on your system, so the system-provided libXft is trying to link against the Gimp.app-provided libfontconfig. If you delete that libfontconfig from inside Gimp.app (or at least move it to another directory), that problem should go away.

Ben

Nov 16, 2007 4:47 PM in response to Pashadawg

This solution seems to work. I have not tried this on a ppc yet, but I think it should work, let me know. As before, follow these instructions at your own risk. Anything could happen, and I take no responsibility no matter what. Trying to do what ben byer said ago I ran into some trouble. The Leopard version that is standard seems to be the wrong version as well. I found that the versions that come with 2.4 works though. So, the trick is to just replace these libraries. Here we go, step by step....

1) Download Gimp 2.2.11

2) Download the following libraries and untar them (double click should work fine). You can get the libraries from gimp 2.4r3 too if my site doesn't work.

http://people.umass.edu/michaelt/libs.tar

3) Now, edit the files 'openDoc', 'init', and 'script' as I did for gimp 2.4r3 above (nano or textedit are both easy editors). If you have any trouble the files should look like this respectively (I have removed some of the files to make them a bit smaller:

#export "DISPLAY=`cat /tmp/$UID/TemporaryItems/display`"
exec "`dirname \"$0\"`/bin/gimp-remote" "$@"


CWD="`(cd \"\`dirname \\\"$0\\\"\`\"; echo $PWD)`"

#ps -wx -ocommand | grep -e '[X]11' > dev/null
#if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
# echo "rm -f ~/.xinitrc" > ~/.xinitrc
# sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
#fi
#
#open -a X11 || open -a XDarwin

export "FONTCONFIG_PATH=$CWD/etc/fonts"
exec "$CWD/bin/cache-fonts"


CWD="`dirname \"$0\"`"
TMP=/tmp/$UID/TemporaryItems

#ps -wx -ocommand | grep -e '[X]11' > /dev/null
#if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
# echo "rm -f ~/.xinitrc" > ~/.xinitrc
# sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
#fi
#
#mkdir -p $TMP
#cp -f "$CWD/bin/getdisplay.sh" $TMP
#rm -f $TMP/display
#open-x11 $TMP/getdisplay.sh || \
#open -a XDarwin $TMP/getdisplay.sh || \
#echo "😮" > $TMP/display
#
#while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
#export "DISPLAY=`cat $TMP/display`"
#
#ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11

cd ~/
exec "$CWD/bin/gimp" "$@"


4) You have to move or delete the three offending libraries. If you use terminal get into the Gimp.app/Contents/Resources/lib/ folder and type the following:
mkdir ~/templib
mv libfontconfig.1.dylib ~/templib/libfontconfig.1.dylib
mv libfontconfig.1.0.4.dylib ~/templib/libfontconfig.1.0.4.dylib
mv libfontconfig.dylib ~/templib/libfontconfig.dylib


It is possible you may not need to remove them all, but I did. Alternatively you can right click on Gimp.app, and click your way into Gimp.app/Contents/Resources/lib/ and just drag the three above libraries somewhere else.

5) Now essentially you need to put these libraries into Gimp.app/Contents/Resources/lib/
If, for example you downloaded the libs.tar from me and your Gimp.app was in your Applications folder you would type the following:
mv Downloads/libs/libfontconfig.1.dylib Applications/Gimp.app/Contents/Resources/lib/libfontconfig.1.dylib
mv Downloads/libs/libfontconfig.1.2.0.dylib /Applications/Gimp.app/Contents/Resources/lib/libfontconfig.1.2.0.dylib


You could also right-click on the Gimp.app and choose 'show contents' from the list. Then make your way to Gimp.app/Contents/Resources/lib/ and just drag and drop the two libraries into the folder.

Let me know if it works. If not, I will try to redo these instructions in gory detail, even more so. Hope this works for you guys.

-mike

Nov 17, 2007 7:26 AM in response to sdbale

I have the same problem. 2D plots are fine (even color), but anything 3D or spectral results in the bus error. I had a similar error (inability to plot anything 3D or spectraI, with death by segfault) on my linux machines. The problem occurs due to a patched version of libX11-6. Rolling back to a previous version fixes the problem (documented on the ITTVIS site). Who knows what's causing it in Leopard, although I'd guess they're related as Leopard is using the latest Xorg 7.x codebase.

ITTVIS has released an IDL 6.4.1 patch that is compatible with Leopard's X11, although it's not much help for those stuck on 6.3. If anyone has any information on what the 6.4.1 patch changes, especially how it might be applied to IDL 6.3, please post.

Nov 17, 2007 9:11 AM in response to Mac-oholic

I would suggest that everyone who is having trouble with X on Leopard try 3 things:
1) Try out the prerelease versions of the Xquartz and other associated programs that can be found here: http://www.x.org/wiki/XDarwin. There is a nice Quick Install script that installs all of the updated programs and programs that can be used to work around various problems.
2) Try following the directions on http://www.x.org/wiki/XDarwin_FAQ to troubleshoot your problem. Also, check http://forums.macosxhints.com/showthread.php?t=80171 to see if your question is answered there.
3) If the other two options don't work, try joining Apple's X11 users mailing list, http://lists.apple.com/mailman/listinfo/x11-users. Make sure you've tried 1 & 2 before asking a question, and provide enough detail in your question, and you should be able to get a knowledgeable answer. Ben Byer, who is Apple's X11 maintainer, is on the list as well as several other very knowledgeable people.

And, as a last resort, you can file a bug with Apple on bugreport.apple.com. It won't get your problem fixed very quickly, and if your problem is something that you just need to reconfigure rather than an actual bug, you won't get that feedback, but it does put it in Apples bug tracking system so you will know they have heard about it.

Apologies if I've repeated anything that people have already posted, but I haven't read through the entire thread yet. Following these steps has fixed all of the X11 problems I've had, so I figure they might be helpful to others.

Nov 17, 2007 9:22 PM in response to Michael Thorn

I just realized that some of my "GIMP 2.2 FIXED" note was 'wikified' when it was posted because I forgot to put <code> </code> around the code part. Where I list what the three files should look like, the strikethrough, emoticon, and the lines that begin with numbers (e.g. 1.) should not be there. Just make sure the "#" sign begins every line it needs to:

openDoc: the line that begins "export..." should be commented out with the # sign like: #export...

init: the lines between the one that begins "ps -wx..." and the one that begins "open..." should have the # sign

script: the lines between the one that begins "ps -wx..." and the one that begins "ps -wx..." should have the # sign


Sorry if I screwed anyone up...

-mike

Nov 18, 2007 5:08 AM in response to Michael Thorn

sorry michael ive commented out everywhere you say to but all gimp is doing each time is caching fonts then quitting.

Dyld Error Message:
Library not loaded: /usr/local/lib/fontconfig2/lib/libfontconfig.1.dylib
Referenced from: /Applications/Gimp.app/Contents/Resources/bin/gimp-2.2
Reason: no suitable image found. Did find:
/Applications/Gimp.app/Contents/Resources/lib/libfontconfig.1.dylib: mach-o, but wrong architecture

a bit more help if you can please

thanks alan

Nov 18, 2007 9:25 AM in response to automat

automat wrote:
I have the same problem. 2D plots are fine (even color), but anything 3D or spectral results in the bus error. I had a similar error (inability to plot anything 3D or spectraI, with death by segfault) on my linux machines. The problem occurs due to a patched version of libX11-6. Rolling back to a previous version fixes the problem (documented on the ITTVIS site). Who knows what's causing it in Leopard, although I'd guess they're related as Leopard is using the latest Xorg 7.x codebase.


Can you give me a link to this libX11 issue? I couldn't find it on their site.

ITTVIS has released an IDL 6.4.1 patch that is compatible with Leopard's X11, although it's not much help for those stuck on 6.3. If anyone has any information on what the 6.4.1 patch changes, especially how it might be applied to IDL 6.3, please post.


Not to pick nits, but CoreFoundation has implemented some more-stringent requirements for Leopard, and that is what is causing the incompatibility -- not an X11 issue. (So, for example, using Tiger's X11 wouldn't help here.)

Nov 18, 2007 10:04 AM in response to gingeralbert

gingeralbert wrote:
sorry michael ive commented out everywhere you say to but all gimp is doing each time is caching fonts then quitting.


Yeah I screwed that up didn't I... sorry. I gave you the intel libraries, as I assumed they were universal. Not the case at all so we have determined. I have uploaded new libraries, and repeated the instructions from step 4 on (1-3 are okay 1 caveat). This time I tried it out on a PPC and it seemed to work. Lets try this again....

So, do steps 1-3 above. The caveat... You can not get the libraries from gimp 2.4r3 because those are strictly intel libraries not universal. You can get them from your own machine though. They are in /usr/X11/lib/. Keep in mind if you do get them from there COPY them don't move them. Like I said above, you can also get them from me (LINK) as I have uploaded new ppc versions.

4) You have to move or delete the FOUR offending libraries in the Gimp.app. If you use terminal get into the Gimp.app/Contents/Resources/lib/ folder and type the following:
mkdir ~/templib
mv libfontconfig.1.dylib ~/templib/libfontconfig.1.dylib
mv libfontconfig.1.0.4.dylib ~/templib/libfontconfig.1.0.4.dylib
mv libfontconfig.dylib ~/templib/libfontconfig.dylib
mv libfreetype.6.dylib ~/templib/libfreetype.6.dylib

Alternatively you can right click on Gimp.app, and click your way into Gimp.app/Contents/Resources/lib/ and just drag the three above libraries somewhere else.

5) Now essentially you need to put replacement libraries into Gimp.app/Contents/Resources/lib/ .
There are several ways to do this, I think I chose the one that can be done without terminal... a few control-clicks are needed to see inside Gimp.app, otherwise just dragging around. If you are a bit more savvy I would say a quick link command would be sufficient for gimp to find the needed libraries and you could just remove the bad ones from gimp. If you downloaded the libs.tar from me (LINK) (double click it to untar it) and your Gimp.app was in your Applications folder you would type the following:
mv Downloads/libs/libfontconfig.dylib Applications/Gimp.app/Contents/Resources/lib/libfontconfig.dylib
mv Downloads/libs/libfontconfig.1.dylib Applications/Gimp.app/Contents/Resources/lib/libfontconfig.1.dylib
mv Downloads/libs/libfontconfig.1.1.0.dylib /Applications/Gimp.app/Contents/Resources/lib/libfontconfig.1.1.0.dylib
mv Downloads/libs/libfreetype.6.dylib Applications/Gimp.app/Contents/Resources/lib/libfreetype.6.dylib


There is one more thing you need to do if you haven't already. You need to apply the patches to X11 given at the X11 users page. I would suggest using the install script as it is the simplest, and updates everything. If you only want the part that fixes Gimp, scroll down the page until you find that part of the instructions. Here is a link. You can just open a terminal and type the following too:

curl -LO http://cloud.cs.berkeley.edu/~jeremy/X11/x11_update.sh
sudo sh x11_update.sh


That should be it. I hope this works for you.

-mike

Nov 18, 2007 10:31 AM in response to bbyer

bbyer wrote:
Can you give me a link to this libX11 issue? I couldn't find it on their site.

The article on the ITTVIS site ( http://www.ittvis.com/services/techtip.asp?ttid=4177) details the libX11 problem and fix in section II. The article indicates that the patches to libX11 originated in Debian (and thus Ubuntu) to fix a buffer overflow error. There is nothing to indicate that the patches have made it upstream in to Xorg proper, although it looks like almost all major distributions have included the patch in their latest X11. In all cases, the problem is "fixed" for IDL 6.3 by downgrading libX11, and thus re-opening the potential buffer overflow, or by moving on to IDL 6.4.
automat wrote:
ITTVIS has released an IDL 6.4.1 patch that is compatible with Leopard's X11, although it's not much help for those stuck on 6.3. If anyone has any information on what the 6.4.1 patch changes, especially how it might be applied to IDL 6.3, please post.

bbyer wrote:
Not to pick nits, but CoreFoundation has implemented some more-stringent requirements for Leopard, and that is what is causing the incompatibility -- not an X11 issue. (So, for example, using Tiger's X11 wouldn't help here.)

I'm glad I didn't downgrade X11! Good to know. I'm pressing for the move to IDL 6.4 with patched Leopard support--we have a site license, but haven't migrated the license server from 6.3->6.4. For now, I've got my old Tiger installation cloned to an external drive for running contour or spectral plots. Let me know what you find out regarding libX11. In any case, downgrading the lib is really not a solution--I'll push for the move to IDL 6.4 (or 7.0, for that matter).

Nov 18, 2007 11:42 AM in response to automat

automat wrote:
bbyer wrote:
Can you give me a link to this libX11 issue? I couldn't find it on their site.

The article on the ITTVIS site ( http://www.ittvis.com/services/techtip.asp?ttid=4177) details the libX11 problem and fix in section II. The article indicates that the patches to libX11 originated in Debian (and thus Ubuntu) to fix a buffer overflow error. There is nothing to indicate that the patches have made it upstream in to Xorg proper, although it looks like almost all major distributions have included the patch in their latest X11.


It took a little bit of digging, but that Debian patch made it into X.org here: http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=commit;h=7dc7ef398b6ad90c cd1680ed9cd1cfdd47312f5a

... which fell between X.org's 1.1.1 and 1.1.2 releases. Leopard shipped with 1.1.2 (which had a bad flaw in it, so I've made available a built version of 1.1.3), so that's one bug that should not be responsible for the problems you're seeing.

That's all, carry on. 🙂
Ben

Nov 18, 2007 1:10 PM in response to bbyer

bbyer wrote:
automat wrote:
bbyer wrote:
Can you give me a link to this libX11 issue? I couldn't find it on their site.

The article on the ITTVIS site ( http://www.ittvis.com/services/techtip.asp?ttid=4177) details the libX11 problem and fix in section II. The article indicates that the patches to libX11 originated in Debian (and thus Ubuntu) to fix a buffer overflow error. There is nothing to indicate that the patches have made it upstream in to Xorg proper, although it looks like almost all major distributions have included the patch in their latest X11.


It took a little bit of digging, but that Debian patch made it into X.org here: http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=commit;h=7dc7ef398b6ad90c cd1680ed9cd1cfdd47312f5a

... which fell between X.org's 1.1.1 and 1.1.2 releases. Leopard shipped with 1.1.2 (which had a bad flaw in it, so I've made available a built version of 1.1.3), so that's one bug that should not be responsible for the problems you're seeing.

That's all, carry on. 🙂
Ben

In the case of Debian based distros, it was necessary to revert to a version of libX11 pre- 1.1.2 release (Debian actually dropped back to 1.0.2, whereas Mandriva rolls back to 1.1.1). So if it is the libX11 patch that's causing the error on Leopard's X11 (as in the case of my linux machines), it would be necessary to build an old version of libX11 for Leopard. On linux, it was possible to downgrade only libX11 without affecting the rest of the Xorg distribution. Would this be even remotely feasible on Leopard?

I know it's inherently stupid to roll back to a broken lib (if its even possible), but it would be a good temporary solution until we can sort out the switch to the IDL 6.4 license server.

X11 in Leopard

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.