Skip Menu |

This queue is for tickets about the Crypt-SMIME CPAN distribution.

Report information
The Basics
Id: 124130
Status: resolved
Priority: 0/
Queue: Crypt-SMIME

People
Owner: mikage [...] ymir.co.jp
Requestors: Thomas.Eckardt [...] thockar.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.23



Subject: 0.21 no make under windows
Date: Fri, 19 Jan 2018 08:47:54 +0100
To: bug-Crypt-SMIME [...] rt.cpan.org
From: "Thomas Eckardt" <thomas.eckardt [...] thockar.com>
Subject: 0.21 no make under windows
The Makefile.pl in 0.21 contains nix 'only' commands. This requires MSYS or linux utils under windows. depend => { 'lib/SMIME.pm' => "SMIME.pl SMIME.pod const-autoload.inc\n" . "\tmkdir -p lib\n" . "\techo \"# This file is automatically generated from SMIME.pl\" > \$\@\n" . "\techo \"# All of your changes will be lost if you edit this directly.\" >> \$\@\n" . "\tcat SMIME.pl >> \$\@\n" . "\tcat const-autoload.inc >> \$\@\n" . "\techo >> \$\@\n" . "\techo __END__ >> \$\@\n" . "\techo >> \$\@\n" . "\tcat SMIME.pod >> \$\@\n", 'SMIME.pod' => "SMIME.mlpod\n" . "\tmlpod2pod \$< > \$\@", 'lib/SMIME/JA.pod' => "SMIME.mlpod\n" . "\tmkdir -p lib/SMIME\n" . "\tmlpod2pod --langs=ja \$< | perl -pe 's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@", }, to make it on windows, commands have to be changed to depend => { 'lib/SMIME.pm' => "SMIME.pl SMIME.pod const-autoload.inc\n" . # "\tmkdir lib\n" . "\techo \"# This file is automatically generated from SMIME.pl\" > \$\@\n" . "\techo \"# All of your changes will be lost if you edit this directly.\" >> \$\@\n" . "\ttype SMIME.pl >> \$\@\n" . "\ttype const-autoload.inc >> \$\@\n" . "\techo >> \$\@\n" . "\techo __END__ >> \$\@\n" . "\techo >> \$\@\n" . "\ttype SMIME.pod >> \$\@\n", 'SMIME.pod' => "SMIME.mlpod\n" . "\tmlpod2pod \$< > \$\@", 'lib/SMIME/JA.pod' => "SMIME.mlpod\n" . # "\tmkdir lib/SMIME\n" . "\tmlpod2pod --langs=ja \$< | perl -pe 's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@", }, mkdir is not required, because the folders already exists - how ever, there is no '-p' switch under windows and mkdir fails if the folder already exists ( -d 'lib' ? '' : "\tmkdir lib\n") . and ( -d 'lib/SMIME' ? '' : "\tmkdir lib/SMIME\n") . will work on every OS doing something like: my $cat = $^O eq 'MSWin32' ? 'type' : 'cat'; ... "\t$cat SMIME.pl >> \$\@\n" . ... would solve the problem for 'cat' The complete section may look like: ... my $USE_PROXYSUBS = $^V gt v5.14.0; my $cat = $^O eq 'MSWin32' ? 'type' : 'cat'; ... ... depend => { 'lib/SMIME.pm' => "SMIME.pl SMIME.pod const-autoload.inc\n" . ( -d 'lib' ? '' : "\tmkdir lib\n") . "\techo \"# This file is automatically generated from SMIME.pl\" > \$\@\n" . "\techo \"# All of your changes will be lost if you edit this directly.\" >> \$\@\n" . "\t$cat SMIME.pl >> \$\@\n" . "\t$cat const-autoload.inc >> \$\@\n" . "\techo >> \$\@\n" . "\techo __END__ >> \$\@\n" . "\techo >> \$\@\n" . "\t$cat SMIME.pod >> \$\@\n", 'SMIME.pod' => "SMIME.mlpod\n" . "\tmlpod2pod \$< > \$\@", 'lib/SMIME/JA.pod' => "SMIME.mlpod\n" . ( -d 'lib/SMIME' ? '' : "\tmkdir lib/SMIME\n") . "\tmlpod2pod --langs=ja \$< | perl -pe 's/(\\xe5\\x90\\x8d\\xe5\\x89\\x8d)/NAME/' > \$\@", }, ... Thomas DISCLAIMER: ******************************************************* This email and any files transmitted with it may be confidential, legally privileged and protected in law and are intended solely for the use of the individual to whom it is addressed. This email was multiple times scanned for viruses. There should be no known virus in this email! *******************************************************

Message body is not shown because it is too large.

Download smime.p7s
application/pkcs7-signature 2k

Message body not shown because it is not plain text.

Applied your changes and released 0.22. Thank you very much for your suggestion.
Subject: Re: [rt.cpan.org #124130] Resolved: 0.21 no make under windows
Date: Mon, 22 Jan 2018 11:24:20 +0100
To: bug-Crypt-SMIME [...] rt.cpan.org
From: "Thomas Eckardt" <thomas.eckardt [...] thockar.com>
Subject: Re: [rt.cpan.org #124130] Resolved: 0.21 no make under windows
Thank you very much, but there is an additionally fix in the Makefile.PL required. I think this was my mistake - my fixlist was incomplete. I'm sorry! <1> .... 1 "\techo \"# This file is automatically generated from SMIME.pl\" > \$\@\n" . 2 "\techo \"# All of your changes will be lost if you edit this directly.\" >> \$\@\n" . "\t$CAT SMIME.pl >> \$\@\n" . "\t$CAT const-autoload.inc >> \$\@\n" . 5 "\techo >> \$\@\n" . "\techo __END__ >> \$\@\n" . 7 "\techo >> \$\@\n" . "\t$CAT SMIME.pod >> \$\@\n", .... lines 1 and 2 produces an syntaxerror in SMIME.pl, because the doublequotes are written to the file on windows lines 5 and 7 produces an syntaxerror in SMIME.pl, because windows writes an local language dependend error string to the file, if no character is defined in the 'echo' command This can be fixed the following way .... my $USE_PROXYSUBS = $^V gt v5.14.0; my $CAT = $^O eq 'MSWin32' ? 'type' : 'cat'; my $SEP = $^O eq 'MSWin32' ? '' : '\"'; .... depend => { 'lib/SMIME.pm' => "SMIME.pl SMIME.pod const-autoload.inc\n" . ( -d 'lib' ? '' : "\tmkdir lib\n") . "\techo $SEP# This file is automatically generated from SMIME.pl$SEP > \$\@\n" . "\techo $SEP# All of your changes will be lost if you edit this directly.$SEP >> \$\@\n" . "\t$CAT SMIME.pl >> \$\@\n" . "\t$CAT const-autoload.inc >> \$\@\n" . "\techo # >> \$\@\n" . "\techo __END__ >> \$\@\n" . "\techo # >> \$\@\n" . "\t$CAT SMIME.pod >> \$\@\n", .... The '#' in lines 5 and 7 is a bit 'quick and dirty' but it works. Possibly the lines 5 to7 should be provided in a separate file and then to '$CAT' this file. <2> The following test fails on windows, because a file 'SMIME.def' was created at compile time t/manifest.t .......... 1/2 # Failed test 'No extra files that aren't in MANIFEST' # at t/manifest.t line 18. # Not in MANIFEST: SMIME.def # Looks like you failed 1 test of 2. t/manifest.t .......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests adding the line ^SMIME\.def$ to MANIFEST.SKIP solves this for GCC on windows. But other compilers may produce other additionally files. I recommend to change the manifest.t test to warn or infom instead to fail for additionally found files or even better to remove this test for additionally files. Skipping the second test in manifest.t on windows OS may be also an solution - see the working example. manifest.t:: #!perl use strict; use warnings; use ExtUtils::Manifest qw(fullcheck); use Test::More tests => ($^O eq 'MSWin32' ? 1 : 2); # windows has only one test my ($missing, $extra) = do { local $ExtUtils::Manifest::Quiet = 1; fullcheck(); }; # check for missing files in every case ok !scalar @$missing, 'No missing files that are in MANIFEST' or do { diag "No such file: $_" foreach @$missing; }; # check for additonally files - but not on windows if ($^O ne 'MSWin32') { ok !scalar @$extra, 'No extra files that aren\'t in MANIFEST' or do { diag "Not in MANIFEST: $_" foreach @$extra; }; } <3> The README file should contain a hint for windows users related to libcrypto. Depending on the used perl disribution (eg. ActivePerl) it may required to install openssl and to set ENV variables before running the Makefile.PL. openssl has to be installed first - and openssl/bin must be in PATH for the module tests the ENV for LIBCRYPTO_CFLAGS should point to the openssl include folder the ENV for LIBCRYPTO_LIBS should point to the openssl libraries example: set PATH=C:\openssl\bin;%PATH% set LIBCRYPTO_CFLAGS=-IC:/openssl/include set LIBCRYPTO_LIBS="c:/openssl/lib/libeay32.lib" "c:/openssl/lib/ssleay32.lib" Strawberry perl always provides a full nix compatible libcrypro environment. There are no settings or additionally installations required for this perl distribution. <4> I also get some warning at compile time - but the module tests are fine and the module is running without an issue in my application. gcc ...... SMIME.c In file included from C:\perl\perl\lib\CORE/perl.h:3880:0, from SMIME.xs:20: SMIME.xs: In function 'XS_Crypt__SMIME_setPublicKeyStore': C:\perl\perl\lib\CORE/iperlsys.h:723:39: warning: passing argument 3 of '((PerlInterpreter *)Perl_get_context())->ILIO->pNameStat' from incompatible pointer type [-Wincompatible-pointer-types] (*PL_LIO->pNameStat)(PL_LIO, (name), (buf)) ^ C:\perl\perl\lib\CORE/XSUB.h:611:26: note: in expansion of macro 'PerlLIO_stat' # define stat(buf,sb) PerlLIO_stat(buf,sb) ^~~~~~~~~~~~ SMIME.xs:697:17: note: in expansion of macro 'stat' if (stat(pathname, &bufstat) != 0) { ^ C:\perl\perl\lib\CORE/iperlsys.h:723:39: note: expected 'struct _stat64 *' but argument is of type 'struct stat *' (*PL_LIO->pNameStat)(PL_LIO, (name), (buf)) ^ C:\perl\perl\lib\CORE/XSUB.h:611:26: note: in expansion of macro 'PerlLIO_stat' # define stat(buf,sb) PerlLIO_stat(buf,sb) ^~~~~~~~~~~~ SMIME.xs:697:17: note: in expansion of macro 'stat' if (stat(pathname, &bufstat) != 0) { g++ SMIME.def -o blib\arch\auto\Crypt\SMIME\SMIME.xs.dll -mdll .... <build OK> <test OK> perl -V output is: Summary of my perl5 (revision 5 version 26 subversion 1) configuration: Platform: osname=MSWin32 osvers=6.3 archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.26.1.1 #1 Sun Sep 24 05:32:33 2017 x64' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='gcc' ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields' optimize='-s -O2' cppflags='-DWIN32' ccversion='' gccversion='7.1.0' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long long' ivsize=8 nvtype='double' nvsize=8 Off_t='long long' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='g++.exe' ldflags ='-s -L"C:\perl\perl\lib\CORE" -L"C:\perl\c\lib"' libpth=C:\perl\c\lib C:\perl\c\x86_64-w64-mingw32\lib C:\perl\c\lib\gcc\x86_64-w64-mingw32\7.1.0 libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc= so=dll useshrplib=true libperl=libperl526.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=xs.dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-mdll -s -L"C:\perl\perl\lib\CORE" -L"C:\perl\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Sep 24 2017 05:47:34 @INC: c:/perl/perl/site/lib/MSWin32-x64-multi-thread c:/perl/perl/site/lib c:/perl/perl/vendor/lib c:/perl/perl/lib Best regards Thomas Von: "SANO Taku via RT" <bug-Crypt-SMIME@rt.cpan.org> An: Thomas.Eckardt@thockar.com Datum: 22.01.2018 08:06 Betreff: [rt.cpan.org #124130] Resolved: 0.21 no make under windows <URL: https://rt.cpan.org/Ticket/Display.html?id=124130 > According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message. DISCLAIMER: ******************************************************* This email and any files transmitted with it may be confidential, legally privileged and protected in law and are intended solely for the use of the individual to whom it is addressed. This email was multiple times scanned for viruses. There should be no known virus in this email! *******************************************************

Message body is not shown because it is too large.

Download smime.p7s
application/pkcs7-signature 2k

Message body not shown because it is not plain text.

Thanks. Applied your changes and released 0.23. As for the warning, it's coming from a deeply esoteric labyrinth of C preprocessor macros internally used by Perl, and I have no clue what is happening and why.