#163 OpenGL compile fails - GLhandleARB not in typemap, or other

closed-accepted
other (94)
5
2007-02-28
2007-02-27
keflavich
No

When compiling PDL with 3d support (badvalues or not - doesn't matter), opengl.pd doesn't compile.

The error:
/usr/bin/perl /usr/share/perl/5.8.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap /home/adam/Desktop/PDL-2.4.3/Basic/Core/typemap.pdl -typemap typemap OpenGL.xs > OpenGL.xsc && mv OpenGL.xsc OpenGL.c
Error: No OUTPUT definition for type 'GLvoid', typekind 'T_VOID' found in OpenGL.xs, line 7547
make[3]: *** [OpenGL.c] Error 1
make[3]: Leaving directory

If I add the line
OPENGL_DEFINE => '-DGLvoid=void',
to the perldl.conf file, I get a different error:

SUB CPP: Returning 137 lines...
Skip ../../../blib/lib/PDL/Graphics/OpenGL.pm (unchanged)
/usr/bin/perl /usr/share/perl/5.8.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap /home/adam/Desktop/PDL-2.4.3/Basic/Core/typemap.pdl -typemap typemap OpenGL.xs > OpenGL.xsc && mv OpenGL.xsc OpenGL.c
Error: 'GLhandleARB' not in typemap in OpenGL.xs, line 7553
Error: 'GLhandleARB' not in typemap in OpenGL.xs, line 7564
Error: 'GLhandleARB' not in typemap in OpenGL.xs, line 7577
Error: 'GLhandleARB' not in typemap in OpenGL.xs, line 7600
make[3]: *** [OpenGL.c] Error 1
make[3]: Leaving directory

I know support for the TriD stuff isn't a high priority now, but it would be really nice to get that working.

Discussion

  • Chris Marshall

    Chris Marshall - 2007-02-27

    Logged In: YES
    user_id=44920
    Originator: NO

    Please add the info requested in BUGS to this ticket.
    There's not enough to go on here.

    PDL-2.4.3 included much work to improve the robustness
    of the TriD build for the various platforms. Given
    the variability of different OpenGL installations and
    OS platforms, it was not possible to test everywhere.
    If you'll update the bug report, I'd like to see if we
    can get the build to work for your situation.

    Some questions:

    * Was this a clean PDL install or was there another
    PDL on the system?

    * Please attach the complete output from the build
    process (maybe a clean run with only WITH_3D
    enabled if that will reproduce your problem).

    * Information on your OpenGL installation, vendor
    supplied, Mesa,...

    Thanks and look forward to hearing from you.

     
  • keflavich

    keflavich - 2007-02-27

    output from "make" command

     
  • keflavich

    keflavich - 2007-02-27

    Logged In: YES
    user_id=1721140
    Originator: YES

    * Was this a clean PDL install or was there another
    PDL on the system?

    There's another PDL on the system. I was trying to compile, but not (yet) install. I didn't realize that could be a problem. The compile worked pretty much perfectly without WITH_3D enabled, and the version that's installed does not have WITH_3D enabled.

    btw, uname -a output: Linux adam-laptop 2.6.17-11-386 #2 Thu Feb 1 19:50:13 UTC 2007 i686 GNU/Linux

    * Please attach the complete output from the build
    process (maybe a clean run with only WITH_3D
    enabled if that will reproduce your problem).

    Attached. Even with everything optional disabled, there's a lot of output.

    * Information on your OpenGL installation, vendor
    supplied, Mesa,...

    output of glxinfo (I think this should include everything):
    name of display: :0.0
    display: :0 screen: 0
    direct rendering: No
    server glx vendor string: SGI
    server glx version string: 1.2
    server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
    GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
    client glx vendor string: SGI
    client glx version string: 1.4
    client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
    GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
    GLX version: 1.2
    GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_EXT_texture_from_pixmap
    OpenGL vendor string: Mesa project: www.mesa3d.org
    OpenGL renderer string: Mesa GLX Indirect
    OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
    OpenGL extensions:
    GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multitexture,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow,
    GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
    GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra,
    GL_EXT_blend_color, GL_EXT_blend_func_separate, GL_EXT_blend_logic_op,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_fog_coord,
    GL_EXT_framebuffer_object, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels,
    GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
    GL_EXT_secondary_color, GL_EXT_separate_specular_color,
    GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_subtexture,
    GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_edge_clamp,
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
    GL_EXT_texture_env_dot3, GL_EXT_texture_lod_bias, GL_EXT_texture_object,
    GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
    GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once,
    GL_ATIX_texture_env_combine3, GL_IBM_texture_mirrored_repeat,
    GL_INGR_blend_func_separate, GL_MESA_pack_invert, GL_MESA_ycbcr_texture,
    GL_NV_blend_square, GL_NV_point_sprite, GL_NV_texgen_reflection,
    GL_NV_texture_rectangle, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow,
    GL_SGIX_shadow_ambient, GL_SUN_multi_draw_arrays
    glu version: 1.3
    glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

    visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
    id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
    ----------------------------------------------------------------------
    0x23 24 tc 0 24 0 r y . 8 8 8 0 0 16 0 0 0 0 0 0 0 None
    0x24 24 tc 0 24 0 r y . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
    0x25 24 tc 0 32 0 r y . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
    0x26 24 tc 0 32 0 r . . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
    0x27 24 dc 0 24 0 r y . 8 8 8 0 0 16 0 0 0 0 0 0 0 None
    0x28 24 dc 0 24 0 r y . 8 8 8 0 0 16 8 16 16 16 0 0 0 None
    0x29 24 dc 0 32 0 r y . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
    0x2a 24 dc 0 32 0 r . . 8 8 8 8 0 16 8 16 16 16 16 0 0 None
    0x62 32 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 Ncon

    File Added: pdlbuildlog

     
  • Chris Marshall

    Chris Marshall - 2007-02-27

    Logged In: YES
    user_id=44920
    Originator: NO

    It looks like you are using Mesa for OpenGL.
    Did you use the suggested Mesa options in your
    perldl.conf file? Edit the file and search for
    Mesa. The lines need to be uncommented.

    Per the BUGS file, please update with the
    output from the perl -V command.

    Thanks.

     
  • keflavich

    keflavich - 2007-02-27

    Logged In: YES
    user_id=1721140
    Originator: YES

    My apologies, it looks like that was not a bug at all. I didn't learn about glxinfo until after I'd posted the bug report, and had no idea that I was using mesa, and clearly didn't put 2 and 2 together when I posted my system info. Even so, I should have tried to use all the mesa options before posting a bug report. I think it compiled correctly this time.

    Thanks for the help.

    Here's my perl -V anyway:
    Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    Platform:
    osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-multi
    uname='linux rothera 2.6.15.7 #1 smp tue jun 27 18:34:43 utc 2006 i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20060613 (prerelease) (Ubuntu 4.1.1-2ubuntu5)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
    Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
    gnulibc_version='2.4'
    Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

    Characteristics of this binary (from libperl):
    Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
    USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
    Built under linux
    Compiled at Jul 7 2006 18:08:25
    @INC:
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    .

     
  • Chris Marshall

    Chris Marshall - 2007-02-27

    Logged In: YES
    user_id=44920
    Originator: NO

    Congratulations! One way to check the operation is to run
    the perldl shell and run the 3d and 3d2 demos:

    % perldl
    perlDL shell v1.33
    PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
    'COPYING' in the PDL distribution. This is free software and you
    are welcome to redistribute it under certain conditions, see
    the same file for details.
    ReadLines, NiceSlice, MultiLines enabled
    Reading /cygdrive/c/Documents and Settings/user/.perldlrc...
    Found docs database /usr/lib/perl5/site_perl/5.8/cygwin/PDL/pdldoc.db
    Type 'help' for online help
    Type 'demo' for online demos
    Loaded PDL v2.4.3 (supports bad values)
    perldl> demo
    Use:
    demo pdl # general demo

    demo 3d # 3d demo (requires TriD with OpenGL or Mesa)
    demo 3d2 # 3d demo, part 2. (Somewhat memory-intensive)
    demo 3dgal # the 3D gallery: make cool images with 3-line scripts
    demo Tk3d # Requires the perl Tk module

    demo pgplot # PGPLOT graphics output (Req.: PGPLOT)
    demo OOplot # PGPLOT OO interface (Req.: PGPLOT)

    demo transform # Coordinate transformations (Req.: PGPLOT)
    demo cartography # Cartographic projections (Req.: PGPLOT)

    demo bad # Bad-value demo (Req.: bad value support)
    demo bad2 # Bad-values, part 2 (Req.: bad value support and PGPLOT)

    perldl> demo 3d

    ----

    Welcome to a short tour of the capabilities of
    PDL::Graphics::TriD.

    Press 'q' in the graphics window for the next screen.
    Rotate the image by pressing mouse button one and
    dragging in the graphics window.
    Zoom in/out by pressing MB3 and drag up/down.
    Note that a standalone TriD script must start with

    use PDL;
    use PDL::Graphics::TriD;
    use PDL::Graphics::TriD::Image;

    to work properly.
    ---- (press enter)

    ... that should give you the guided tour. 3d2 is
    more of the same and much more resource intensive.

    Please confirm that it works for you and we can
    close this bug report down. This is at the least
    a documentation bug. It should not be this hard
    to get vanilla PDL up and running. Maybe in the
    PDL 2.4.4 patch relase we could improve the Mesa
    build detection.

     
  • keflavich

    keflavich - 2007-02-27

    Logged In: YES
    user_id=1721140
    Originator: YES

    All the demos work, except Tk3d, so I probably don't have that installed. I did run into the (non-PDL) problem that zooming in too far in the 3dgal demo crashed X. Also, the fresh install killed my homemade module, but that's not relevant to this bug. Anyway, "vanilla PDL" is now working alright, so the bug can probably be closed.

    Part of my problem getting PDL running, specifically the openGL stuff and pgplot, was figuring out which libraries I needed. I'm on Debian, so I tried getting pgplot (which worked... sort of...) and the openGL libraries, but I never knew which openGL libraries to get. I also loaded on a bunch of other stuff so that everything except HDF was enabled, but I downloaded/installed libraries fairly haphazardly.

     
  • Chris Marshall

    Chris Marshall - 2007-02-28

    Logged In: YES
    user_id=44920
    Originator: NO

    To summarize:

    The reported problem was the result of the use of
    Mesa for OpenGL. The fix was to use the indicated
    parameter settings listed in the perldl.conf file
    for Mesa 3.2.

    TriD then built correctly with PDL-2.4.3.

    This "usability bug" suggests the need for better install
    documentation for Mesa users. We could also include better
    diagnostics and auto-config options.

     
  • Chris Marshall

    Chris Marshall - 2007-02-28
    • assigned_to: nobody --> marshallch
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks