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 failure on MacOS #5

Open
mohawk2 opened this issue May 10, 2022 · 28 comments
Open

Build failure on MacOS #5

mohawk2 opened this issue May 10, 2022 · 28 comments

Comments

@mohawk2
Copy link
Contributor

mohawk2 commented May 10, 2022

https://gist.githubusercontent.com/oalders/bf99678279926568fdd02d574705489d/raw/bb556d5652585558f89e53c0c03bbf20971b60c1/gistfile1.txt shows:

In file included from GLUT.xs:550:
In file included from ./gl_util.h:27:
./glext_procs.h:9886:9: warning: 'GL_TRIANGLE_STRIP_ADJACENCY_EXT' macro redefined [-Wmacro-redefined]
#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:1120:9: note: previous definition is here
#define GL_TRIANGLE_STRIP_ADJACENCY_EXT                      0xD
        ^
In file included from GLUT.xs:550:
In file included from ./gl_util.h:27:
./glext_procs.h:10915:21: error: conflicting types for 'glTexParameterIivEXT'
GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3227:13: note: previous declaration is here
extern void glTexParameterIivEXT( GLenum target, GLenum pname, GLint *params );
            ^
In file included from GLUT.xs:550:
In file included from ./gl_util.h:27:
./glext_procs.h:10916:21: error: conflicting types for 'glTexParameterIuivEXT'
GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3228:13: note: previous declaration is here
extern void glTexParameterIuivEXT( GLenum target, GLenum pname, GLuint *params );
            ^
@oalders
Copy link

oalders commented May 10, 2022

Summary of my perl5 (revision 5 version 34 subversion 1) configuration:
   
  Platform:
    osname=darwin
    osvers=21.4.0
    archname=darwin-2level
    uname='darwin imac.local 21.4.0 darwin kernel version 21.4.0: mon feb 21 20:34:37 pst 2022; root:xnu-8020.101.4~2release_x86_64 x86_64 '
    config_args='-Dprefix=/Users/olaf/.plenv/versions/5.34.1 -de -Dversiononly -A'eval:scriptdir=/Users/olaf/.plenv/versions/5.34.1/bin''
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='cc'
    ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=12.3 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV'
    optimize='-O3'
    cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=12.3 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='Apple LLVM 13.1.6 (clang-1316.0.21.2)'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -mmacosx-version-min=12.3 -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/lib /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib /Library/Developer/CommandLineTools/usr/lib /usr/lib
    libs=-lgdbm -ldb
    perllibs=
    libc=
    so=dylib
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=bundle
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags=' -mmacosx-version-min=12.3 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Built under darwin
  Compiled at Mar 21 2022 15:39:00
  @INC:
    /Users/olaf/.plenv/versions/5.34.1/lib/perl5/site_perl/5.34.1/darwin-2level
    /Users/olaf/.plenv/versions/5.34.1/lib/perl5/site_perl/5.34.1
    /Users/olaf/.plenv/versions/5.34.1/lib/perl5/5.34.1/darwin-2level
    /Users/olaf/.plenv/versions/5.34.1/lib/perl5/5.34.1

@mohawk2
Copy link
Contributor Author

mohawk2 commented May 11, 2022

The key difference between your setup and mine is that OpenGL::GLUT's Makefile.PL on mine finds "FREEGLUT", while yours finds AGL (near the top of the gist). That's Homebrew (I think Free)GLUT, which also pulls in a dependency on XQuartz. Since it's too much to ask for you to install Homebrew, FreeGLUT, and XQuartz, it looks to me like I need to get it working on AGL (the Apple-supplied OpenGL and GLUT), which really ought to work anyway. I'm actually a little baffled that's even really a "thing", but the Perl OpenGL stuff last got worked on about 10 years ago, and I suspect the MacOS world has improved its availability of OpenGL/GLUT since.

@d-lamb
Copy link

d-lamb commented Sep 11, 2024

When I build PDL 2.090 (and prior versions as well) on my Mac, during the Makefile.PL stage I get warnings:

Warning (mostly harmless): No library found for -lAGL.framework
Warning (mostly harmless): No library found for -lOpenGL.framework

I think it comes from OpenGL-GLUT's Makefile.PL. In addition to the "improved availability" mentioned above, it's likely that the frameworks have moved around substantially on MacOS since that Makefile.PL was written. See for example the question, answer, and updated answers to this Stack Overflow question (which is about the headers, not the libraries). I'm not using the OpenGL or PDL::Graphics::TriD so this is not too important to me, but since I did the digging I figured I'd post the links here so that they are easily found later.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Sep 11, 2024

Thank you for making the effort! I haven't forgotten about this issue.

@goosh-gh
Copy link

I fail to compile OpenGL::GLUT.
My environment FYI: Mac mini 2023, Apple M2 Pro, MacOSX Sequoia 15.2, Macport 2.10.5, Xcode 16.2
Complete log while compile is attached. I hope this helps this module more used for more users...
make.log.plain.txt

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 10, 2025

@oalders @d-lamb @goosh-gh I've just released 0.7201, which incorporates the fix in Perl-GPU/OpenGL-GLUT#11 and I think should fix this for all of you. Could you please try it, and say here whether it did in fact work for you?

@goosh-gh
Copy link

Sorry for a long reply, hoping this helps you!!

  1. On a machine with macOS14.3.1(24D70, Sequoia), Xcode16.2, MacPorts2.10.5, perl5.34 (yes, still with Macports ...) :
    Make finishes after many warnings (as usual, including -Wcompound-token-split-by-macro)
    Using interface: FREEGLUT (if assign AGL, perl Makefile.PL ends up with "OS unsupported")
    make test is stuck without returning to the prompt as following:
    bash-5.2# make test
    "/opt/local/bin/perl5.34" -MExtUtils::Command::MM -e 'cp_nonempty' -- GLUT.bs blib/arch/auto/OpenGL/GLUT/GLUT.bs 644
    PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.34" "-Iblib/lib" "-Iblib/arch" test.pl
    Name "OpenGL::Config" used only once: possible typo at test.pl line 1528.
    • stuck here
  1. On a machine with macOS13.7.4(Ventura), Xcode14.3.1(14E300c), MacPorts2.10.5, perl5.34
    Make process is totally same as above.
    bash-5.2# make test
    "/opt/local/bin/perl5.34" -MExtUtils::Command::MM -e 'cp_nonempty' -- GLUT.bs blib/arch/auto/OpenGL/GLUT/GLUT.bs 644
    PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.34" "-Iblib/lib" "-Iblib/arch" test.pl
    Name "OpenGL::Config" used only once: possible typo at test.pl line 1528.
    Use of uninitialized value in pattern match (m//) at test.pl line 1528.

OpenGL Test App (using hires timer)

Using POGL v0.70
OpenGL installation: 4.5 (Compatibility Profile) Mesa 24.3.4
Mesa
llvmpipe (LLVM 19.1.7, 128 bits)

Installed extensions (* implemented in the module):
GL_3DFX_texture_compression_FXT1
GL_AMD_conservative_depth
GL_AMD_draw_buffers_blend
GL_AMD_multi_draw_indirect
GL_AMD_pinned_memory
GL_AMD_query_buffer_object
GL_AMD_seamless_cubemap_per_texture
GL_AMD_shader_stencil_export
GL_AMD_shader_trinary_minmax
GL_AMD_texture_texture4
GL_AMD_vertex_shader_layer
GL_AMD_vertex_shader_viewport_index
GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5
GL_APPLE_packed_pixels
GL_ARB_ES2_compatibility
GL_ARB_ES3_1_compatibility
GL_ARB_ES3_2_compatibility
GL_ARB_ES3_compatibility
GL_ARB_arrays_of_arrays
GL_ARB_base_instance
GL_ARB_blend_func_extended
GL_ARB_buffer_storage
GL_ARB_clear_buffer_object
GL_ARB_clear_texture
GL_ARB_clip_control

  • GL_ARB_color_buffer_float
    GL_ARB_compatibility
    GL_ARB_compressed_texture_pixel_storage
    GL_ARB_compute_shader
    GL_ARB_conditional_render_inverted
    GL_ARB_conservative_depth
    GL_ARB_copy_buffer
    GL_ARB_copy_image
    GL_ARB_cull_distance
    GL_ARB_debug_output
    GL_ARB_depth_buffer_float
    GL_ARB_depth_clamp
  • GL_ARB_depth_texture
    GL_ARB_derivative_control
    GL_ARB_direct_state_access
  • GL_ARB_draw_buffers
    GL_ARB_draw_buffers_blend
    GL_ARB_draw_elements_base_vertex
    GL_ARB_draw_indirect
    GL_ARB_draw_instanced
    GL_ARB_enhanced_layouts
    GL_ARB_explicit_attrib_location
    GL_ARB_explicit_uniform_location
    GL_ARB_fragment_coord_conventions
    GL_ARB_fragment_layer_viewport
  • GL_ARB_fragment_program
  • GL_ARB_fragment_program_shadow
  • GL_ARB_fragment_shader
    GL_ARB_framebuffer_no_attachments
    GL_ARB_framebuffer_object
    GL_ARB_framebuffer_sRGB
    GL_ARB_get_program_binary
    GL_ARB_get_texture_sub_image
    GL_ARB_gl_spirv
    GL_ARB_gpu_shader5
    GL_ARB_gpu_shader_fp64
    GL_ARB_gpu_shader_int64
  • GL_ARB_half_float_pixel
    GL_ARB_half_float_vertex
    GL_ARB_indirect_parameters
    GL_ARB_instanced_arrays
    GL_ARB_internalformat_query
    GL_ARB_internalformat_query2
    GL_ARB_invalidate_subdata
    GL_ARB_map_buffer_alignment
    GL_ARB_map_buffer_range
    GL_ARB_multi_bind
    GL_ARB_multi_draw_indirect
  • GL_ARB_multisample
  • GL_ARB_multitexture
    GL_ARB_occlusion_query
    GL_ARB_occlusion_query2
    GL_ARB_parallel_shader_compile
    GL_ARB_pipeline_statistics_query
  • GL_ARB_pixel_buffer_object
  • GL_ARB_point_parameters
  • GL_ARB_point_sprite
    GL_ARB_polygon_offset_clamp
    GL_ARB_post_depth_coverage
    GL_ARB_program_interface_query
    GL_ARB_provoking_vertex
    GL_ARB_query_buffer_object
    GL_ARB_robust_buffer_access_behavior
    GL_ARB_robustness
    GL_ARB_sample_shading
    GL_ARB_sampler_objects
    GL_ARB_seamless_cube_map
    GL_ARB_seamless_cubemap_per_texture
    GL_ARB_separate_shader_objects
    GL_ARB_shader_atomic_counter_ops
    GL_ARB_shader_atomic_counters
    GL_ARB_shader_ballot
    GL_ARB_shader_bit_encoding
    GL_ARB_shader_clock
    GL_ARB_shader_draw_parameters
    GL_ARB_shader_group_vote
    GL_ARB_shader_image_load_store
    GL_ARB_shader_image_size
  • GL_ARB_shader_objects
    GL_ARB_shader_precision
    GL_ARB_shader_stencil_export
    GL_ARB_shader_storage_buffer_object
    GL_ARB_shader_subroutine
    GL_ARB_shader_texture_image_samples
    GL_ARB_shader_texture_lod
    GL_ARB_shader_viewport_layer_array
  • GL_ARB_shading_language_100
    GL_ARB_shading_language_420pack
    GL_ARB_shading_language_include
    GL_ARB_shading_language_packing
  • GL_ARB_shadow
    GL_ARB_spirv_extensions
    GL_ARB_stencil_texturing
    GL_ARB_sync
    GL_ARB_tessellation_shader
    GL_ARB_texture_barrier
  • GL_ARB_texture_border_clamp
    GL_ARB_texture_buffer_object
    GL_ARB_texture_buffer_object_rgb32
    GL_ARB_texture_buffer_range
    GL_ARB_texture_compression
    GL_ARB_texture_compression_bptc
    GL_ARB_texture_compression_rgtc
  • GL_ARB_texture_cube_map
    GL_ARB_texture_cube_map_array
  • GL_ARB_texture_env_add
  • GL_ARB_texture_env_combine
    GL_ARB_texture_env_crossbar
  • GL_ARB_texture_env_dot3
    GL_ARB_texture_filter_anisotropic
    GL_ARB_texture_filter_minmax
  • GL_ARB_texture_float
    GL_ARB_texture_gather
    GL_ARB_texture_mirror_clamp_to_edge
  • GL_ARB_texture_mirrored_repeat
    GL_ARB_texture_multisample
  • GL_ARB_texture_non_power_of_two
    GL_ARB_texture_query_levels
    GL_ARB_texture_query_lod
  • GL_ARB_texture_rectangle
    GL_ARB_texture_rg
    GL_ARB_texture_rgb10_a2ui
    GL_ARB_texture_stencil8
    GL_ARB_texture_storage
    GL_ARB_texture_storage_multisample
    GL_ARB_texture_swizzle
    GL_ARB_texture_view
    GL_ARB_timer_query
    GL_ARB_transform_feedback2
    GL_ARB_transform_feedback3
    GL_ARB_transform_feedback_instanced
    GL_ARB_transform_feedback_overflow_query
    GL_ARB_transpose_matrix
    GL_ARB_uniform_buffer_object
    GL_ARB_vertex_array_bgra
    GL_ARB_vertex_array_object
    GL_ARB_vertex_attrib_64bit
    GL_ARB_vertex_attrib_binding
  • GL_ARB_vertex_buffer_object
  • GL_ARB_vertex_program
  • GL_ARB_vertex_shader
    GL_ARB_vertex_type_10f_11f_11f_rev
    GL_ARB_vertex_type_2_10_10_10_rev
    GL_ARB_viewport_array
    GL_ARB_window_pos
    GL_ARM_shader_framebuffer_fetch_depth_stencil
    GL_ATI_blend_equation_separate
    GL_ATI_draw_buffers
    GL_ATI_fragment_shader
    GL_ATI_meminfo
    GL_ATI_separate_stencil
    GL_ATI_texture_compression_3dc
    GL_ATI_texture_env_combine3
  • GL_ATI_texture_float
  • GL_ATI_texture_mirror_once
    GL_EXT_EGL_image_storage
    GL_EXT_EGL_image_storage_compression
    GL_EXT_EGL_sync
  • GL_EXT_abgr
  • GL_EXT_bgra
  • GL_EXT_blend_color
    GL_EXT_blend_equation_separate
    GL_EXT_blend_func_separate
    GL_EXT_blend_minmax
  • GL_EXT_blend_subtract
    GL_EXT_compiled_vertex_array
  • GL_EXT_copy_texture
    GL_EXT_debug_label
    GL_EXT_direct_state_access
    GL_EXT_draw_buffers2
    GL_EXT_draw_instanced
    GL_EXT_draw_range_elements
    GL_EXT_fog_coord
    GL_EXT_framebuffer_blit
    GL_EXT_framebuffer_multisample
    GL_EXT_framebuffer_multisample_blit_scaled
  • GL_EXT_framebuffer_object
    GL_EXT_framebuffer_sRGB
    GL_EXT_gpu_program_parameters
    GL_EXT_gpu_shader4
    GL_EXT_memory_object
    GL_EXT_memory_object_fd
    GL_EXT_multi_draw_arrays
    GL_EXT_packed_depth_stencil
    GL_EXT_packed_float
  • GL_EXT_packed_pixels
  • GL_EXT_pixel_buffer_object
    GL_EXT_point_parameters
    GL_EXT_polygon_offset_clamp
    GL_EXT_provoking_vertex
  • GL_EXT_rescale_normal
    GL_EXT_secondary_color
  • GL_EXT_separate_specular_color
    GL_EXT_shader_framebuffer_fetch
    GL_EXT_shader_framebuffer_fetch_non_coherent
    GL_EXT_shader_image_load_formatted
    GL_EXT_shader_integer_mix
  • GL_EXT_shadow_funcs
    GL_EXT_stencil_two_side
  • GL_EXT_stencil_wrap
  • GL_EXT_subtexture
  • GL_EXT_texture
  • GL_EXT_texture3D
    GL_EXT_texture_array
    GL_EXT_texture_buffer_object
    GL_EXT_texture_compression_dxt1
    GL_EXT_texture_compression_latc
    GL_EXT_texture_compression_rgtc
    GL_EXT_texture_compression_s3tc
  • GL_EXT_texture_cube_map
    GL_EXT_texture_edge_clamp
    GL_EXT_texture_env_add
  • GL_EXT_texture_env_combine
  • GL_EXT_texture_env_dot3
  • GL_EXT_texture_filter_anisotropic
    GL_EXT_texture_filter_minmax
    GL_EXT_texture_integer
  • GL_EXT_texture_lod_bias
  • GL_EXT_texture_mirror_clamp
    GL_EXT_texture_object
    GL_EXT_texture_rectangle
    GL_EXT_texture_sRGB
    GL_EXT_texture_sRGB_R8
    GL_EXT_texture_sRGB_RG8
    GL_EXT_texture_sRGB_decode
    GL_EXT_texture_shadow_lod
    GL_EXT_texture_shared_exponent
    GL_EXT_texture_snorm
    GL_EXT_texture_storage
    GL_EXT_texture_swizzle
    GL_EXT_timer_query
    GL_EXT_transform_feedback
  • GL_EXT_vertex_array
    GL_EXT_vertex_array_bgra
    GL_EXT_vertex_attrib_64bit
    GL_IBM_multimode_draw_arrays
  • GL_IBM_rasterpos_clip
    GL_IBM_texture_mirrored_repeat
    GL_INGR_blend_func_separate
    GL_INTEL_shader_atomic_float_minmax
    GL_KHR_blend_equation_advanced
    GL_KHR_blend_equation_advanced_coherent
    GL_KHR_context_flush_control
    GL_KHR_debug
    GL_KHR_no_error
    GL_KHR_parallel_shader_compile
    GL_KHR_robust_buffer_access_behavior
    GL_KHR_robustness
    GL_KHR_texture_compression_astc_ldr
    GL_KHR_texture_compression_astc_sliced_3d
    GL_MESA_framebuffer_flip_y
    GL_MESA_pack_invert
    GL_MESA_shader_integer_functions
    GL_MESA_texture_signed_rgba
    GL_MESA_window_pos
    GL_MESA_ycbcr_texture
    GL_NVX_gpu_memory_info
    GL_NV_ES1_1_compatibility
    GL_NV_alpha_to_coverage_dither_control
  • GL_NV_blend_square
    GL_NV_conditional_render
  • GL_NV_copy_depth_to_color
    GL_NV_copy_image
  • GL_NV_depth_clamp
  • GL_NV_fog_distance
    GL_NV_half_float
  • GL_NV_light_max_exponent
  • GL_NV_packed_depth_stencil
    GL_NV_primitive_restart
    GL_NV_shader_atomic_float
  • GL_NV_texgen_reflection
    GL_NV_texture_barrier
    GL_NV_texture_env_combine4
  • GL_NV_texture_rectangle
    GL_OES_EGL_image
    GL_OES_read_format
    GL_OVR_multiview
    GL_OVR_multiview2
  • GL_S3_s3tc
  • GL_SGIS_generate_mipmap
    GL_SGIS_texture_border_clamp
    GL_SGIS_texture_edge_clamp
  • GL_SGIS_texture_lod
    GL_SUN_multi_draw_arrays

Using POGL v0.7
Using Mipmap
Mesa: error: GL_INVALID_ENUM in glTexParameter(param=GL_NEAREST_MIPMAP_LINEAR)
make: *** [test_dynamic] Segmentation fault: 11

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 10, 2025

@goosh-gh If it's possible to upgrade to Perl 5.40, that should show far fewer warnings, which might let us see warnings which actually matter, since whatever's going wrong here is probably something simple the compiler knows about.

Separately from that, the second case is actually quite good because we should be able to see exactly where it's crashing. Could you look at Perl-GPU/OpenGL-GLUT#8 to see instructions for how to build with -g and run under gdb to get a backtrace? Obviously I want to fix whatever this is. Although quite possibly that Mesa error is the answer.

@goosh-gh
Copy link

goosh-gh commented Mar 10, 2025

Unfortunately, perl5.40.1 using perlbrew does not reduce warning with my environment (e.g. more than 5000 lines with "Wcompound-token-split-by-macro" while make), sorry I do not know the reason.

I tried -d option with the test.pl as follows:
$ PERL_DL_NONLAZY=1 "/Users/my_home/perl5/perlbrew/perls/perl-5.40.1/bin/perl" -d "-Iblib/lib" "-Iblib/arch" test.pl

Loading DB routines from perl5db.pl version 1.80
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(test.pl:4): my $stat = perl -v;
DB<1> c 344

OpenGL Test App (using hires timer)

Using POGL v0.7002
OpenGL installation: 4.5 (Compatibility Profile) Mesa 24.3.4
Mesa
llvmpipe (LLVM 19.1.7, 128 bits)

Installed extensions (* implemented in the module):
GL_3DFX_texture_compression_FXT1
. . . . skipped

  • GL_SGIS_texture_lod
    GL_SUN_multi_draw_arrays

Using POGL v0.7002
Using Mipmap
Mesa: error: GL_INVALID_ENUM in glTexParameter(param=GL_NEAREST_MIPMAP_LINEAR)
Signal SEGV at test.pl line 420.
main::ourInit(300, 300) called at test.pl line 1658
Abort trap: 6

. . . Anything else I can do? If we need gdb enabled perl5.40.1, I will newly install it!

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 11, 2025

. . . Anything else I can do? If we need gdb enabled perl5.40.1, I will newly install it!

Yes. The Perl version doesn't matter, don't worry. I'm still asking you to do the steps in the first comment (mine) on Perl-GPU/OpenGL-GLUT#8, and say here what the backtrace is. I requested that in my last comment here. It is still what I am asking.

@goosh-gh
Copy link

After make is finished, with the machine "the second case" above,
$ ggdb perl -ex 'run -Mblib t/01_use.t' ### (well, macports installs gdb as 'ggdb') returned: 
GNU gdb (GDB) 15.1
          several lines skipped here

Reading symbols from perl...


Fatal signal: Floating point exception: 8
----- Backtrace -----
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

Floating point exception: 8
$ 

(with the "first case", stucked while make test)
$ ggdb perl -ex 'run -Mblib t/01_use.t'

Reading symbols from perl...
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module op.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module perl.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module universal.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module av.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module builtin.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module caretx.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module class.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module deb.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module doio.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module doop.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module dquote.o]
DW_FORM_GNU_str_index or DW_FORM_strx used without .debug_str section in CU at offset 0x0 [in module dump.o]


Fatal signal: Floating point exception: 8
----- Backtrace -----
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

Floating point exception: 8
$

Please tell me how we can proceed/need something else. 
(oops, do I find another thing to be reported?  Please forget/forgive me about it)

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 11, 2025

Apologies, I forgot that MacOS is much better with lldb than with gdb. On that, please do:

lldb perl -o 'run -Mblib test.pl'

Regarding ggdb crashing, that's one to report to MacPorts.

@goosh-gh
Copy link

goosh-gh commented Mar 11, 2025

(using lldb-19 with "the second case")
 ---  skip many lines
Using Mipmap
Mesa: error: GL_INVALID_ENUM in glTexParameter(param=GL_NEAREST_MIPMAP_LINEAR)
Process 63969 stopped
* thread Perl-GPU/OpenGL-GLUT#1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x348)
    frame #0: 0x00000001eff1d164 libGLU.dylib`closestFit(_CGLContextObject*, unsigned int, int, int, int, unsigned int, unsigned int, int*, int*) + 176
libGLU.dylib`closestFit:
->  0x1eff1d164 <+176>: ldr    x8, [x25, #0x348]
    0x1eff1d168 <+180>: ldr    x0, [x25]
    0x1eff1d16c <+184>: add    x2, sp, #0x38
    0x1eff1d170 <+188>: mov    w1, #0xd33
Target 0: (perl) stopped.
Process 63969 launched: '/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl' (arm64)
(lldb) bt
* thread Perl-GPU/OpenGL-GLUT#1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x348)
  * frame #0: 0x00000001eff1d164 libGLU.dylib`closestFit(_CGLContextObject*, unsigned int, int, int, int, unsigned int, unsigned int, int*, int*) + 176
    frame Perl-GPU/OpenGL-GLUT#1: 0x00000001eff24214 libGLU.dylib`gluBuild2DMipmapsCTX + 156
    frame Perl-GPU/OpenGL-GLUT#2: 0x0000000103374d94 OpenGL.bundle`XS_OpenGL_gluBuild2DMipmaps_c(cv=<unavailable>) at pogl_glu.xs:470:10 [opt]
    frame Perl-GPU/OpenGL-GLUT#3: 0x00000001000f44a4 perl`Perl_pp_entersub [inlined] Perl_rpp_invoke_xs(cv=0x0000000118076ad0) at inline.h:1193:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#4: 0x00000001000f449c perl`Perl_pp_entersub at pp_hot.c:6495:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#5: 0x000000010005b588 perl`Perl_runops_debug at dump.c:2866:23 [opt]
    frame Perl-GPU/OpenGL-GLUT#6: 0x000000010002dc20 perl`S_run_body(oldscope=1) at perl.c:0 [opt]
    frame Perl-GPU/OpenGL-GLUT#7: 0x000000010002d8d8 perl`perl_run(my_perl=<unavailable>) at perl.c:2780:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#8: 0x0000000100003048 perl`main(argc=<unavailable>, argv=<unavailable>, env=0x000000016fdfea70) at perlmain.c:127:9 [opt]
    frame Perl-GPU/pogl#5: 0x000000018a30bfd8 dyld`start + 2412
(lldb) 

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 13, 2025

As noted in the above-linked commit, all this time glTexParameteri has been getting called with incorrect parameters (see https://registry.khronos.org/OpenGL-Refpages/gl4/html/glTexParameter.xhtml). The commit fixes that.

@goosh-gh
Copy link

I re-downloaded the pogl-master today, and tried using lldb (provided by Apple at /usr/bin/lldb, instead of /opt/local/bin/lldb-19, provided by MacPorts and I used above) with the "second case" machine. The results including back trace follow (looks like basically the same?).

$ lldb --version
lldb-1403.0.17.67
Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)

$ lldb perl -o 'run -Mblib test.pl'
    --- skipped many lines
Using POGL v0.7002
Using Mipmap
Mesa: error: GL_INVALID_ENUM in glTexParameter(param=GL_NEAREST_MIPMAP_LINEAR)
Process 82966 stopped
* thread Perl-GPU/OpenGL-GLUT#1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x348)
    frame #0: 0x00000001eff1d164 libGLU.dylib`closestFit(_CGLContextObject*, unsigned int, int, int, int, unsigned int, unsigned int, int*, int*) + 176
libGLU.dylib`closestFit:
->  0x1eff1d164 <+176>: ldr    x8, [x25, #0x348]
    0x1eff1d168 <+180>: ldr    x0, [x25]
    0x1eff1d16c <+184>: add    x2, sp, #0x38
    0x1eff1d170 <+188>: mov    w1, #0xd33
Target 0: (perl) stopped.
Process 82966 launched: '/Users/my_home/perl5/perlbrew/perls/5.40.1-NoUsrLocal-debug/bin/perl' (arm64)
(lldb) bt
* thread Perl-GPU/OpenGL-GLUT#1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x348)
  * frame #0: 0x00000001eff1d164 libGLU.dylib`closestFit(_CGLContextObject*, unsigned int, int, int, int, unsigned int, unsigned int, int*, int*) + 176
    frame Perl-GPU/OpenGL-GLUT#1: 0x00000001eff24214 libGLU.dylib`gluBuild2DMipmapsCTX + 156
    frame Perl-GPU/OpenGL-GLUT#2: 0x0000000101820d94 OpenGL.bundle`XS_OpenGL_gluBuild2DMipmaps_c(cv=<unavailable>) at pogl_glu.xs:470:10 [opt]
    frame Perl-GPU/OpenGL-GLUT#3: 0x00000001000f4478 perl`Perl_pp_entersub [inlined] Perl_rpp_invoke_xs(cv=0x000000010135a0e8) at inline.h:1193:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#4: 0x00000001000f4470 perl`Perl_pp_entersub at pp_hot.c:6495:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#5: 0x000000010005b55c perl`Perl_runops_debug at dump.c:2866:23 [opt]
    frame Perl-GPU/OpenGL-GLUT#6: 0x000000010002dbf4 perl`S_run_body(oldscope=1) at perl.c:0 [opt]
    frame Perl-GPU/OpenGL-GLUT#7: 0x000000010002d8ac perl`perl_run(my_perl=<unavailable>) at perl.c:2780:9 [opt]
    frame Perl-GPU/OpenGL-GLUT#8: 0x000000010000301c perl`main(argc=<unavailable>, argv=<unavailable>, env=0x000000016fdfe7e8) at perlmain.c:127:9 [opt]
    frame Perl-GPU/pogl#5: 0x000000018a30bfd8 dyld`start + 2412
(lldb) 

Is there anything else I can do to clarify the situation?

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 13, 2025

I re-downloaded the pogl-master today, and tried using lldb (provided by Apple at /usr/bin/lldb, instead of /opt/local/bin/lldb-19, provided by MacPorts and I used above) with the "second case" machine. The results including back trace follow (looks like basically the same?).
[...]
Is there anything else I can do to clarify the situation?

You'll notice you're referring to pogl, a different repo. Its test.pl is similar to the one here, but not identical. I have now copied across the change referred to into the pogl repo, so its master should now pass the tests and install. Then this repo (OpenGL-GLUT) should also. Could I ask you to try both of those and report results? Also, it would help if you can say if it opened a window and showed a spinning cube?

You may think it's confusing and/or redundant to have two similar but not identical things. I do too, and will soon be reunifying them; but I want to get them both working properly first, which involves finding and fixing various bugs. This has included adding error-checking (which you'd think was important in a test program), which caught the wrong enum being passed, since about 2008.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 13, 2025

Another thing I intend to do on MacOS is to get it finding the "frameworks" as Derek highlighted; this is because the current Makefile.PL treats all of the things returned by its lib-finding function should be prefixed with -l, which is wrong, and they should come out prefixed with either -l or -framework as appropriate.

@oalders
Copy link

oalders commented Mar 13, 2025

I think I'm different hardware now, so I tested this on a newer and older iMac and both of them installed cleanly. Both are running 5.40.0

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 19, 2025

Transferring this to pogl, where this module and functionality now live.

@mohawk2 mohawk2 transferred this issue from Perl-GPU/OpenGL-GLUT Mar 19, 2025
@goosh-gh
Copy link

(OpenGL::GLUT master now needs the OpenGL module to be installed, so the following is my try about OpenGL module)

$ pwd
/Users/my_home/.cpan/build/OpenGL-0.7004
$ perl Makefile.PL

run as `perl Makefile.PL help` to show user options
$verbose set to 0 - enable by running as `perl Makefile.PL verbose`

2025-03-22 09:38:11.039 glversion[31392:927762] GLUT Warning: invalid glutGet parameter: 508
This looks like OpenGL Version: 2.1 Metal - 83.1
Found GLUT - Version: 5

Using interface: FREEGLUT

Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for OpenGL
Writing MYMETA.yml and MYMETA.json


$ make; make test;
PERL_DL_NONLAZY=1 "/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl
OpenGL Test App (using hires timer)
make: *** [test_dynamic] Segmentation fault: 11

$ lldb perl -o 'run -Mblib test.pl'
(lldb) target create "perl"
Current executable set to 'perl' (arm64).
(lldb) run -Mblib test.pl

OpenGL Test App (using hires timer)

Process 32807 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3b0)
    frame #0: 0x0000000207d10540 libGL.dylib`glGetString + 12
libGL.dylib`glGetString:
->  0x207d10540 <+12>: ldr    x2, [x8, #0x3b0]
    0x207d10544 <+16>: ldr    x0, [x8]
    0x207d10548 <+20>: braaz  x2

libGL.dylib`glGetTexEnvfv:
    0x207d1054c <+0>:  mov    x3, x2
Target 0: (perl) stopped.
Process 32807 launched: '/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl' (arm64)
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3b0)
  * frame #0: 0x0000000207d10540 libGL.dylib`glGetString + 12
    frame #1: 0x0000000100cffa84 V1.bundle`XS_OpenGL_glGetString(cv=<unavailable>) at V1.xs:1617:21 [opt]
    frame #2: 0x00000001000f44a4 perl`Perl_pp_entersub [inlined] Perl_rpp_invoke_xs(cv=0x000000010191f248) at inline.h:1193:9 [opt]
    frame #3: 0x00000001000f449c perl`Perl_pp_entersub at pp_hot.c:6495:9 [opt]
    frame #4: 0x000000010005b588 perl`Perl_runops_debug at dump.c:2866:23 [opt]
    frame #5: 0x000000010002dc20 perl`S_run_body(oldscope=1) at perl.c:0 [opt]
    frame #6: 0x000000010002d8d8 perl`perl_run(my_perl=<unavailable>) at perl.c:2780:9 [opt]
    frame #7: 0x0000000100003048 perl`main(argc=<unavailable>, argv=<unavailable>, env=0x000000016fdff070) at perlmain.c:127:9 [opt]
    frame #8: 0x00000001a1f67fd8 dyld`start + 2412
(lldb) 

While the lldb session, I can see a separate window titled "OpenGL Test App" is successfully opened but it shows nothing

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 27, 2025

@goosh-gh Thank you for sticking with this! I didn't fully spell it out, but will here: OpenGL::GLUT is now just part of this repo, which should simplify things a bit.

The above stacktrace says to me that what's now crashing is nothing to do with GLUT, and is just glGetString crashing. The test.pl calls it:

pogl/test.pl

Line 1624 in ed2bcc3

my $version = glGetString(GL_VERSION);

My latest ask is: can you please run perl -Mblib -MOpenGL=:all -e 'printf "%x\n", GL_VERSION' so we know what value is being passed to glGetString? On many platforms including MacOS it's 0x1F02 (which is 7938 in decimal - EDIT previously I said 498 but this was from some bizarrely inaccurate googling). NOTE the next step only works sensibly if you edit the Makefile to change OPTIMIZE to only -g - higher optimisation makes it hard to print values.

Then, doing lldb as above, could you do after the bt, frame select 1 then p name which should show the same value as the GL_VERSION above. When I see that, I should have a better idea what's going on.

@goosh-gh
Copy link

PBdbg) pwd
/Users/my_home/.cpan/build/OpenGL-0.7004-2
PBdbg) perl Makefile.PL

run as `perl Makefile.PL help` to show user options
$verbose set to 0 - enable by running as `perl Makefile.PL verbose`

2025-03-28 01:00:14.161 glversion[36738:697134] GLUT Warning: invalid glutGet parameter: 508
This looks like OpenGL Version: 2.1 Metal - 83.1
Found GLUT - Version: 5

Using interface: FREEGLUT

Generating a Unix-style Makefile
Writing Makefile for OpenGL
Writing MYMETA.yml and MYMETA.json
PBdbg) vi Makefile
# OPTIMIZE = -O3 -g
 OPTIMIZE = -g
PBdbg) make; make test
 - - - skipped many lines  - - -
PERL_DL_NONLAZY=1 "/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl

OpenGL Test App (using hires timer)

make: *** [test_dynamic] Segmentation fault: 11
PBdbg) lldb perl -o 'run -Mblib test.pl'
(lldb) target create "perl"
Current executable set to 'perl' (arm64).
(lldb) run -Mblib test.pl

OpenGL Test App (using hires timer)

Process 37913 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3b0)
    frame #0: 0x00000001fe49c540 libGL.dylib`glGetString + 12
libGL.dylib`glGetString:
->  0x1fe49c540 <+12>: ldr    x2, [x8, #0x3b0]
    0x1fe49c544 <+16>: ldr    x0, [x8]
    0x1fe49c548 <+20>: braaz  x2

libGL.dylib`glGetTexEnvfv:
    0x1fe49c54c <+0>:  mov    x3, x2
Target 0: (perl) stopped.
Process 37913 launched: '/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl' (arm64)
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3b0)
  * frame #0: 0x00000001fe49c540 libGL.dylib`glGetString + 12
    frame #1: 0x0000000100b10880 V1.bundle`XS_OpenGL_glGetString(cv=0x000000010191f248) at V1.xs:1617:21
    frame #2: 0x00000001000f44a4 perl`Perl_pp_entersub [inlined] Perl_rpp_invoke_xs(cv=0x000000010191f248) at inline.h:1193:9 [opt]
    frame #3: 0x00000001000f449c perl`Perl_pp_entersub at pp_hot.c:6495:9 [opt]
    frame #4: 0x000000010005b588 perl`Perl_runops_debug at dump.c:2866:23 [opt]
    frame #5: 0x000000010002dc20 perl`S_run_body(oldscope=1) at perl.c:0 [opt]
    frame #6: 0x000000010002d8d8 perl`perl_run(my_perl=<unavailable>) at perl.c:2780:9 [opt]
    frame #7: 0x0000000100003048 perl`main(argc=<unavailable>, argv=<unavailable>, env=0x000000016fdff070) at perlmain.c:127:9 [opt]
    frame #8: 0x00000001986f3fd8 dyld`start + 2412
(lldb) frame select 1
frame #1: 0x0000000100b10880 V1.bundle`XS_OpenGL_glGetString(cv=0x000000010191f248) at V1.xs:1617:21
   1614		GLenum	name
   1615		CODE:
   1616		{
-> 1617			char * c = (char*)glGetString(name);
   1618			if (c)
   1619				RETVAL = newSVpv(c, 0);
   1620			else
(lldb) p name
(GLenum) $0 = 7938
(lldb) ^D

PBdbg) perl -Mblib -MOpenGL=:all -e 'printf "%x\n", GL_VERSION'
1f02

I am not sure the above process is what you really want. FYI,
$ perl Makefile.PL interface=AGL
fails to detect AGL and default to select freeglut. Even editing the Makefile as follows (which I believe the correct way to use the system frameworks...) does not save me:
LDFLAGS = -mmacosx-version-min=13.7 -fstack-protector-strong -L/usr/local/lib -L/opt/local/lib -F/System/Library/Frameworks -framework AGL -framework OpenGL -framework GLUT

Anything else I can do?

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 27, 2025

@goosh-gh The error you're getting resembles that in https://www.reddit.com/r/opengl/comments/gimkve/comment/fqha41s/ especially the address (0x3b0). That implies that a glewInit-like activity of actually loading values into the function pointers such as glGetString isn't happening.

I note you're using MacPorts, which as discussed elsewhere isn't fantastic at keeping up with the latest versions of things. Are you able to switch to Homebrew, which to my mind is far superior? If not, please can you say what versions you have of:

  • Perl
  • FreeGLUT
  • MacOS
  • XQuartz
  • Mesa

The last one is especially important because I think with FreeGLUT as it currently is (though there's movement to actually support Cocoa, i.e. native MacOS) it uses Mesa, which uses XQuartz and this might be a bug in older Mesa that's now fixed.

But first could you please start over but having installed the latest ExtUtils::MakeMaker? That has fixes for LIBS=-framework ....

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 27, 2025

MacPorts latest is 24.3.4 (https://ports.macports.org/port/mesa/details/).
Homebrew to my surprise is earlier with 24.2.8 (https://formulae.brew.sh/formula/mesa).
Latest Mesa is 25.0.2 (https://www.mesa3d.org/).

Let's see what version we're dealing with on @goosh-gh's system!

@goosh-gh
Copy link

MacPorts base version 2.10.5 installed
MacOS Ventura 13.7.4

$ port info mesa
mesa @24.3.4 (x11, graphics)

$ port info freeglut
freeglut @3.6.0 (x11, graphics)

$ port info xorg-server
xorg-server @1.20.11_1

$ port info p5.34-extutils-makemaker
p5.34-extutils-makemaker @7.720.0 (perl)

$) grep LIBS  Makefile | grep framework
$)  . . . . . nothing returned 

This machine has some old setup, as described above as the "second case".
XQuartz was installed at /opt/X11 via XQuartz-2.8.5.pkg
I tried to compile mesa 25.0.2 by myself but failed currently, may need some more time to get it work.

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 27, 2025

That's quite an old version of MacOS - I have 15.3 here. Is it possible at all to try all this code on a newer MacOS version? Or at least, with Homebrew versions of these programs rather than the MacPorts versions?

EDIT And to be clear, you're still getting the same results with the latest EUMM?

@goosh-gh
Copy link

goosh-gh commented Mar 27, 2025

On the "first case" above;

MacOS 15.3.2
MacPorts base version 2.10.5 installed
$ port info mesa
mesa @24.3.4 (x11, graphics)
$ port info freeglut
freeglut @3.6.0 (x11, graphics)
$ port info xorg-server
xorg-server @1.20.11_1 (x11, devel)
$ port info p5.34-extutils-makemaker
p5.34-extutils-makemaker @7.720.0 (perl)
$ pwd
/Users/my_home/.cpan/build/OpenGL-0.7004-0
$ perl Makefile.PL

run as `perl Makefile.PL help` to show user options
$verbose set to 0 - enable by running as `perl Makefile.PL verbose`

2025-03-28 08:44:25.557 glversion[5227:34415] GLUT Warning: invalid glutGet parameter: 508
This looks like OpenGL Version: 2.1 Metal - 89.3
Found GLUT - Version: 5

Using interface: FREEGLUT

Generating a Unix-style Makefile
Writing Makefile for OpenGL
Writing MYMETA.yml and MYMETA.json
$ make test
 - - - skip several lines - - -
PERL_DL_NONLAZY=1 "/Users/my_home/perl5/perlbrew/perls/5.40.1-debug/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl

stucks here and does not return to the command prompt, so I cannot try lldb here as reported above. But I can examine GL_VERSION after make finished;

$ perl -Mblib -MOpenGL=:all -e 'printf "%x\n", GL_VERSION'
1f02

@mohawk2
Copy link
Contributor Author

mohawk2 commented Mar 30, 2025

@goosh-gh Could I ask you to try installing OpenGL::Modern on your two machine? That uses GLEW-like semantics and may avoid this problem.

That's partly motivated because PDL is about to switch to using GLFW and OpenGL::Modern, and I aim to switch this distro over to using OpenGL::Modern "under the hood" also, so this will give me early warning of whether these problems will exist in that scenario too.

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

4 participants