• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Building Xephyr and Xsdl - X11's libGL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building Xephyr and Xsdl - X11's libGL


  • Subject: Re: Building Xephyr and Xsdl - X11's libGL
  • From: Ben Byer <email@hidden>
  • Date: Sat, 10 Nov 2007 21:48:25 -0800

(working through my emails in order...)

On Nov 10, 2007, at 4:04 PM, Jeremy Huddleston wrote:

When building Xephyr (--enable-kdrive), I noticed the following error as it tries to link Xsdl:
...
gcc -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT
[...]
L/opt/local/lib -lSDLmain /opt/local/lib/libSDL.dylib /usr/X11/lib/ libXfont.1.4.1.dylib /usr/X11/lib/libfreetype.dylib /usr/X11/lib/ libXau.6.0.0.dylib /usr/X11/lib/libfontenc.1.0.0.dylib -lz /usr/X11/ lib/libXdmcp.6.0.0.dylib -lm
ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
collect2: ld returned 1 exit status


I realize that I can just --disable-xsdl to avoid building it, but that's not the issue here. I'm wondering two things:

1) Ben, did you encounter this when you build Xephyr? Or perhaps you didn't have SDL installed on that build machine, so it was skipped

Yup, I didn't try to build it. Not sure what the advantage of it would be (well, maybe SDL can output to quartz directly? and it would use that?)


2) Has anyone looked at this problem in /usr/X11/lib/libGL.dylib? Many other sources (MacPorts, Fink, etc) are avoiding this with a workaround like '-lGL -dylib_file /System/Library/Frameworks/ OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/ Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' but it would be better to fix /usr/X11/lib/libGL.dylib

See previous message (Re: Wine and OpenGL). The workaround is to fix a linker bug, not a problem in the dylib. Use the workaround. Don't question it. ;)


3) Where are /usr/X11/lib/libGL* coming from? I don't see any Mesa or GL stuff in X11libs-15.tar.bz2

*cough*

This is the downside of Open Source -- you get to see the places I had to use duct tape to hold this all together.
The X server has a dependency on Mesa (hence --with-mesa-source=....), and libGL.dylib is (nominally) built out of the Mesa source, so it makes the most sense to build it there even though it's a library. So, it's built as part of X11server:


http://www.opensource.apple.com/darwinsource/10.5/X11server-46/build

But wait! There's more! That version support AIGLX, but not AppleDRI. Late during Leopard's development, we realized we had to support AppleDRI, so I copied in the patched Mesa from Tiger, and we build that, and we install that (and throw away the copy we built from Mesa-6.5.2).

The right way to fix this would be to merge the Apple patches against the Mesa that came with Tiger into the mainstream Mesa distribution, but I couldn't figure out how to do this. I spoke briefly with the Mesa peeps about this -- http://www.nabble.com/adding-AppleDRI-support-to-Mesa3D--t4419462.html -- but while they felt it would be easy, I spent a week trying and failed.



Now back to Xephyr, when linking Xephyr, I get the following: Undefined symbols: "_DarwinHandleGUI", referenced from: _main in libdix.a(main.o) ld: symbol(s) not found collect2: ld returned 1 exit status

You have to --disable-xdarwin when building any of the other servers. (If you find a way around this, let me know, but AFAICT we would need to build main.c a second time, specifically for Xquartz, for this work. Until then, it just requires two passes.)
--
Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer


_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)
This email sent to email@hidden


  • Follow-Ups:
    • Re: Building Xephyr and Xsdl - X11's libGL
      • From: Jeremy Huddleston <email@hidden>
References: 
 >Building Xephyr and Xsdl - X11's libGL (From: Jeremy Huddleston <email@hidden>)

  • Prev by Date: Re: Mac OS X 10.5: X11 Documentation/Release Notes
  • Next by Date: Re: Mac OS X 10.5: X11 Documentation/Release Notes
  • Previous by thread: Building Xephyr and Xsdl - X11's libGL
  • Next by thread: Re: Building Xephyr and Xsdl - X11's libGL
  • Index(es):
    • Date
    • Thread