public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Compile perl Win32::OLE module
@ 2019-03-29 19:56 Massimo Balestra
  2019-03-29 22:21 ` Chris Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Massimo Balestra @ 2019-03-29 19:56 UTC (permalink / raw)
  To: cygwin


Hi,
I am trying to compile the module Win32::OLE but it fails.
I searched on Google and I did not find any good suggestion.
Can anyone help me?
This is what I get:
(This is from cpan but it is the same if I compile manually downlaoding the tar package)
<code>

cpan[1]> install Win32::OLE
Reading '/home/mbalestra/.cpan/Metadata'
  Database was generated on Fri, 29 Mar 2019 18:17:02 GMT
Running install for module 'Win32::OLE'
Checksum for /home/mbalestra/.cpan/sources/authors/id/J/JD/JDB/Win32-OLE-0.1712.tar.gz ok
Scanning cache /home/mbalestra/.cpan/build for sizes
............................................................................DONE
Configuring J/JD/JDB/Win32-OLE-0.1712.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Win32::OLE
Writing MYMETA.yml and MYMETA.json
  JDB/Win32-OLE-0.1712.tar.gz
  /usr/bin/perl Makefile.PL -- OK
Running make for J/JD/JDB/Win32-OLE-0.1712.tar.gz
cp lib/Win32/OLE/TypeInfo.pm blib/lib/Win32/OLE/TypeInfo.pm
cp lib/Win32/OLE/NLS.pm blib/lib/Win32/OLE/NLS.pm
cp lib/Win32/OLE/Lite.pm blib/lib/Win32/OLE/Lite.pm
cp lib/Win32/OLE/Const.pm blib/lib/Win32/OLE/Const.pm
cp lib/OLE.pm blib/lib/OLE.pm
cp lib/Win32/OLE/Enum.pm blib/lib/Win32/OLE/Enum.pm
cp lib/Win32/OLE/TPJ.pod blib/lib/Win32/OLE/TPJ.pod
cp lib/Win32/OLE/Variant.pm blib/lib/Win32/OLE/Variant.pm
cp lib/Win32/OLE.pm blib/lib/Win32/OLE.pm
cp lib/Win32/OLE/NEWS.pod blib/lib/Win32/OLE/NEWS.pod
Running Mkbootstrap for OLE ()
chmod 644 "OLE.bs"
"/usr/bin/perl.exe" -MExtUtils::Command::MM -e 'cp_nonempty' -- OLE.bs blib/arch/auto/Win32/OLE/OLE.bs 644
"/usr/bin/perl.exe" -I/usr/lib/perl5/5.26/x86_64-cygwin-threads -I/usr/share/perl5/5.26 "/usr/share/perl5/5.26/ExtUtils/xsubpp"  -typemap '/usr/share/perl5/5.26/ExtUtils/typemap' OLE.xs >xstmp.c && mv xstmp.c OLE.cpp
g++ -c   -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.26.3-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.26.3=/usr/src/debug/perl-5.26.3-1 -fwrapv -fno-strict-aliasing -DUSEIMPORTLIB -O3   -DVERSION=\"0.1712\" -DXS_VERSION=\"0.1712\"  "-I/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE"   OLE.cpp
In file included from OLE.xs:94:0:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:3628:67: warning: ‘unused’ attribute ignored [-Wattributes]
 #  define __attribute__unused__             __attribute__((unused))
                                                                   ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:323:30: note: in expansion of macro ‘__attribute__unused__’
 #    define PERL_UNUSED_DECL __attribute__unused__
                              ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:175:30: note: in expansion of macro ‘PERL_UNUSED_DECL’
 #  define pTHX  tTHX my_perl PERL_UNUSED_DECL
                              ^~~~~~~~~~~~~~~~
OLE.xs:368:5: note: in expansion of macro ‘pTHX’
     pTHX;
     ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:3628:67: warning: ‘unused’ attribute ignored [-Wattributes]
 #  define __attribute__unused__             __attribute__((unused))
                                                                   ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:323:30: note: in expansion of macro ‘__attribute__unused__’
 #    define PERL_UNUSED_DECL __attribute__unused__
                              ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:175:30: note: in expansion of macro ‘PERL_UNUSED_DECL’
 #  define pTHX  tTHX my_perl PERL_UNUSED_DECL
                              ^~~~~~~~~~~~~~~~
OLE.xs:411:5: note: in expansion of macro ‘pTHX’
     pTHX;
     ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:2698:0,
                 from OLE.xs:94:
OLE.xs: In function ‘BOOL StartsWithAlpha(PerlInterpreter*, SV*)’:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:747:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STRLEN*)’ is deprecated [-Wdeprecated-declarations]
 #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
                                                        ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1705:45: note: in definition of macro ‘_generic_swash_uvchr’
 #define _generic_swash_uvchr(classnum, c) ((c) < 256                        \
                                             ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1738:33: note: in expansion of macro ‘isALPHA_uvchr’
 #define isALPHA_uni(c)          isALPHA_uvchr(c)
                                 ^~~~~~~~~~~~~
OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                ^
OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’
 #   define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL)
                             ^~~~~~~~~~~~~
OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                            ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5609:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/proto.h:3622:18: note: declared here
 PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:2698:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:747:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STRLEN*)’ is deprecated [-Wdeprecated-declarations]
 #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
                                                        ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:111:24: note: in definition of macro ‘cBOOL’
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
                        ^~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1250:45: note: in expansion of macro ‘FITS_IN_8_BITS’
 #   define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c)    \
                                             ^~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1706:48: note: in expansion of macro ‘_generic_isCC’
                                              ? _generic_isCC(c, classnum)   \
                                                ^~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1708:31: note: in expansion of macro ‘_generic_swash_uvchr’
 #define isALPHA_uvchr(c)      _generic_swash_uvchr(_CC_ALPHA, c)
                               ^~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1738:33: note: in expansion of macro ‘isALPHA_uvchr’
 #define isALPHA_uni(c)          isALPHA_uvchr(c)
                                 ^~~~~~~~~~~~~
OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                ^
OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’
 #   define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL)
                             ^~~~~~~~~~~~~
OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                            ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5609:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/proto.h:3622:18: note: declared here
 PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:2698:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:747:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STRLEN*)’ is deprecated [-Wdeprecated-declarations]
 #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
                                                        ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:111:24: note: in definition of macro ‘cBOOL’
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
                        ^~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1250:45: note: in expansion of macro ‘FITS_IN_8_BITS’
 #   define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c)    \
                                             ^~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1706:48: note: in expansion of macro ‘_generic_isCC’
                                              ? _generic_isCC(c, classnum)   \
                                                ^~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1708:31: note: in expansion of macro ‘_generic_swash_uvchr’
 #define isALPHA_uvchr(c)      _generic_swash_uvchr(_CC_ALPHA, c)
                               ^~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1738:33: note: in expansion of macro ‘isALPHA_uvchr’
 #define isALPHA_uni(c)          isALPHA_uvchr(c)
                                 ^~~~~~~~~~~~~
OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                ^
OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’
 #   define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL)
                             ^~~~~~~~~~~~~
OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                            ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5609:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/proto.h:3622:18: note: declared here
 PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:2698:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:747:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STRLEN*)’ is deprecated [-Wdeprecated-declarations]
 #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
                                                        ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:111:24: note: in definition of macro ‘cBOOL’
 #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
                        ^~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1706:48: note: in expansion of macro ‘_generic_isCC’
                                              ? _generic_isCC(c, classnum)   \
                                                ^~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1708:31: note: in expansion of macro ‘_generic_swash_uvchr’
 #define isALPHA_uvchr(c)      _generic_swash_uvchr(_CC_ALPHA, c)
                               ^~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1738:33: note: in expansion of macro ‘isALPHA_uvchr’
 #define isALPHA_uni(c)          isALPHA_uvchr(c)
                                 ^~~~~~~~~~~~~
OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                ^
OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’
 #   define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL)
                             ^~~~~~~~~~~~~
OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                            ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5609:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/proto.h:3622:18: note: declared here
 PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                  ^~~~~~~~~~~~~~~~~~
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5644:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:747:56: warning: ‘UV Perl_utf8_to_uvuni(PerlInterpreter*, const U8*, STRLEN*)’ is deprecated [-Wdeprecated-declarations]
 #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
                                                        ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/embed.h:32:51: note: in definition of macro ‘_is_uni_FOO’
 #define _is_uni_FOO(a,b) Perl__is_uni_FOO(aTHX_ a,b)
                                                   ^
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1708:31: note: in expansion of macro ‘_generic_swash_uvchr’
 #define isALPHA_uvchr(c)      _generic_swash_uvchr(_CC_ALPHA, c)
                               ^~~~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/handy.h:1738:33: note: in expansion of macro ‘isALPHA_uvchr’
 #define isALPHA_uni(c)          isALPHA_uvchr(c)
                                 ^~~~~~~~~~~~~
OLE.xs:449:16: note: in expansion of macro ‘isALPHA_uni’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                ^
OLE.xs:114:29: note: in expansion of macro ‘utf8_to_uvuni’
 #   define my_utf8_to_uv(s) utf8_to_uvuni(s, NULL)
                             ^~~~~~~~~~~~~
OLE.xs:449:28: note: in expansion of macro ‘my_utf8_to_uv’
         return isALPHA_uni(my_utf8_to_uv((U8*)str));
                            ^
In file included from /usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/perl.h:5609:0,
                 from OLE.xs:94:
/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE/proto.h:3622:18: note: declared here
 PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                  ^~~~~~~~~~~~~~~~~~
OLE.xs: In function ‘BOOL IsLocalMachine(PerlInterpreter*, SV*)’:
OLE.xs:483:12: error: ‘stricmp’ was not declared in this scope
         && stricmp(pszName, szComputerName) == 0)
            ^~~~~~~
OLE.xs:483:12: note: suggested alternative: ‘strncmp’
         && stricmp(pszName, szComputerName) == 0)
            ^~~~~~~
            strncmp
OLE.xs: In function ‘char* GetMultiByteEx(PerlInterpreter*, OLECHAR*, int*, char*, int, UINT)’:
OLE.xs:637:65: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘DWORD {aka unsigned int}’ [-Wformat=]
  warn(MY_VERSION ": GetMultiByte() failure: %lu", GetLastError());
                                                   ~~~~~~~~~~~~~~^
OLE.xs: In function ‘OLECHAR* GetWideChar(PerlInterpreter*, SV*, OLECHAR*, int, UINT)’:
OLE.xs:725:64: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘DWORD {aka unsigned int}’ [-Wformat=]
  warn(MY_VERSION ": GetWideChar() failure: %lu", GetLastError());
                                                  ~~~~~~~~~~~~~~^
OLE.xs: In function ‘void ReportOleError(PerlInterpreter*, HV*, HRESULT, EXCEPINFO*, SV*)’:
OLE.xs:925:17: error: format not a string literal and no format arguments [-Werror=format-security]
   warn(SvPVX(sv));
                 ^
OLE.xs: In function ‘SV* CreatePerlObject(PerlInterpreter*, HV*, IDispatch*, SV*)’:
OLE.xs:1089:14: warning: unused variable ‘svp’ [-Wunused-variable]
         SV **svp = hv_store(g_hv_unique, (char*)&punk, sizeof(punk),
              ^~~
OLE.xs: In member function ‘virtual ULONG EventSink::Release()’:
OLE.xs:2043:12: warning: deleting object of polymorphic class type ‘EventSink’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete this;
            ^~~~
OLE.xs: In member function ‘virtual ULONG Forwarder::Release()’:
OLE.xs:2218:12: warning: deleting object of polymorphic class type ‘Forwarder’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete this;
            ^~~~
OLE.xs: In function ‘void Initialize(PerlInterpreter*, HV*, DWORD)’:
OLE.xs:3239:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (dwCoInit == COINIT_OLEINITIALIZE) {
               ^
OLE.xs:3244:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  else if (dwCoInit != COINIT_NO_INITIALIZE) {
                    ^
OLE.xs: In function ‘void XS_Win32__OLE_GetObject(PerlInterpreter*, CV*)’:
OLE.xs:4144:78: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘ULONG {aka unsigned int}’ [-Wformat=]
  sv_setpvf(sv, "after character %lu in \"%s\"", ulEaten, SvPV_nolen(pathname));
                                                                              ^
OLE.xs: In function ‘void XS_Win32__OLE__Tie_FIRSTKEY(PerlInterpreter*, CV*)’:
OLE.xs:4682:11: warning: unused variable ‘paszMethod’ [-Wunused-variable]
     char *paszMethod[] = {"FIRSTKEY", "NEXTKEY", "FIRSTENUM", "NEXTENUM"};
           ^~~~~~~~~~
OLE.c: In function ‘void XS_Win32__OLE__Const__Typelibs(PerlInterpreter*, CV*)’:
OLE.c:5273:7: warning: unused variable ‘self’ [-Wunused-variable]
OLE.xs: In function ‘void XS_Win32__OLE__Enum_All(PerlInterpreter*, CV*)’:
OLE.xs:5089:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
    count);
         ^
OLE.xs: In function ‘void XS_Win32__OLE__Variant_new(PerlInterpreter*, CV*)’:
OLE.xs:5193:6: warning: unused variable ‘sv’ [-Wunused-variable]
  SV *sv = ST(items-1);
      ^~
OLE.c: In function ‘void XS_Win32__OLE__TypeInfo__new(PerlInterpreter*, CV*)’:
OLE.c:7311:7: warning: unused variable ‘self’ [-Wunused-variable]
cc1plus: some warnings being treated as errors
make: *** [Makefile:357: OLE.o] Error 1
  JDB/Win32-OLE-0.1712.tar.gz
  /usr/bin/make -- NOT OK
Failed during this command:
 JDB/Win32-OLE-0.1712.tar.gz                  : make NO

cpan[2]>
</code>
Thank you for the help


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile perl Win32::OLE module
  2019-03-29 19:56 Compile perl Win32::OLE module Massimo Balestra
@ 2019-03-29 22:21 ` Chris Wagner
  2019-03-30  1:43   ` Massimo Balestra
  2019-03-30  8:11   ` Achim Gratz
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wagner @ 2019-03-29 22:21 UTC (permalink / raw)
  To: cygwin

On 2019-03-29 3:56 pm, Massimo Balestra wrote:
> Hi,
> I am trying to compile the module Win32::OLE but it fails.
> I searched on Google and I did not find any good suggestion.
> Can anyone help me?
> This is what I get:
> (This is from cpan but it is the same if I compile manually
> downlaoding the tar package)


Hi Massimo.  The following changes should let it compile.  The tests 
working depends on the peculiarities of your Windows version and Excel 
version.  I would, though, highly recommend using ActiveState Perl along 
with their prebuilt module for any OLE work.



--- OLE.xs.bak  2019-03-29 16:29:52.225925700 -0400
+++ OLE.xs      2019-03-29 16:35:28.756575400 -0400
@@ -480,7 +480,7 @@

      /* Check against local computer name (from registry) */
      if (GetComputerNameA(szComputerName, &dwSize)
-        && stricmp(pszName, szComputerName) == 0)
+        /* for a hostname up to 1024 characters */
+        && strncmp(pszName, szComputerName, 1024) == 0)
      {
          return TRUE;
      }


--- t/3_ole.t.bak       2019-03-29 17:53:21.284781500 -0400
+++ t/3_ole.t   2019-03-29 17:39:18.345496000 -0400
@@ -86,6 +86,7 @@
  # 1. Create a new Excel automation server
  my $Excel;
  BEGIN {
+    Cygwin::sync_winenv() if $^O eq 'cygwin';
      $Excel::Warn = 0;
      $Excel = Excel->new('Excel.Application', \&Quit);
      $Excel::Warn = 2;
@@ -186,7 +187,7 @@
  # 10. Test the "with" function
  printf("# Tests %d and %d will fail if no default printer has been 
installed yet\n",
         $Test+1, $Test+2);
-with($Sheet->PageSetup, Orientation => xlLandscape, FirstPageNumber => 
13);
+with($Sheet->PageSetup, Orientation => 'xlLandscape', FirstPageNumber 
=> 13);
  $Value = $Sheet->PageSetup->FirstPageNumber;
  print "# FirstPageNumber is \"$Value\"\n";
  print "not " unless $Value == 13;


--- t/4_compat.t.bak    2013-11-28 14:21:41.000000000 -0500
+++ t/4_compat.t        2019-03-29 16:41:19.797676000 -0400
@@ -22,6 +22,7 @@
  my $Test = 0;

  # 1. Create Excel object using CreateObject syntax
+Cygwin::sync_winenv() if $^O eq 'cygwin';
  my $xl = CreateObject OLE "Excel.Application";
  unless (defined $xl) {
      print "1..0 # skip Excel.Application not installed\n";


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile perl Win32::OLE module
  2019-03-29 22:21 ` Chris Wagner
@ 2019-03-30  1:43   ` Massimo Balestra
  2019-03-30  1:51     ` Chris Wagner
  2019-03-30  8:11   ` Achim Gratz
  1 sibling, 1 reply; 5+ messages in thread
From: Massimo Balestra @ 2019-03-30  1:43 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 910 bytes --]


> Hi Massimo.  The following changes should let it compile.  The tests
> working depends on the peculiarities of your Windows version and Excel
> version.  I would, though, highly recommend using ActiveState Perl
> along with their prebuilt module for any OLE work.
>
Thank you Chris for answering.

But the problem is not during the test, but during the compilation
itself (make).

Yes, I know I could use ActiveState, but I don't want to have two perl
installed on my pc. For me it is more important to have cygwin and if
OLE does not work it is less important.

But I would like to have it work, also because it should work.

Thank you again

Massimo


\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile perl Win32::OLE module
  2019-03-30  1:43   ` Massimo Balestra
@ 2019-03-30  1:51     ` Chris Wagner
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wagner @ 2019-03-30  1:51 UTC (permalink / raw)
  To: cygwin

On 2019-03-29 9:43 pm, Massimo Balestra wrote:
> Thank you Chris for answering.
> 
> But the problem is not during the test, but during the compilation
> itself (make).
> 
> Yes, I know I could use ActiveState, but I don't want to have two perl
> installed on my pc. For me it is more important to have cygwin and if
> OLE does not work it is less important.
> 
> But I would like to have it work, also because it should work.
> 
> Thank you again
> 
> Massimo



No problem, let us know when you get it working.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile perl Win32::OLE module
  2019-03-29 22:21 ` Chris Wagner
  2019-03-30  1:43   ` Massimo Balestra
@ 2019-03-30  8:11   ` Achim Gratz
  1 sibling, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2019-03-30  8:11 UTC (permalink / raw)
  To: cygwin

Chris Wagner writes:
> --- OLE.xs.bak  2019-03-29 16:29:52.225925700 -0400
> +++ OLE.xs      2019-03-29 16:35:28.756575400 -0400
> @@ -480,7 +480,7 @@
>
>      /* Check against local computer name (from registry) */
>      if (GetComputerNameA(szComputerName, &dwSize)
> -        && stricmp(pszName, szComputerName) == 0)
> +        /* for a hostname up to 1024 characters */
> +        && strncmp(pszName, szComputerName, 1024) == 0)
>      {
>          return TRUE;
>      }

The canonical replacement for stricmp is strcasecmp on POSIX systems.

While that lets the XS module compile provided you ignore some of the
many warnings that are usually treated as errors (which in turn requires
that you modify the generated Makefile since the default options
MakeMaker uses come from the immutable %Config::Config hash), it is
unlikely to work at 64bit.  The two errors that make it fail are easily
fixed, though, but you still might have to remove the stack protector.
I no longer have the necessary program versions to test it, but last I
did it was limping along on Win7 in combination with a 32bit Cygwin
install.  The module is effectively dead upstream, so there's not much
point in trying to use it.


perl-Win32-OLE.cygport:
--8<---------------cut here---------------start------------->8---
NAME="perl-Win32-OLE"
VERSION="0.1712"
RELEASE="1"
CPAN_AUTHOR="JDB"
DESCRIPTION="Perl distribution Win32-OLE, providing Perl modules:
OLE OLE::Tie OLE::Variant Win32::OLE Win32::OLE::Const Win32::OLE::Enum
Win32::OLE::NLS Win32::OLE::Tie Win32::OLE::TypeInfo Win32::OLE::Variant.

OLE Automation extensions."

DIFF_EXCLUDES="MYMETA.*"

NO_PERL_DEPS=1
inherit perl
--8<---------------cut here---------------end--------------->8---

perl-Win32-OLE.src.patch:
--8<---------------cut here---------------start------------->8---
--- origsrc/Win32-OLE-0.1712/Makefile.PL	2013-12-11 23:25:13.000000000 +0100
+++ src/Win32-OLE-0.1712/Makefile.PL	2019-03-30 08:56:28.164392300 +0100
@@ -29,7 +33,7 @@ WriteMakefile(%param);
 sub MY::xs_c {
     '
 .xs.cpp:
-	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
+	$(PERL) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
 ';
 }
 
--- origsrc/Win32-OLE-0.1712/OLE.xs	2014-05-15 00:34:17.000000000 +0200
+++ src/Win32-OLE-0.1712/OLE.xs	2019-03-30 09:05:23.035589100 +0100
@@ -480,7 +480,7 @@ IsLocalMachine(pTHX_ SV *host)
 
     /* Check against local computer name (from registry) */
     if (GetComputerNameA(szComputerName, &dwSize)
-        && stricmp(pszName, szComputerName) == 0)
+        && strcasecmp(pszName, szComputerName) == 0)
     {
         return TRUE;
     }
@@ -922,12 +922,12 @@ ReportOleError(pTHX_ HV *stash, HRESULT
 	if (warnlvl < 3) {
 	    cv = perl_get_cv("Carp::carp", FALSE);
 	    if (!cv)
-		warn(SvPVX(sv));
+	      warn("%s", SvPVX(sv));
 	}
 	else {
 	    cv = perl_get_cv("Carp::croak", FALSE);
 	    if (!cv)
-		croak(SvPVX(sv));
+	      croak("%s", SvPVX(sv));
 	}
     }
 
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-30  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 19:56 Compile perl Win32::OLE module Massimo Balestra
2019-03-29 22:21 ` Chris Wagner
2019-03-30  1:43   ` Massimo Balestra
2019-03-30  1:51     ` Chris Wagner
2019-03-30  8:11   ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).