Macports X11 damaged?

Jeremy Huddleston jeremyhu at
Tue Apr 7 00:25:57 PDT 2009

On Apr 6, 2009, at 15:11, ggrubbish at wrote:

> Am Montag, 6. April 2009 schrieben Sie:
>> On Apr 2, 2009, at 10:48, ggrubbish at wrote:
>>> I'm completely new to macports, but have experience with linux
>>> debian distributions. I installed and updated apple X11 on a PPC
>>> 10.4.11.
>> Welcome to MacPorts! I'll try to answer your questions below.
> Hi Ryan, thank you for diggin in this issue!
>> The preferred way to use MacPorts with X11 apps now is to use the
>> xorg ports that come with MacPorts. You don't need to do anything
>> special to get these; simply installing the port you want will cause
>> the required xorg ports to be installed as well.
> That's the probnlem I guess. I installed macports following the wiki
> guide and therefore installed the Apple x11 server.
> But now the preferred way to install x11 apps is xorg-server, because
> apples xserver is a bit outdated, right?

Well, if you want to, you can also update the system-provided X11  
server here:

That way you don't have to worry about different X servers on the  
system.  The +system_x11 variant has actually nothing to do with the X  
server.  It is just used to determine which X11 LIBRARIES are used  
when building applications.

> As I understand some
> application doesn't build no more against the apple x11 in ppc. Maybe
> like I experienced with xpdf.

That's not true.  I'm doing almost all development on my G5 box, so I  
assure you that Leopard/ppc is a very well tested X11 environment.   
Heck, I now have firefox-3.1b3 running with plugins for video, audio,  
and pdfs provided by mozplugger on my ppc box.

> Yes I think everything is installed, but in the wrong path (apple x11
> path).

What do you mean by "apple x11 path"?  Did you enable the +system_x11  
variant?  What is the output of:
port list installed | grep xorg

> This didn't worked for me, because of the lack of e.g. x11 and xext  
> and
> so on. They were installed, but port didn't find them during
> configuration of the packages.

My guess is that you probably mixed and matched building some packages  
with and some without the variant.  Bad things happen then.

>>> This resulted in some errors:
>>> e.g.:
>>> _XFreePixmap referenced from libtk8 expected to be defined in /opt/
>>> local/lib/libX11.6.dylib
>>> collect2: ld returned 1 exit status
>>> make: *** [wish] Error 1
>>> Full report here:
>>> Then I got this error:
>>> $ > dyld: Library not loaded: /opt/local/lib/libXt.6.dylib
>>>  Referenced from: /opt/local/bin/xpdf
>>>  Reason: image not found
>>> 006989.html
>> I don't know specifically what's going on here but would first try
>> rebuilding the affected ports.
> /opt/local/lib/libX11.6.dylib isn't there as expected, but
> under /usr/X11R6/.

Well, you linked xpdf against X11 libs in /opt/local/lib, then deleted  
them by adding the +system_x11 variant.  You need to unset that  
variant and reinstall all the ports that you installed with that  
variant, then reinstall them.

>>> I got also errors on sudo port install xorg-server:
>>> checking for XLIB... configure: error: Package requirements (x11)
>>> were not met:
>>> No package 'x11' found
> It asks for the package x11

That's a pkg-config package name.  It's looking for libX11.

> Here a translated Message with additional Informations I wrote in a
> german mac forum (without any answer):
> In the first place I setup the xserver from apple, and had build
> successfully a working macports x11 environment.
> Then I tried to install and run xpdf. It installed fine but didn't  
> run.

Why didn't it run?  Was this the libXt bug that I fixed about a month  

> I think I confused the installation by following the workaround to add
> +system_x11 to the variants.conf. I guess port searches now in the
> wrong path and messed up some dependencies.

yes, that is what got your system in this borked state.

> How can I switch in this situation successfuly to   xorg-server and  
> use
> it over apples x11?

I'd recommend this if you're on Leopard:

rm -rf /opt/local
Install Macports
sudo port -v selfupdate
sudo port -v install xpdf

be happy.

> The apple xserver under Tiger is a bit outdated isn't it?Some apps  
> won't
> compile against the apple x11 under PPC.

That's correct.  Some apps look for the pkg-config files.  It's a PITA  
to support the old monolithic X11.  If you're on Tiger, your best bet  
is to NEVER THINK about using system_x11 unless you intend to live  
with or fix all the bugs you're gonna run in to.

> Quote:
> "Yes, this is expected behaviour. X had historically been an exception
> to
> the "MacPorts uses its own stuff" rule, for various reasons. Those
> reasons no longer apply, so the exception is gone.
> If you really want the old behaviour back, you can use the +system_x11
> variant (best to add it to variants.conf)."
> I'm afraid, that it wasn't that  good to follow that workaround...

As mentioned, it's al ok workaround for most ports, but you can't  
casually switch between that variant being on and off without  
rebuilding your system.

More information about the macports-users mailing list