<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Courier; color: rgb(153, 102, 51); "><div><div></div><div><br></div><div><font class="Apple-style-span" color="#000000" face="Arial">Best regards,</font></div><div><font class="Apple-style-span" color="#000000" face="Arial"><br></font></div><div><font class="Apple-style-span" color="#000000" face="Arial">Elvis Dowson</font></div><div><br></div></div></div></div><div><br><div><div>On Sep 21, 2008, at 10:20 PM, William Kyngesburye wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Sep 21, 2008, at 12:20 PM, Elvis Dowson wrote:<br><br><blockquote type="cite">Hi William,<br></blockquote><blockquote type="cite"> Upon looking more closely at the config.log<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">configure:11340: gcc -o conftest -g -O2 conftest.c -lGL 1>&5<br></blockquote><blockquote type="cite">ld: library not found for -lGL<br></blockquote><blockquote type="cite">collect2: ld returned 1 exit status<br></blockquote><blockquote type="cite">configure: failed program was:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I see that ld could not find the GL libraries for some reason.<br></blockquote><blockquote type="cite"><br></blockquote>One thing to watch out for is the -g flag. This causes configure errors with the latest Xcode. export CFLAGS and CXXFLAGS with -Os before configuring.<br><br>export CFLAGS=-Os<br>export CXXFLAGS=-Os<br><br>If you need debug symbols, add -g back into platform.make after configuration (to CFLAGS1 & CXXFLAGS1).<br><br><blockquote type="cite">However, I have put this in my .profile. The location I have put is usr/X11/lib . Is this the correct location?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># environment variables<br></blockquote><blockquote type="cite">export QTROOT=/usr/local/qt-4.4.1<br></blockquote><blockquote type="cite">export GRASS_TCLSH=/usr/X11R6/bin/tclsh<br></blockquote><blockquote type="cite">export GRASS_WISH=/usr/X11R6/bin/wish<br></blockquote><blockquote type="cite">export VTK_DIR=/Users/elvis/Tool/vtk-5.2.0/src<br></blockquote><blockquote type="cite">export VTK_LIB_DIR=/usr/local/lib/vtk-5.2<br></blockquote><blockquote type="cite">export X11_LIB_DIR=/usr/X11/lib<br></blockquote><blockquote type="cite">#export OPENGL_LIB_DIR=/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># the path is initially set to "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"<br></blockquote><blockquote type="cite">export PATH=$PATH:$QTROOT/bin<br></blockquote><blockquote type="cite">export LD_LIBRARY_PATH=$VTK_LIB_DIR:$X11_LIB_DIR:$LD_LIBRARY_PATH<br></blockquote><blockquote type="cite">export DYLD_LIBRARY_PATH=$VTK_LIB_DIR:$X11_LIB_DIR:$DYLD_LIBRARY_PATH<br></blockquote><blockquote type="cite"><br></blockquote>Setting DYLD_LIBRARY_PATH is unnecessary on OSX. If you have to do it for VTK, then the VTK build is broken. LD_LIBRARY_PATH is the linux version of this and is not needed on OSX.<br><br>DYLD_LIBRARY_PATH only affects the finding of libraries at runtime, not linking as in configure tests. And properly built libraries on OSX should have the path built into them so they're found at runtime without DYLD_LIBRARY_PATH. Though GRASS does use this as a neat trick (as a side effect) to make the binaries relocatable.<br><br><blockquote type="cite"><br></blockquote><br><br><blockquote type="cite">Here is my configure command<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">./configure --with-cxx --prefix=/Applications/GRASS --enable-macosx-app --with-x --with-cxx --with-opengl=aqua --without-readline --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-opengl-includes=/usr/X11R6/include<br></blockquote><blockquote type="cite"><br></blockquote>This is probably what is confusing the build - you set --with-opengl=aqua, yet set the opengl includes and libs to X11. These options can't be used together. Configure should force the includes and libs based on the opengl value, but to be sure just use --with-opengl, which defaults to X11, and you probably won't need the includes/libs options.<br><br>Also note that you need to compile your own tcltk for X11, and set those options for the GRASS configure. See the grass source osx readme for details.<br><br><br><blockquote type="cite">If I use the -with-opengl=x11 option, I get the following configuration error<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">checking for location of OpenGL library...<br></blockquote><blockquote type="cite">checking for glBegin in -lGL... yes<br></blockquote><blockquote type="cite">checking for gluBeginCurve in -lGLU... yes<br></blockquote><blockquote type="cite">checking for glXCreatePbuffer... no<br></blockquote><blockquote type="cite">configure: error: *** Unable to locate .<br></blockquote><blockquote type="cite"><br></blockquote><br><blockquote type="cite">configure:10998: checking for location of OpenGL library<br></blockquote><blockquote type="cite">configure:11027: checking for glBegin in -lGL<br></blockquote><blockquote type="cite">configure:11044: gcc -o conftest -g -O2 conftest.c -lGL -L/usr/X11R6/lib -lSM -lICE -lX11 1>&5<br></blockquote><blockquote type="cite">configure:11214: checking for gluBeginCurve in -lGLU<br></blockquote><blockquote type="cite">configure:11231: gcc -o conftest -g -O2 conftest.c -lGLU -lGL -L/usr/X11R6/lib -lSM -lICE -lX11 1>&5<br></blockquote><blockquote type="cite">configure:11314: checking for glXCreatePbuffer<br></blockquote><blockquote type="cite">configure:11340: gcc -o conftest -g -O2 conftest.c -lGL 1>&5<br></blockquote><blockquote type="cite">ld: library not found for -lGL<br></blockquote><blockquote type="cite">collect2: ld returned 1 exit status<br></blockquote><blockquote type="cite"><br></blockquote><br>This is strange - configure is inserting the X11 lib path for the glBegin and gluBeginCurve tests, but not for the glXCreatePbuffer test. Oh, I'm getting that also, but it's not keeping compilation from working. This is just testing for the availability of pbuffers, and GRASS has a fallback if that's not available.<br><br>So, your make error log doesn't have the needed info. You need to look way back in the shell scrollback to see what the actual error is. You may need to change your Terminal window settings to unlimited scrollback.<br><br>-----<br>William Kyngesburye <kyngchaos*at*kyngchaos*dot*com><br><a href="http://www.kyngchaos.com/">http://www.kyngchaos.com/</a><br><br>Earth: "Mostly harmless"<br><br>- revised entry in the HitchHiker's Guide to the Galaxy<br><br><br></div></blockquote></div><br></div></body></html>