issues with freeglut on mac os snow leopard (it builds fine via macports)
Asked Answered
C

1

3

im on mac os snow leopard gcc 4.5.4 | gcc 4.2.1, trying to build the tutorials http://www.arcsynthesis.org/gltut/

one needs to build dir glsdk first. I install freeglut (prerequisite) via macports freeglut @2.8.0_1 (active) and manually copy and paste its lib and include folders in dir glsdk so that ls ..../Tutorial_0_3_8/glsdk/freeglut -> include lib (I couldn't build the freeglut provided that's why I replace it with the one from macports)

after fixing many errors (mostly due to legacy snippets included) I'm testing the build in Test dir and when I try to run the generated executable ./TestD, I get:

X Error of failed request: BadRequest (invalid request code or no such operation) Major opcode of failed request: 34 (X_UngrabKey) Serial number of failed request: 28 Current serial number in output stream: 28

what's this? a bit of search suggests this is a driver's problem(?).. when I use glut with other gl code it runs just fine

Charette answered 1/9, 2012 at 15:51 Comment(4)
I would recommend compiling with options -L/opt/local/lib -I/opt/local/include, not copying files to current directory.Excretory
it doesn't help though, I get the same errorCharette
I am going over these tutorials. I am adapting them using Xcode and FLGW3. In case it is of help to anybody, I have the first two chapters here: github.com/rsanchezsaez/gltut-flgwBurschenschaft
@RicardoSánchez-Sáez good job with the port to GLFW!Charette
C
2

my X11 is broken** and this seems to be the problem. since it's tricky to build this set of tutorials, I repeat the steps I followed for anyone facing similar trouble

  1. get the source https://bitbucket.org/alfonse/gltut/downloads, untar and fill in the gaps so that you have Tutorial_0_3_8 instead of Tutorial 0 3 8
  2. in glsdk directory, comment out --"freeglut/freeglut.lua, in premake4.lua
  3. in glsdk directory, ./premake gmake and then make config=release
  4. in framework directory, framework.cpp, manually replace macros LOCAL_FILE_DIR & GLOBAL_FILE_DIR with "./data/" "./data/" & "../data/" respectively and comment out #include "directories.h"
  5. build all the tutorials in a single step from root or those that you need, e.g. in Test directory put the right paths to include for freeglut headers and link with the: in Test.make replace -I../glsdk/glutil/include and -L../glsdk/glutil/lib with paths from freeglut build via macports. Also in the same makefile link with -lglut instead of -lfreeglut

**dyld: Symbol not found: __cg_DGifGetLine Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libGIF.dylib in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO

Charette answered 5/9, 2012 at 14:21 Comment(1)
I followed the steps in this answer, but I still get the X Error of failed request: BadRequest error you posted in your question. Can you think of any other step you did?Burschenschaft

© 2022 - 2024 — McMap. All rights reserved.