Bug in OpenGL-detection in src/configure? [Solved]

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Bug in OpenGL-detection in src/configure? [Solved]

Post by phibxr »

The configure-script fails to detect OpenGL, even when given the prefix at the commandline. Other configure-scripts works (i.e. mplayers').

I don't know much at all about configscripts, but the detection seems to return -L/path/to/opengl instead of -L /path/to/opengl. Maybe this is common behaviour for these things though. :S
Last edited by phibxr on Fri Feb 18, 2005 3:10 pm, edited 1 time in total.
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Try running autogen.sh [via ./autogen.sh].
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

Code: Select all

$ sh autogen.sh
Generating build information using aclocal and autoconf...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for nasm... nasm
checking for a BSD-compatible install... /bin/install -c
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.1.0... yes
checking for libpng - version >= 1.2.0... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers /usr/X11R6/include
checking for glGetError in -lGL... no
checking for OpenGL... no
checking if you want gdb friendly executable... no
checking which processor class to optimize for... 686
checking for egrep... grep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether sys/types.h defines makedev... no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged


ZSNES v1.42

SDL support                         Version 1.2.7
NASM support                        NASM version 0.98.38 compiled on Jan 31 2005
ZLib support                        Version 1.2.2
PNG support (png screenshots)       Yes, version 1.2.7
OpenGL support                      Disabled, library not found

The binary will be installed in /usr/local/bin

Configure complete, now type 'make' and pray.
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

You probably don't have OpenGL properly installed, then.
mnk
Rookie
Posts: 20
Joined: Sat Feb 05, 2005 12:32 am

Post by mnk »

I belive that the previous poster is wrong. Why ?
Cause I ran into similar problem here and had to edit configure script to set OpenGL as
detected no matter what. After that it compiled and ran fine (well, as fine as OpenGL runs on
S3 Virge, namely lousy). Why do I still say that OpenGL detection is broken ?
Cause it probably uses a wrong method - OpenGL is detected correctly by snes9x configure
script (yeah, it does run lousy there too).
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

I'm using Gentoo, and Portage usually does a pretty good job at installing libs where they should be. This is the first configure-script that complains about OpenGL. I even think older WIPs are working. :S
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

The configure script detects OpenGL correctly in Cygwin...
mnk
Rookie
Posts: 20
Joined: Sat Feb 05, 2005 12:32 am

Post by mnk »

Well, I'm using Gentoo too, but as I said snes9x doesn't have a problem
detecting OpenGL.
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

Well, virtually nothing except for ZSnes seems to have a problem. Maybe the maintainers of the config-script should submit a patch to the OpenGL-team. ;D
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

Is this a Gentoo-only problem? I've tried the three latest WIPs on four Gentoo-machines now, and the OpenGL-detection doesn't work on any of them. o_O
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

I never had a problem with OpenGL in Gentoo, with the WIPs. This is probably because I use the nvidia OpenGL driver, but I dunno.

:installed Gentoo with 2004.1 LiveCD if that matters any.
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

That's odd. All of the machines have been using the nvidia-driver - and my own too.
Radja

Post by Radja »

mnk wrote:I belive that the previous poster is wrong. Why ?
Cause I ran into similar problem here and had to edit configure script to set OpenGL as
detected no matter what. After that it compiled and ran fine (well, as fine as OpenGL runs on
S3 Virge, namely lousy). Why do I still say that OpenGL detection is broken ?
Cause it probably uses a wrong method - OpenGL is detected correctly by snes9x configure
script (yeah, it does run lousy there too).
how did you do that?

i have the very same problem under debian win ati drivers (radeon 7000 using default xfree ati drivers), precompiled .deb works fine, but i cannot compile
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

Neither can I. You can "force" it to believe that OpenGL has been detected by changing:

Code: Select all

if test $ac_cv_lib_GL_glGetError = yes; then
  found_opengl="yes"
fi
to:

Code: Select all

found_opengl="yes"
, but probably this won't result in anything that can be compiled without errors. I get errors during the linking when I do this.

I've tried to set --with-opengl-prefix=/usr, /usr/lib, /usr/lib/opengl, /usr/lib/opengl/xorg-x11 and /usr/lib/opengl/nvidia without results.

No other configurescripts complain about OpenGL, and all of my other OpenGL-applications work perfectly. ¤_¤

Here is my /usr/lib/opengl:

Code: Select all

global/include:
total 312
drwxr-xr-x  2 root root   4096  2 sep 13.52 .
drwxr-xr-x  3 root root   4096  2 sep 13.52 ..
-rw-r--r--  1 root root 306424  2 jan 19.30 glext.h

nvidia/extensions:
total 576
drwxr-xr-x  2 root root   4096 10 feb 04.52 .
drwxr-xr-x  6 root root   4096 10 feb 04.52 ..
-rwxr-xr-x  1 root root 577444 10 feb 04.52 libglx.so

nvidia/include:
total 308
drwxr-xr-x  2 root root   4096 10 feb 04.52 .
drwxr-xr-x  6 root root   4096 10 feb 04.52 ..
-rw-r--r--  1 root root 199300 10 feb 04.52 glext.h
-rw-r--r--  1 root root  73008 10 feb 04.52 gl.h
-rw-r--r--  1 root root  11197 10 feb 04.52 glx.h
-rw-r--r--  1 root root  11485 10 feb 04.52 glxtokens.h

nvidia/lib:
total 7532
drwxr-xr-x  2 root root    4096 10 feb 04.52 .
drwxr-xr-x  6 root root    4096 10 feb 04.52 ..
lrwxrwxrwx  1 root root      21 10 feb 04.52 libGLcore.so -> libGLcore.so.1.0.6629
lrwxrwxrwx  1 root root      21 10 feb 04.52 libGLcore.so.1 -> libGLcore.so.1.0.6629
-rwxr-xr-x  1 root root 7230360 10 feb 04.52 libGLcore.so.1.0.6629
-rw-r--r--  1 root root     739 10 feb 04.52 libGL.la
lrwxrwxrwx  1 root root      17 10 feb 04.52 libGL.so -> libGL.so.1.0.6629
lrwxrwxrwx  1 root root      17 10 feb 04.52 libGL.so.1 -> libGL.so.1.0.6629
-rwxr-xr-x  1 root root  442592 10 feb 04.52 libGL.so.1.0.6629
lrwxrwxrwx  1 root root      25 10 feb 04.52 libnvidia-tls.so -> libnvidia-tls.so.1.0.6629
lrwxrwxrwx  1 root root      25 10 feb 04.52 libnvidia-tls.so.1 -> libnvidia-tls.so.1.0.6629
-rwxr-xr-x  1 root root    2352 10 feb 04.52 libnvidia-tls.so.1.0.6629

nvidia/tls:
total 12
drwxr-xr-x  2 root root 4096 10 feb 04.52 .
drwxr-xr-x  6 root root 4096 10 feb 04.52 ..
lrwxrwxrwx  1 root root   25 10 feb 04.52 libnvidia-tls.so -> libnvidia-tls.so.1.0.6629
lrwxrwxrwx  1 root root   25 10 feb 04.52 libnvidia-tls.so.1 -> libnvidia-tls.so.1.0.6629
-rwxr-xr-x  1 root root 2004 10 feb 04.52 libnvidia-tls.so.1.0.6629

xorg-x11/extensions:
total 488
drwxr-xr-x  2 root root   4096 31 jan 12.28 .
drwxr-xr-x  5 root root   4096 31 jan 12.28 ..
-r--r--r--  1 root root 486844 31 jan 12.27 libglx.a

xorg-x11/include:
total 428
drwxr-xr-x  2 root root   4096 31 jan 12.28 .
drwxr-xr-x  5 root root   4096 31 jan 12.28 ..
-r--r--r--  1 root root 306424 31 jan 12.27 glext.h
-r--r--r--  1 root root  89951 31 jan 12.27 gl.h
-r--r--r--  1 root root   9016 31 jan 12.27 glx.h
-r--r--r--  1 root root   8878 31 jan 12.27 glxtokens.h

xorg-x11/lib:
total 1292
drwxr-xr-x  2 root root   4096 31 jan 12.28 .
drwxr-xr-x  5 root root   4096 31 jan 12.28 ..
-rw-r--r--  1 root root 685304 31 jan 12.27 libGL.a
-rw-r--r--  1 root root    780 31 jan 12.27 libGL.la
lrwxrwxrwx  1 root root     12 31 jan 12.28 libGL.so -> libGL.so.1.2
lrwxrwxrwx  1 root root     12 31 jan 12.28 libGL.so.1 -> libGL.so.1.2
-rwxr-xr-x  1 root root 610763 31 jan 12.27 libGL.so.1.2
lrwxrwxrwx  1 root root     12 31 jan 12.28 libMesaGL.so -> libGL.so.1.2
Here is my glxinfo:

Code: Select all

$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_NV_float_buffer
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce2 MX/AGP/SSE
OpenGL version string: 1.5.2 NVIDIA 66.29
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters,
    GL_ARB_point_sprite, GL_ARB_shader_objects, GL_ARB_shading_language_100,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_rectangle, GL_ARB_transpose_matrix,
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
    GL_ARB_window_pos, GL_S3_s3tc, GL_EXT_texture_env_add, GL_EXT_abgr,
    GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_minmax,
    GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_compiled_vertex_array, GL_EXT_Cg_shader,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shared_texture_palette,
    GL_EXT_stencil_wrap, GL_EXT_texture_compression_s3tc,
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_fence,
    GL_NV_fog_distance, GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,
    GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_register_combiners,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_NV_vertex_array_range,
    GL_NV_vertex_array_range2, GL_NV_vertex_program, GL_NV_vertex_program1_1,
    GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SGIS_texture_lod,
    GL_SUN_slice_accum
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
----------------------------------------------------------------------
0x21 24 tc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x22 24 dc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x23 24 tc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x24 24 tc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x25 24 tc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x26 24 tc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x27 24 tc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x28 24 tc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x29 24 tc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x2a 24 tc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x2b 24 tc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x2c 24 tc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x2d 24 tc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x2e 24 dc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x2f 24 dc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x30 24 dc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x31 24 dc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x32 24 dc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x33 24 dc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x34 24 dc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x35 24 dc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x36 24 dc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x37 24 dc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x38 24 dc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None


display: :0  screen: 1
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_NV_float_buffer
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce2 MX/AGP/SSE
OpenGL version string: 1.5.2 NVIDIA 66.29
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters,
    GL_ARB_point_sprite, GL_ARB_shader_objects, GL_ARB_shading_language_100,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_rectangle, GL_ARB_transpose_matrix,
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
    GL_ARB_window_pos, GL_S3_s3tc, GL_EXT_texture_env_add, GL_EXT_abgr,
    GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_minmax,
    GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_compiled_vertex_array, GL_EXT_Cg_shader,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shared_texture_palette,
    GL_EXT_stencil_wrap, GL_EXT_texture_compression_s3tc,
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_fence,
    GL_NV_fog_distance, GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,
    GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_register_combiners,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_NV_vertex_array_range,
    GL_NV_vertex_array_range2, GL_NV_vertex_program, GL_NV_vertex_program1_1,
    GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SGIS_texture_lod,
    GL_SUN_slice_accum
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
----------------------------------------------------------------------
0x8a 24 tc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x8b 24 dc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x8c 24 tc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x8d 24 tc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x8e 24 tc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x8f 24 tc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x90 24 tc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x91 24 tc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x92 24 tc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x93 24 tc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x94 24 tc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x95 24 tc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x96 24 tc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x97 24 dc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x98 24 dc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x99 24 dc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x9a 24 dc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x9b 24 dc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x9c 24 dc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x9d 24 dc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x9e 24 dc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x9f 24 dc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0xa0 24 dc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0xa1 24 dc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Look in a working configure script for the OpenGL test and paste it, then.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

I experience this too.

Something went bad either with some recent configure changes zsnes-side, or they botched something gentoo-side with autoconf/make on this matter.

Code: Select all

configure:2062: checking for glGetError in -lGL
configure:2081: gcc -o conftest  -pipe -I. -Wall -I/usr/local/include -I/usr/include -D__LINUX__  -I/usr/include/SDL -D_REENTRANT    -L/usr/local/lib -L/usr/lib  -lz -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread  -lpng -lm -L conftest.c -lGL   1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2070 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char glGetError();

int main() {
glGetError()
; return 0; }
There's definitely something wrong somewhere. I'll check the zsnes-side as soon as fscking SourceForge anonymous CVS is up again.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

grinvader wrote:I experience this too.

Something went bad either with some recent configure changes zsnes-side, or they botched something gentoo-side with autoconf/make on this matter.

Code: Select all

configure:2062: checking for glGetError in -lGL
configure:2081: gcc -o conftest  -pipe -I. -Wall -I/usr/local/include -I/usr/include -D__LINUX__  -I/usr/include/SDL -D_REENTRANT    -L/usr/local/lib -L/usr/lib  -lz -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread  -lpng -lm -L conftest.c -lGL   1>&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2070 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char glGetError();

int main() {
glGetError()
; return 0; }
There's definitely something wrong somewhere. I'll check the zsnes-side as soon as fscking SourceForge anonymous CVS is up again.
Ah. Yes. The glGetError-check is the one that fails here too. Are you able to compile old releases?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Nope. This is likely a Gentoo-side trouble.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

We've [grinvader and I] looked at config.log, and are scratching our heads, since it's failing because the linker can't find main() in the compiled object, yet main() is clearly defined. We don't know why this is, so if anyone wants to step forward and tell us what to do, be our guest.
DarkStalker

Post by DarkStalker »

Okay guys, I stumbled across the same problem myself earlier today and figured it out.

Here's the deal. Gentoo allows you to use multiple opengl interfaces and lets you switch freely between them with the opengl-update command. Because of that, portage has to do a little extra fancy stuff to make sure that the opengl libraries are found. Of course, this stuff isn't included in the ZSNES source distro for obvious reasons.

Portage applies a fix to the source which can be found in /usr/portage/games-emulation/zsnes/files/1.42-configure.patch. Now you could probably apply this same patch to the ZSNES source to get it to compile fine with opengl support.

Or you could do things the Gentoo way.

If you don't already have a portage overlay...

Code: Select all

# nano -w /etc/make.conf
...and insert the following line.

Code: Select all

PORTDIR_OVERLAY="/usr/local/portage"
At this point, we'll create the directories needed and switch to it.

Code: Select all

# mkdir -p /usr/local/portage/games-emulation/zsnes/
# cd /usr/local/portage/games-emulation/zsnes/
Create the following file as zsnes-20050210.ebuild.

Code: Select all

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.42.ebuild,v 1.2 2005/01/24 22:07:15 mr_bones_ Exp $

RESTRICT="nomirror"
inherit eutils flag-o-matic games

DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/"
SRC_URI="http://www.ipherswipsite.com/files/zsnes/ZSNESS_0210.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 x86"
IUSE="opengl png"

# we need libsdl for headers on amd64, even though we'll technically be using
# the 32bit sdl from emul-linux-x86-sdl.
RDEPEND="virtual/libc
        >=media-libs/libsdl-1.2.0
        >=sys-libs/zlib-1.1
        amd64? ( app-emulation/emul-linux-x86-sdl )
        opengl? ( virtual/opengl )
        png? ( media-libs/libpng )"
DEPEND="${RDEPEND}
        >=dev-lang/nasm-0.98
        sys-devel/automake
        >=sys-devel/autoconf-2.58"

S="${WORKDIR}/zsnes"

multilib_check() {
        if has_m32 ; then
                einfo "multilib detected, adding -m32 to CFLAGS. note that opengl"
                einfo "support probably wont work quite right."
                append-flags -m32
        else
                die "zsnes requires multilib support in gcc. please re-emerge gcc with multilib in USE and try again"
        fi
}

src_unpack() {
        unpack ${A}
        cd "${S}"/src
        cp "icons/48x48x32.png" "${T}/zsnes.png"
        epatch "${FILESDIR}"/1.42-configure.patch
        aclocal && autoconf || die "autotools failed"
}

src_compile() {
        use amd64 && multilib_check
        cd src
        egamesconf \
                $(use_enable png libpng) \
                $(use_enable opengl) \
                || die
        emake || die "emake failed"
}

src_install() {
        dogamesbin src/zsnes || die "dogamesbin failed"
        newman src/linux/zsnes.1 zsnes.6
        dodoc docs/{*.txt,README.LINUX}
        dohtml -r docs/Linux/*
        make_desktop_entry zsnes ZSNES zsnes.png
        doicon "${T}/zsnes.png"
        prepgamesdirs
}

Now, we have to copy the configure patch file I mentioned earlier.

Code: Select all

# cp /usr/portage/games-emulation/zsnes/files/1.42-configure.patch /usr/local/portage/games-emulation/zsnes/files/
We'll have to setup the ebuild digest now.

Code: Select all

# ebuild /usr/local/portage/games-emulation/zsnes/zsnes-20050210.ebuild digest
This should download the latest WIP source from ipher's website. If it doesn't work or takes too long, just grab the file manually and throw it into /usr/portage/distfiles/.

You will have to tell portage that you want a testing version of zsnes installed. We'll do that by...

Code: Select all

# echo "games-emulation/zsnes ~x86" >> /etc/portage/package.keywords
Now let's see what portage gives us.

Code: Select all

# emerge -pv zsnes
If it spits out the 20050210 version, we're in business. All you need to do now is emerge it.

Code: Select all

# emerge zsnes
Now, I haven't fully tested out the ebuild, but it's worked for me so far. Your milage may vary. If anyone would like, I might just make some Gentoo ebuilds for each new WIP posted to ipher's site if anyone's interested. If you have any questions, let me know.

Hope this helps.
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

We've found a fix for it.

In configure.in, find:

Code: Select all

LDFLAGS="$LDFLAGS x$x_libraries"
Above it, add:

Code: Select all

if test x$x_libraries != x; then
Below it, add:

Code: Select all

fi
OpenGL should thusly be detectable.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

By 'We', Aerdan means that he had the idea to check the gentoo portage patch, and thus whoever made it is to be credited.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

Aerdan wrote:We've found a fix for it.

In configure.in, find:

Code: Select all

LDFLAGS="$LDFLAGS x$x_libraries"
Above it, add:

Code: Select all

if test x$x_libraries != x; then
Below it, add:

Code: Select all

fi
OpenGL should thusly be detectable.
Wow. That worked perfectly. Thanks. o_O
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

This fix is now in CVS, along with a debug flag correction.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
phibxr
Rookie
Posts: 30
Joined: Sun Aug 08, 2004 5:53 pm
Location: Stockholm, Sweden.

Post by phibxr »

grinvader wrote:This fix is now in CVS, along with a debug flag correction.
Many thanks to those involved in fixing this.
Post Reply