matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

A little build problem #29

Closed adamcavendish closed 10 years ago

adamcavendish commented 10 years ago

My Environment: Kubuntu 13.04 64-bit, 3.11.0-13-generic

I don't know whether GL3W is required or not on Linux, if it is not required it may be deleted from dependency.

  1. There's an warning from cmake that "OGLplus library cannot be built!", meanwhile it succeeded in configuring.
  2. I'm suffering from a build error and hope that will help.

    This is configure info:

-- Found GLEW: /usr/include/GL /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Could NOT find GL3W
-- Found GLFW: /usr/include /usr/lib/libglfw.so
-- Found GLFW3: /usr/local/include glfw3;rt;Xrandr;Xi;GL;m;dl;Xrender;drm;Xdamage;X11-xcb;xcb-glx;xcb-dri2;Xxf86vm;Xfixes;Xext;X11;pthread;xcb;Xau;Xdmcp
-- Found SDL: /usr/include/SDL /usr/lib/x86_64-linux-gnu/libSDL.so
-- GLM header files not found
-- Found PNG: /usr/include /usr/lib/x86_64-linux-gnu/libpng.so
-- Found Pango/Cairo
-- Boost version: 1.54.0
-- Using GLX for GL context initialization.
-- Using native OpenGL API library
-- Detecting OpenGL version
-- Found GL version 4.2
-- Found GL extension: ARB_shader_subroutine
-- Found GL extension: ARB_shader_atomic_counters
-- Found GL extension: ARB_tessellation_shader
-- Found GL extension: ARB_separate_shader_objects
-- Found GL extension: ARB_transform_feedback2
-- Found GL extension: ARB_viewport_array
-- Found GL extension: ARB_compatibility
-- Found GL extension: EXT_direct_state_access
-- Found GLEW extension: EXT_direct_state_access
CMake Warning at config/OGLplusLib.cmake:44 (message):
  OGLplus library cannot be built!
Call Stack (most recent call first):
  CMakeLists.txt:179 (include)

-- Configuring done
-- Generating done
-- Build files have been written to: /files/SOURCE_code/OGLPlus/building/_build
# Configuration completed successfully.
# To build OGLplus do the following:

cd _build
make -j 3
make install

# NOTE: installing to '/usr/local' may require administrative privilegues

Build error:

Scanning dependencies of target oglplus_example_harness
[  0%] Generating OGLplus HTML documentation
[  1%] Building CXX object example/oglplus/CMakeFiles/oglplus_example_harness.dir/glx_main.cpp.o
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../oalplus/doxygen.tags' does not exist or is not a file. Skipping it...
Error: Tag file `/files/SOURCE_code/OGLPlus/building/_build/doc/doxygen/oglplus/../eglplus/doxygen.tags' does not exist or is not a file. Skipping it...
/files/SOURCE_code/OGLPlus/building/example/standalone/002_triangle_compatibility.cpp:36: Warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)
Linking CXX static library liboglplus_example_harness.a
[  1%] Built target oglplus_example_harness
Scanning dependencies of target texture-flower_glass
[  2%] Copying default fallback texture flower_glass
[  2%] Built target texture-flower_glass
Scanning dependencies of target 032_transitions
[  2%] Building CXX object example/oglplus/CMakeFiles/032_transitions.dir/032_transitions.cpp.o
Linking CXX executable 032_transitions
Warning: Include graph for 'all.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ActiveSubroutineInfo::ActiveSubroutineInfo(oglplus::aux::ProgramInterfaceContext&, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus3aux20ActiveSubroutineInfoC2ERNS0_23ProgramInterfaceContextEj[_ZN7oglplus3aux20ActiveSubroutineInfoC5ERNS0_23ProgramInterfaceContextEj]+0xc4): undefined reference to `glGetActiveSubroutineName'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::ProgramOps::GetStageIntParam(unsigned int, unsigned int) const':
032_transitions.cpp:(.text._ZNK7oglplus10ProgramOps16GetStageIntParamEjj[_ZNK7oglplus10ProgramOps16GetStageIntParamEjj]+0x91): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, int const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKiz]+0xcb): undefined reference to `glProgramUniform1i'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_t(std::integral_constant<unsigned long, 1ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_tESt17integral_constantImLm1EEPKfz]+0xcb): undefined reference to `glProgramUniform1f'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 2ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm2EEPKfz]+0xcb): undefined reference to `glProgramUniform2fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformSetters::_fns_v(std::integral_constant<unsigned long, 3ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz[_ZN7oglplus3aux21ProgramUniformSetters6_fns_vESt17integral_constantImLm3EEPKfz]+0xcb): undefined reference to `glProgramUniform3fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::ProgramUniformMatrixSetters::_fns_v(std::integral_constant<unsigned long, 4ul>, std::integral_constant<unsigned long, 4ul>, float const*, ...)':
032_transitions.cpp:(.text._ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz[_ZN7oglplus3aux27ProgramUniformMatrixSetters6_fns_vESt17integral_constantImLm4EES3_PKfz]+0xcb): undefined reference to `glProgramUniformMatrix4fv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineUniformInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux24SubroutineUniformInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineUniformLocation'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::aux::SubroutineInitOps::_do_init_location(unsigned int, char const*) const':
032_transitions.cpp:(.text._ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc[_ZNK7oglplus3aux17SubroutineInitOps17_do_init_locationEjPKc]+0x85): undefined reference to `glGetSubroutineIndex'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::_get_location_count(unsigned int, unsigned int)':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines19_get_location_countEjj[_ZN7oglplus18UniformSubroutines19_get_location_countEjj]+0x89): undefined reference to `glGetProgramStageiv'
CMakeFiles/032_transitions.dir/032_transitions.cpp.o: In function `oglplus::UniformSubroutines::Apply()':
032_transitions.cpp:(.text._ZN7oglplus18UniformSubroutines5ApplyEv[_ZN7oglplus18UniformSubroutines5ApplyEv]+0x7b): undefined reference to `glUniformSubroutinesuiv'
collect2: error: ld returned 1 exit status
make[2]: *** [example/oglplus/032_transitions] Error 1
make[1]: *** [example/oglplus/CMakeFiles/032_transitions.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Warning: Include graph for 'lib.hpp' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
/files/SOURCE_code/OGLPlus/building/doc/include/oglplus/doc.hpp:225: Warning: Invalid list item found
[  2%] Built target oglplus-prebuild-doc
make: *** [all] Error 2
matus-chochlik commented 10 years ago

It seems that the version detection is failing somehow or your GL implementation reports incorrect version. What kind of HW/driver are you using, or do you use (something like) MesaGL?

Anyway in this case forcing GLEW might be a better option. You could try the following to get it going:

./configure.py --from-scratch --use-glew

also please consider using the --no-docs option to get rid of unrelated doxygen warnings when pasting cmake output.

matus-chochlik commented 10 years ago

b.t.w. GL3W is not required it is only one option that could be used. It's presence is detected and in case nothing else is available GL3W might be used to provide the GL API definition.

adamcavendish commented 10 years ago

Maybe you're right. Cause when I use GLEW, it tells me that it cannot get OpenGL Version... I googled the problem and I found that it is a problem of AMD Drivers ---- it won't support XServer 1.14. Maybe I must wait until more support is released on XServer. T T. And Thx.