Results 1 to 18 of 18

Thread: ClanLib 2.2 on Suse

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default ClanLib 2.2 on Suse

    I cannot get ClanLib 2.2 to run any examples that require the opengl framebuffer object on Suse Linux.

    (This includes most gui examples and the 3d examples)

    Nothing happens when the application starts. You have to ctrl-c to quit.

    Any ideas?

    Note, other ClanLib 2.2.0 example problems exist, see: http://clanlib.org/wiki/TODO#ClanLib_2.2.1_Release_TODO

  2. #2

    Default

    What graphics hardware are you using? Since you specifically refer to Suse, have you found them to work on some other Linux distribution, and if so which one?

    On my system (Intel 965GM, Ubuntu 10.04 amd64) the GL1 examples work (CubeGL1, CustomGL, Object3D with my makefile fix).

    The ones using the GL target either throw an exception (Instancing, Shadow, GeometryShader) or show a corrupted display (a sprinkling of random pixels on top of something roughly correct) for a few seconds then crash X (BumpMapping, LightSurface, Quaternion, Spotlight, VertexBuffer), but this may be because my hardware only supports up to OpenGL 2.1.

    $ ./instancing
    Exception caught: Unable to compile vertex shader object: Error: Preprocessor error
    Error: failed to preprocess the source.

    #0 CL_System::capture_stack_trace(int, int, void**, unsigned int*) (/usr/local/lib/libclan22Core-2.2.so.1)
    #1 CL_Exception::CL_Exception(CL_String8 const&) (/usr/local/lib/libclan22Core-2.2.so.1)
    #2 (./instancing)
    #3 (./instancing)
    #4 (./instancing)
    #5 (./instancing)
    #6 main (/usr/local/lib/libclan22App-2.2.so.1)
    #7 __libc_start_main (/lib/libc.so.6)
    #8 (./instancing)

    $ ./shadow
    Exception caught: FrameBuffer is : FRAMEBUFFER_INCOMPLETE_READ_BUFFER
    #0 CL_System::capture_stack_trace(int, int, void**, unsigned int*) (/usr/local/lib/libclan22Core-2.2.so.1)
    #1 CL_Exception::CL_Exception(CL_String8 const&) (/usr/local/lib/libclan22Core-2.2.so.1)
    #2 CL_OpenGLFrameBufferProvider::check_framebuffer_co mplete() (/usr/local/lib/libclan22GL-2.2.so.1)
    #3 CL_OpenGLGraphicContextProvider::set_frame_buffer( CL_FrameBuffer const&, CL_FrameBuffer const&) (/usr/local/lib/libclan22GL-2.2.so.1)
    #4 CL_GraphicContext::set_frame_buffer(CL_FrameBuffer const&, CL_FrameBuffer const&) (/usr/local/lib/libclan22Display-2.2.so.1)
    #5 CL_GraphicContext::set_frame_buffer(CL_FrameBuffer const&) (/usr/local/lib/libclan22Display-2.2.so.1)
    #6 (./shadow)
    #7 (./shadow)
    #8 (./shadow)
    #9 main (/usr/local/lib/libclan22App-2.2.so.1)
    #10 __libc_start_main (/lib/libc.so.6)
    #11 (./shadow)

    $ ./geometryshader
    Exception caught: Unable to compile geometry shader object:
    #0 CL_System::capture_stack_trace(int, int, void**, unsigned int*) (/usr/local/lib/libclan22Core-2.2.so.1)
    #1 CL_Exception::CL_Exception(CL_String8 const&) (/usr/local/lib/libclan22Core-2.2.so.1)
    #2 (./geometryshader)
    #3 (./geometryshader)
    #4 (./geometryshader)
    #5 (./geometryshader)
    #6 main (/usr/local/lib/libclan22App-2.2.so.1)
    #7 __libc_start_main (/lib/libc.so.6)
    #8 (./geometryshader)

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    It seems that it does not work on ubuntu either.

    Using : Quadro FX 3400/4400
    (It works with GeForce 8800GT)

    If you disable the OpenGL 3 graphic context creation, it works.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    There probably is something wrong with ClanLib.

    Looking at: http://www.opengl.org/wiki/Tutorial:...Creation_(GLX)
    We do things differently.

    We should iterate through "GLXFBConfig *fbc = glXChooseFBConfig(..., &num_items)"

    I am looking to fix this problem. I found a quite serious but in the existing code (GL and GL1 target).

    I think ClanLib 2.2.1 will need to be released as soon as this is fixed
    Last edited by rombust; 08-04-2010 at 12:44 PM.

  5. #5
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I have committed an untested fix to ClanLib 2.3 SVN.

    I have not yet copied the fix to ClanLib 2.2 SVN

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    fixed in ClanLib 2.2.1 release

  7. #7

    Default

    In 2.2.1, anything using the GL target now throws an exception that I don't have GLX 1.3, which is true (glxinfo says server 1.2, client 1.4) and an improvement on crashing X. While being able to use OpenGL 2 would be better, I don't know how much work this would be.

    $ ./spotlight
    Exception caught: Invalid GLX version, require GLX 1.3
    #0 CL_Exception::CL_Exception(CL_String8 const&) (/usr/lib/libclan22Core-2.2.so.1)
    #1 CL_OpenGLWindowProvider_GLX::create(CL_DisplayWind owSite*, CL_DisplayWindowDescription const&) (/usr/lib/libclan22GL-2.2.so.1)
    #2 CL_DisplayWindow::CL_DisplayWindow(CL_DisplayWindo wDescription const&, CL_DisplayTarget) (/usr/lib/libclan22Display-2.2.so.1)
    #3 (./spotlight)
    #4 (./spotlight)
    #5 main (/usr/lib/libclan22App-2.2.so.1)
    #6 __libc_start_main (/lib/libc.so.6)
    #7 (./spotlight)

  8. #8

    Default

    Hi, newbie here, same problem. Linux (Crunchbang, Ubuntu derivative) with embedded ATI card. Almost all examples generate that same error:

    Exception caught: Invalid GLX version, require GLX 1.3

    after compiling cleanly. I am using 2.2.1, freshly downloaded.

    Don't know if that helps pin it down (googling the error brought up something about ATI as the first result...) Guess I will go get the SVN and sit through the longest compiling experience I've ever had again *here's hoping*

  9. #9
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    If someone would patch the Linux make files to use the precompiled headers, that time would significantly decrease.

    A complete rebuild of a release build takes only 1 minute and 15 seconds on my computer with MSVC under Windows, and I believe a significant reason for the better compile speed is that the precompiled header is being used.

    Unfortunately I'm not good enough at the autotools myself to add the usage of precompiled headers for GCC. The Windows builds also compiles a .cpp file for each core, another thing I'm not sure that the autotools does automatically.

  10. #10

    Default

    The message "Exception caught: Invalid GLX version, require GLX 1.3" is correct in that the context creation method introduced in 2.2.1 does require GLX 1.3, which I don't have (to find out whether you do, install mesa-utils and run glxinfo). I'm not using ATI hardware, but am using Ubuntu (10.04 amd64).

    The attached (rename to opengl_window_provider_glx.cpp (the forum doesn't allow .cpp filenames), put in Sources/GL/GLX and re-run make and sudo make install, which shouldn't take long as only it needs to be recompiled) creates an OpenGL 2.x context the old way when this happens. Alternatively, install 2.2.0.

    Warning: either of these re-exposes the X crash bug on my system. This appears to be a separate bug that was only hidden by this message ending the program first, in that when running 2.2.0 my system doesn't try to create a 3.x context (presumably for lack of glXChooseFBConfig, which either version requires for this). If you also have this problem, use the GL1 display target instead (examples CubeGL1, CustomGL, Object3D).
    Attached Files Attached Files

  11. #11

    Default

    Quote Originally Posted by rebecca.palmer View Post
    The message "Exception caught: Invalid GLX version, require GLX 1.3" is correct in that the context creation method introduced in 2.2.1 does require GLX 1.3, which I don't have (to find out whether you do, install mesa-utils and run glxinfo). I'm not using ATI hardware, but am using Ubuntu (10.04 amd64).

    The attached (rename to opengl_window_provider_glx.cpp (the forum doesn't allow .cpp filenames), put in Sources/GL/GLX and re-run make and sudo make install, which shouldn't take long as only it needs to be recompiled) creates an OpenGL 2.x context the old way when this happens. Alternatively, install 2.2.0.

    Warning: either of these re-exposes the X crash bug on my system. This appears to be a separate bug that was only hidden by this message ending the program first, in that when running 2.2.0 my system doesn't try to create a 3.x context (presumably for lack of glXChooseFBConfig, which either version requires for this). If you also have this problem, use the GL1 display target instead (examples CubeGL1, CustomGL, Object3D).
    Thank you so much, that worked!

    All my previous graphics work has been with high-level scripting (command line born-and-bred) so I felt at a total loss No X-crashes yet but I sometimes get those Just Because anyway.

    Edit: Albeit a lot of the examples just segfault now. But I could watch particle systems all day.

  12. #12
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    damm linux, it would be a lot easier if all distros use GLX 1.3 or better!

  13. #13
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    (Side note, I just added c/cpp/h to the acceptable file attachment list for the future)
    Seth A. Robinson
    Robinson Technologies

  14. #14
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    (I haven't looked at the above patch yet)

    It is easy to make clanGL work with glx1.2. At the detection, you just need a set a "glx1.3 available" flag. If the flag is not set, use the old method (as used in clanlib 2.2.0) and do not attempt to create the OpenGL 3 context.

    The advantage of using GLX1.3 is that you can choose the ideal framebuffer config that was supplied in CL_DisplayWindowDescription (for example the multisampling level). And creating OpenGL 3 context works.

  15. #15

    Default

    Quote Originally Posted by rombust
    it would be a lot easier if all distros use GLX 1.3 or better!
    Ubuntu 10.04 uses Mesa 7.7.1 and (on my hardware) xorg-video-intel 2.9.1, which are less than 15 months old; is GLX 1.3 in Linux that new, or is it simply not available on all hardware?

    Quote Originally Posted by abadidea
    Albeit a lot of the examples just segfault now.
    Which ones, and can you get a backtrace (gdb example name, run, then bt full after it crashes)? Since ClanLib uses an OpenGL function pointer table with NULL being a function that isn't available, that could be the result of calling an OpenGL function without checking whether your version has it, but it could also be numerous other things.

  16. #16

    Default

    Code:
    melissa@clarion:~/c/ClanLib-2.2.1/Examples/GUI/GUI$ gdb gui
    GNU gdb 6.8-debian
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "i486-linux-gnu"...
    (gdb) run
    Starting program: /home/melissa/c/ClanLib-2.2.1/Examples/GUI/GUI/gui 
    [Thread debugging using libthread_db enabled]
    [New Thread 0xb7512900 (LWP 16050)]
    
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb7512900 (LWP 16050)]
    0x000010d1 in ?? ()
    (gdb) bt full
    #0  0x000010d1 in ?? ()
    No symbol table info available.
    #1  0xb7f7c2a7 in CL_OpenGLGraphicContextProvider::alloc_frame_buffer (
        this=0x9ad4b00) at opengl_graphic_context_provider.cpp:388
    No locals.
    #2  0xb7c4f6b8 in CL_FrameBuffer (this=0xbf9ee6b0, context=@0x95683cc)
        at Render/frame_buffer.cpp:64
    No locals.
    #3  0xb7e1fccc in CL_GUIWindowManagerProvider_Texture (this=0x9b88e60, 
        display_window=@0xbf9ee8e4) at gui_window_manager_provider_texture.cpp:74
    No locals.
    #4  0xb7e25697 in CL_GUIWindowManagerTexture (this=0x9b68ff8, display_window=
            {impl = {<CL_SharedPtr_Link> = {mutex = 0xbf9ee8e4, prev = 0xb7ff0ff4, next = 0xa35c3c63, deleter = "�L�� �\236�����\020�\236��{��", weak_link = 4 '\004'}, ptr = 0xb7ff17c4}}) at gui_window_manager_texture.cpp:41
    No locals.
    #5  0x08061d71 in GUI_Texture::GUI_Texture ()
    No locals.
    #6  0x08073229 in GUI::reset_manager ()
    No locals.
    #7  0x08073fbf in GUI::GUI ()
    No locals.
    #8  0x08056016 in App::start ()
    No locals.
    #9  0x0806c515 in Program::main ()
    No locals.
    #10 0xb7fb9d21 in main (argc=1, argv=0xbf9eefd4) at Unix/clanapp.cpp:48
    	args = {<std::_Vector_base<CL_String8, std::allocator<CL_String8> >> = {
        _M_impl = {<std::allocator<CL_String8>> = {<__gnu_cxx::new_allocator<CL_String8>> = {<No data fields>}, <No data fields>}, _M_start = 0x9567ba8, 
          _M_finish = 0x9567bf8, _M_end_of_storage = 0x9567bf8}}, <No data fields>}
    	retval = <value optimized out>
    #11 0xb757a685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
    No symbol table info available.
    #12 0x08050671 in _start ()
    No locals.
    It gets so far as opening the window, but crashes before it draws anything to said window. Ones I've found that DON'T crash: GUIBasic, Particles, SpriteRTS, Pacman (haven't had time to test all of them)

  17. #17

    Default

    Sorry, I can't explain that; the trace points to "return new CL_OpenGLFrameBufferProvider(this);" and there's nothing in the CL_OpenGLFrameBufferProvider constructor that looks capable of causing a segfault (it does use an OpenGL 3+-only function, clGenFramebuffers, but it checks that this is available first).

    The same example on my system crashes X (sometimes at startup, but more usually after working for some seconds with a sprinkling of random pixels over the display). Redirecting GDB output to a file finds the following:

    Run 1
    (gdb) define hook-stop
    Type commands for definition of "hook-stop".
    End with a line saying just "end".
    >thread apply all bt full This was supposed to run a trace when it crashed, since I wouldn't be able to get to GDB afterwards, but didn't seem to work
    >end
    (gdb) run
    Starting program: /media/109CB3519CB32FD8/Documents and Settings/palmer/My Documents/ClanLib-2.2.1/Examples/GUI/GUI/gui
    [Thread debugging using libthread_db enabled]
    ../../intel/intel_bufmgr_gem.c:1152: Error setting memory domains 190 (00000040 00000000): Input/output error .
    XIO: fatal IO error 5 (Input/output error) on X server ":0.0"

    after 9007 requests (9005 known processed) with 0 events remaining.

    [New Thread 0x7ffff15d0710 (LWP 7168)]
    [Thread 0x7ffff15d0710 (LWP 7168) exited]

    Program exited with code 01.
    Run 2
    (gdb) runrun
    Starting program: /media/109CB3519CB32FD8/Documents and Settings/palmer/My Documents/ClanLib-2.2.1/Examples/GUI/GUI/gui
    [Thread debugging using libthread_db enabled]
    XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"

    after 55 requests (54 known processed) with 18 events remaining.

    [New Thread 0x7ffff15d0710 (LWP 7562)]
    [Thread 0x7ffff15d0710 (LWP 7562) exited]

    Program exited with code 01.
    Run 3
    (gdb) define hook-stop
    Type commands for definition of "hook-stop".
    End with a line saying just "end".
    >thread apply all bt full
    >end
    (gdb) run
    Starting program: /media/109CB3519CB32FD8/Documents and Settings/palmer/My Documents/ClanLib-2.2.1/Examples/GUI/GUI/gui
    [Thread debugging using libthread_db enabled]
    ../../intel/intel_bufmgr_gem.c:1152: Error setting memory domains 210 (00000040 00000000): Input/output error .
    XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"

    after 37886 requests (37884 known processed) with 0 events remaining.

    [New Thread 0x7ffff15d0710 (LWP 7955)]
    [Thread 0x7ffff15d0710 (LWP 7955) exited]

    Program exited with code 01.
    (gdb)

  18. #18
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    The clanGL target on linux uses most of the OpenGL 2 Specification.

    If the graphics card driver is incomplete, then clanGL will not perform as expected.

    With NVIDIA, you have to download the binary driver for clanGL to work.
    I am not sure with ATI and Intel, but I guess it is the same.

    clanGL target can be adjusted to handle GLX 1.2. The only side effects are: "Loosing the ability of choosing the multisampling level" and "Cannot create an OpenGL 3 context".

    This should not be a problem, because if the system is running GLX 1.2, then OpenGL 3 is probably unavailable.

    I'll add it to the todo. http://clanlib.org/wiki/TODO

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •