# New Ticket Created by Reini Urban # Please include the string: [perl #57006] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57006 >
--- osname= cygwin osvers= 1.5.25(0.15642) arch= cygwin-thread-multi-64int cc= gcc --- Flags: category=core severity=medium ack=no --- Attached patch adds a new cygwin option to Parrot::Configure::Step::Methods::_add_to_libs() to support a cygwin override over the "interesting" assumption that mingw eq cygwin library wise. And it fixes the opengl compilation on non-existing mingw libs, which is the unfortunate general on cygwin. --- Summary of my parrot 0.6.4 (r0) configuration: configdate='Wed Jul 16 18:18:25 2008 GMT' Platform: osname=cygwin, archname=cygwin-thread-multi-64int jitcapable=1, jitarchname=i386-cygwin, jitosname=CYGWIN, jitcpuarch=i386 execcapable=1 perl=/usr/bin/perl.exe Compiler: cc='gcc', ccflags='-U__STRICT_ANSI__ -pipe -I/usr/local/include -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16 -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -DDISABLE_GC_DEBUG=1 -DNDEBUG -O3 -DHAS_GETTEXT', Linker and Libraries: ld='gcc', ldflags=' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib', cc_ldflags='', libs='-ldl -lcrypt -lgmp -lreadline -lpcre -lglut -lGLU -lGL -lcrypto -lintl' Dynamic Linking: share_ext='.dll', ld_share_flags='-shared', load_ext='.dll', ld_load_flags='-shared' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: CYGWIN =server HOME =/home/rurban LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =/usr/src/perl/parrot/parrot-0.6.3-1/build/blib/lib:~/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/usr/bin:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Programme/ATI Technologies/ATI.ACE/Core-Static:/usr/local/bin:/usr/lib/gstreamer-0.8:/usr/lib/lapack SHELL (unset)
difforig config/auto/opengl.pm lib/Parrot/Configure/Step/Methods.pm diff -u config/auto/opengl.pm.orig config/auto/opengl.pm --- config/auto/opengl.pm.orig 2008-06-02 17:35:05.000000000 +0000 +++ config/auto/opengl.pm 2008-07-16 18:52:29.906250000 +0000 @@ -110,10 +110,13 @@ XXXX: No details yet -=head3 cygwin +=head3 cygwin/X - XXXX: No details yet +F<freeglut>, F<libglut-devel> +The mingw packages for native opengl support will also work, +but then you will need the mingw headers and libs +-lglut32 -lglu32 -lopengl32 =cut @@ -166,6 +169,7 @@ win32_gcc => '-lglut32 -lglu32 -lopengl32', win32_nongcc => 'opengl32.lib glu32.lib glut32.lib', darwin => '-framework OpenGL -framework GLUT', + cygwin => '-lglut -lGLU -lGL', default => '-lglut -lGLU -lGL', } ); diff -u lib/Parrot/Configure/Step/Methods.pm.orig lib/Parrot/Configure/Step/Methods.pm --- lib/Parrot/Configure/Step/Methods.pm.orig 2008-06-24 19:59:15.000000000 +0000 +++ lib/Parrot/Configure/Step/Methods.pm 2008-07-16 19:01:24.078125000 +0000 @@ -119,6 +119,7 @@ cc => $cc, win32_gcc => '-lalpha32 -lalpha32 -lopenalpha32', win32_nongcc => 'alpha.lib', + cygwin => '-lalpha32 -lXalpha32', # optional darwin => 'alphadarwin.lib', default => '-lalpha', } ); @@ -138,6 +139,8 @@ =item * MSWin32 with any C-compiler other than F<gcc>. +=item * Cygwin to override Mingw. + =item * Darwin. =back @@ -173,7 +176,7 @@ =item * C<win32_gcc> -Libraries to be added where OS is mswin32 and C-compiler is F<gcc>. +Libraries to be added where OS is mswin32 or cygwin and C-compiler is F<gcc>. Single whitespace-delimited string. =item * C<win32_nongcc> @@ -181,6 +184,12 @@ Libraries to be added where OS is mswin32 and C-compiler is not F<gcc>. Single whitespace-delimited string. +=item * C<cygwin> + +Optional libraries to be added where OS is cygwin. This overrides C<win32_gcc> +if defined. +Single whitespace-delimited string. + =item * C<darwin> Libraries to be added where OS is Darwin. Do not supply a value if the value @@ -197,7 +206,8 @@ my $args = shift; croak "_add_to_libs() takes hashref: $!" unless ref($args) eq 'HASH'; my $platform = - (($args->{osname} =~ /mswin32/i || + $args->{osname} =~ /cygwin/i ? 'cygwin' + :(($args->{osname} =~ /mswin32/i || $args->{osname} =~ /cygwin/i) && $args->{cc} =~ /^gcc/i) ? 'win32_gcc' : $args->{osname} =~ /mswin32/i ? 'win32_nongcc'