[GRASS-user] Problems with OpenGL when compiling grass-6.4.0 on
Mac OS X 10.5.4
elvis.dowson at mac.com
Sun Sep 21 13:20:06 EDT 2008
Upon looking more closely at the config.log
configure:11340: gcc -o conftest -g -O2 conftest.c -lGL 1>&5
ld: library not found for -lGL
collect2: ld returned 1 exit status
configure: failed program was:
I see that ld could not find the GL libraries for some reason.
However, I have put this in my .profile. The location I have put is
usr/X11/lib . Is this the correct location?
# environment variables
# the path is initially set to "/usr/bin:/bin:/usr/sbin:/sbin:/usr/
On Sep 21, 2008, at 7:58 PM, William Kyngesburye wrote:
> On Sep 21, 2008, at 1:23 AM, Elvis Dowson wrote:
>> Hi Michael,
>> Thanks for the reply.
>> Could you please tell me what I should do to make it work with X11?
>> I am not
>> planning to use TclTk. I am planning to use vtk-5.2.0 and Qt-4.4.1.
>> What I need to do is to link grass-6.4.0 or 7.0.0 with X11 and then
>> get it
>> to work inside vtk-5.2.0. I will then try to use the QVTK plug in
>> to create
>> a vtkRenderingContext using Qt.
> Just a note: the TclTk GUI may be dropped in GRASS 7.
>> So far, I have managed to get vtk-5.2.0 and qt-4.4.1 compiled and
>> I just have been stuck with getting any version of grass to compile
>> on Mac
>> OS X 10.5.4 using Xcode-3.1.1.
> Hmm, it should work without any patching.
>> X11 is broken on Leopard, it is impossible to compile programs
>> against it (more precisely whenever libGL is touched - directly or
>> indirectly). The easiest way to fix it is as follows:
>> cd /usr/X11/lib
>> sudo bash
>> # enter your password
>> mv libGL.dylib libGL.dylib.apple
>> ln -s /System/Library/Frameworks/OpenGL.framework/Libraries/
>> libGL.dylib .
>> This fixed the problem of ./configure being able to locate the
>> OpenGL libraries.
> I don't know where you came up with this - X11/OpenGL has always
> worked (with the exception of the broken linker in Xcode 3.0 which
> is fixed in 3.1).
> What is your configure command? Some things are supposed to be
> automatically detected, but being explicit can help. See the macosx/
> readme in the source for an example (much like Michael's
> configure). Sometimes you may need to give the OpenGL or X11
> configure options some help.
> It's possible something is broken or misconfigured in your system.
> I hate to ask, but do you have Fink or MacPorts installed? These
> add to your shell PATH and may do other shell configurations that
> can silently cause trouble.
>> I have three copies of libGL.dylib. They are in the
>> following folders:
>> Which is the correct one?
> For X11, the X11 copy. The one in the SDK is just a duplicate of
> the system framework, and will be used automatically if you use the -
> isysroot flag. And in the end, X11 OpenGL gets much of its low-
> lewel functionality from the system framework. With disabling the
> X11 OpenGL and symlinking the framework, as you did at the start,
> you lose the X11-specific functions, like glX.
> So, I'd say you should restore the original X11 OpenGL library, then
> figure out why configure can't find it. For configure errors, look
> in config.log for more detail why a test failed.
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> "Those people who most want to rule people are, ipso-facto, those
> least suited to do it."
> - A rule of the universe, from the HitchHiker's Guide to the Galaxy
More information about the grass-user