Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails on OS X #24

Closed
nsc opened this issue Jun 4, 2011 · 4 comments
Closed

build fails on OS X #24

nsc opened this issue Jun 4, 2011 · 4 comments

Comments

@nsc
Copy link

nsc commented Jun 4, 2011

$ cmake -H. -Bbuild
-- checking for module 'QJson>=0.5'
-- package 'QJson>=0.5' not found
-- Could NOT find QJSON (missing: QJSON_LIBRARIES QJSON_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nsc/install/apitrace/build

$ make -C build
[ 4%] Generating glproc.hpp
[ 8%] Generating cgltrace.cpp
[ 12%] Building CXX object CMakeFiles/cgltrace.dir/cgltrace.cpp.o
[ 16%] Building CXX object CMakeFiles/cgltrace.dir/trace_writer.cpp.o
[ 20%] Building CXX object CMakeFiles/cgltrace.dir/os_posix.cpp.o
Linking CXX shared library wrappers/OpenGL
[ 20%] Built target cgltrace
[ 25%] Building CXX object CMakeFiles/trace.dir/trace_model.cpp.o
[ 29%] Building CXX object CMakeFiles/trace.dir/trace_parser.cpp.o
[ 33%] Building CXX object CMakeFiles/trace.dir/trace_writer.cpp.o
[ 37%] Building CXX object CMakeFiles/trace.dir/trace_model_writer.cpp.o
[ 41%] Building CXX object CMakeFiles/trace.dir/os_posix.cpp.o
Linking CXX static library libtrace.a
[ 41%] Built target trace
[ 45%] Generating glretrace_gl.cpp
[ 50%] Generating glstate_params.cpp
[ 54%] Building CXX object CMakeFiles/glretrace.dir/glretrace_gl.cpp.o
[ 58%] Building CXX object CMakeFiles/glretrace.dir/glretrace_cgl.cpp.o
[ 62%] Building CXX object CMakeFiles/glretrace.dir/glretrace_glx.cpp.o
[ 66%] Building CXX object CMakeFiles/glretrace.dir/glretrace_wgl.cpp.o
[ 70%] Building CXX object CMakeFiles/glretrace.dir/glretrace_main.cpp.o
[ 75%] Building CXX object CMakeFiles/glretrace.dir/glstate.cpp.o
[ 79%] Building CXX object CMakeFiles/glretrace.dir/glstate_params.cpp.o
[ 83%] Building CXX object CMakeFiles/glretrace.dir/retrace.cpp.o
[ 87%] Building CXX object CMakeFiles/glretrace.dir/glws_glx.cpp.o
/Users/nsc/install/apitrace/glws_glx.cpp:33:20: error: GL/glx.h: No such file or directory
/Users/nsc/install/apitrace/glws_glx.cpp:46: error: ISO C++ forbids declaration of ‘XVisualInfo’ with no type
/Users/nsc/install/apitrace/glws_glx.cpp:46: error: expected ‘;’ before ‘’ token
/Users/nsc/install/apitrace/glws_glx.cpp:48: error: expected `)' before ‘
’ token
/Users/nsc/install/apitrace/glws_glx.cpp: In destructor ‘virtual glws::GlxVisual::~GlxVisual()’:
/Users/nsc/install/apitrace/glws_glx.cpp:53: error: ‘visinfo’ was not declared in this scope

...

@jrfonseca
Copy link
Member

What is the output of "find /usr /Developer -name glx.h" on your system?

$ find /usr /Developer -name glx.h
/usr/X11/include/GL/glx.h
/usr/X11/include/xcb/glx.h
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/GL/glx.h
/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/xcb/glx.h
/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/GL/glx.h
/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/xcb/glx.h

Also, please remove the build subdirectory, and paste the output of running "cmake -H. -Bbuild" the first time immediately after.

@nsc
Copy link
Author

nsc commented Jun 6, 2011

Hm, seems to be a problem with my configuration at home.
I tried on two different machines, that have glx.h in the same places as above and it builds just fine.
I keep you posted.

@jrfonseca
Copy link
Member

MacOSX has two OpenGL implementations (one for GLX, another for native apps) and I've found a couple of inconsistencies in how they were being linked. I've pushed a few fixes, which should either fix the problem, or give more helpful error messages. Please update and let me know if it helped your case.

@nsc
Copy link
Author

nsc commented Jun 7, 2011

Thanks a lot. With your fixes it now builds without complaints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants