toddr / Crypt-OpenSSL-RSA

Release history of Crypt-OpenSSL-RSA
https://metacpan.org/pod/Crypt::OpenSSL::RSA
Other
8 stars 25 forks source link

Errors building on Mac OSX 10.12.1 [rt.cpan.org #119018] #20

Closed toddr closed 5 years ago

toddr commented 5 years ago

Migrated from rt.cpan.org#119018 (status was 'open')

Requestors:

From sean.quinlan@endurance.com on 2016-11-28 19:06:34:

Trying to cpanm install on Mac OSX 10.12.1 to 5.24.0 (using plenv). Here's
the build log:
cpanm (App::cpanminus) 1.7042 on perl 5.024000 built for darwin-2level
Work directory is /Users/squinlan/.cpanm/work/1480359360.88921
You have make /usr/bin/make
You have LWP 6.15
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching Crypt::OpenSSL::RSA on mirror
http://104.196.119.58:3111/stacks/5.24.0-dev ...
Downloading index file
http://104.196.119.58:3111/stacks/5.24.0-dev/modules/02packages.details.txt.gz
...
--> Working on Crypt::OpenSSL::RSA
Fetching
http://104.196.119.58:3111/stacks/5.24.0-dev/authors/id/P/PE/PERLER/Crypt-OpenSSL-RSA-0.28.tar.gz
-> OK
Unpacking Crypt-OpenSSL-RSA-0.28.tar.gz
Entering Crypt-OpenSSL-RSA-0.28
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.24)
Configuring Crypt-OpenSSL-RSA-0.28
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Crypt::OpenSSL::RSA
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test 0 ... Yes (1.28)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.24)
Checking if you have Crypt::OpenSSL::Random 0 ... Yes (0.11)
Building and testing Crypt-OpenSSL-RSA-0.28
cp RSA.pm blib/lib/Crypt/OpenSSL/RSA.pm
AutoSplitting blib/lib/Crypt/OpenSSL/RSA.pm
(blib/lib/auto/Crypt/OpenSSL/RSA)
Running Mkbootstrap for RSA ()
chmod 644 "RSA.bs"
"/Users/squinlan/.plenv/versions/5.24.0/bin/perl5.24.0"
-MExtUtils::Command::MM -e 'cp_nonempty' -- RSA.bs
blib/arch/auto/Crypt/OpenSSL/RSA/RSA.bs 644
"/Users/squinlan/.plenv/versions/5.24.0/bin/perl5.24.0"
"/Users/squinlan/.plenv/versions/5.24.0/lib/perl5/5.24.0/ExtUtils/xsubpp"
 -typemap
'/Users/squinlan/.plenv/versions/5.24.0/lib/perl5/5.24.0/ExtUtils/typemap'
-typemap
'/Users/squinlan/.cpanm/work/1480359360.88921/Crypt-OpenSSL-RSA-0.28/typemap'
 RSA.xs > RSA.xsc
mv RSA.xsc RSA.c
cc -c   -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -O3
-DVERSION=\"0.28\" -DXS_VERSION=\"0.28\"
 "-I/Users/squinlan/.plenv/versions/5.24.0/lib/perl5/5.24.0/darwin-2level/CORE"
 -DPERL5 -DOPENSSL_NO_KRB5 RSA.c
clang: warning: argument unused during compilation:
'-L/usr/local/opt/openssl/lib'
rm -f blib/arch/auto/Crypt/OpenSSL/RSA/RSA.bundle
LD_RUN_PATH="/usr/lib" cc  -mmacosx-version-min=10.12 -bundle -undefined
dynamic_lookup -L/usr/local/lib -fstack-protector-strong RSA.o  -o
blib/arch/auto/Crypt/OpenSSL/RSA/RSA.bundle  \
  -lssl -lcrypto   \

chmod 755 blib/arch/auto/Crypt/OpenSSL/RSA/RSA.bundle
Manifying 1 pod document
"/Users/squinlan/.plenv/versions/5.24.0/bin/perl5.24.0"
-MExtUtils::Command::MM -e 'cp_nonempty' -- RSA.bs
blib/arch/auto/Crypt/OpenSSL/RSA/RSA.bs 644
PERL_DL_NONLAZY=1 "/Users/squinlan/.plenv/versions/5.24.0/bin/perl5.24.0"
"-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef
*Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
panic: sv_setpvn called with negative strlen -1152921504606846899 at
t/bignum.t line 66.
t/bignum.t ..
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 53/64 subtests
perl5.24.0(89280,0x7fffdc69c3c0) malloc: ***
mach_vm_map(size=8070450532247932928) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Out of memory!
t/format.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 8/10 subtests
panic: sv_setpvn called with negative strlen -2305843009213693061 at
t/rsa.t line 82.
t/rsa.t .....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 45/63 subtests

Test Summary Report
-------------------
t/bignum.t (Wstat: 65280 Tests: 11 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 64 tests but ran 11.
t/format.t (Wstat: 256 Tests: 2 Failed: 0)
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 10 tests but ran 2.
t/rsa.t   (Wstat: 65280 Tests: 18 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 63 tests but ran 18.
Files=3, Tests=31,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.07 cusr
 0.01 csys =  0.11 CPU)
Result: FAIL
Failed 3/3 test programs. 0/31 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing Crypt::OpenSSL::RSA failed. See
/Users/squinlan/.cpanm/work/1480359360.88921/build.log for details. Retry
with --force to force install it.

Here's my perl -V:
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

  Platform:
    osname=darwin, osvers=16.1.0, archname=darwin-2level
    uname='darwin bur-squinlan-m.local 16.1.0 darwin kernel version 16.1.0:
thu oct 13 21:26:57 pdt 2016; root:xnu-3789.21.3~60release_x86_64 x86_64 '
    config_args='-Dprefix=/Users/squinlan/.plenv/versions/5.24.0 -de
-Dusedevel -A'eval:scriptdir=/Users/squinlan/.plenv/versions/5.24.0/bin''
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.12
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.12
-fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple LLVM 8.0.0
(clang-800.0.42.1)', 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=10.12 -fstack-protector-strong
-L/usr/local/lib'
    libpth=/usr/local/lib
/Library/Developer/CommandLineTools/usr/bin/../lib/clang/8.0.0/lib
/Library/Developer/CommandLineTools/usr/lib /usr/lib
    libs=-lpthread -ldbm -ldl -lm -lutil -lc
    perllibs=-lpthread -ldl -lm -lutil -lc
    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=10.12 -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_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_USE_DEVEL 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
  Locally applied patches:
Devel::PatchPerl 1.40
  Built under darwin
  Compiled at Nov 28 2016 13:06:51
  %ENV:
    PERL5LIB="/Users/squinlan/devel/core/perl_lib"
    PERL_MM_OPT="CCFLAGS="-I/usr/local/opt/openssl/include
-L/usr/local/opt/openssl/lib""
  @INC:
    /Users/squinlan/devel/core/perl_lib

/Users/squinlan/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/darwin-2level
    /Users/squinlan/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0
    /Users/squinlan/.plenv/versions/5.24.0/lib/perl5/5.24.0/darwin-2level
    /Users/squinlan/.plenv/versions/5.24.0/lib/perl5/5.24.0
    .

Please let me know if there is any additional information I can supply.

-Thanks,
Sean

From preaction@cpan.org on 2016-12-02 23:24:58:

On Mon Nov 28 14:06:34 2016, sean.quinlan@endurance.com wrote:
> Trying to cpanm install on Mac OSX 10.12.1 to 5.24.0 (using plenv).

Do you perhaps have homebrew installed? And OpenSSL installed from homebrew? What version do you get when you do "openssl version"?

OS X comes installed with 0.9.8zh, but it doesn't provide the headers. If you install openssl via homebrew, you get the headers for 1.0.2j. These are incompatible, and though the compiling and linking succeeds, running fails due to integer differences (that's why it tries to allocate 3-4 exabytes of memory, which is kind of difficult to do).

I solved this by downloading the right version of OpenSSL from https://www.openssl.org/source/old/0.9.x/. Then extracting it, running `./config` which populates the `include` directory, and then running `cp -LR include/openssl /usr/local/include`.

From sean.quinlan@endurance.com on 2016-12-05 17:02:47:

Yes indeed, homebrew for openssl installs. Version is OpenSSL 0.9.8zh 14
Jan 2016

FYI I use the following to get Net::SSLeay etc to install:
export PERL_MM_OPT='CCFLAGS="-I/usr/local/opt/openssl/include
-L/usr/local/opt/openssl/lib"'

But that didn't seem to be sufficient for Crypt::OpenSSL::RSA?

(interestingly I had to unset that to get DBD::Pg to compile)

I will try your suggestion after I next backup. Thank you!

-Cheers,
Sean

On Fri, Dec 2, 2016 at 6:24 PM, Doug Bell via RT <
bug-Crypt-OpenSSL-RSA@rt.cpan.org> wrote:

> <URL: https://rt.cpan.org/Ticket/Display.html?id=119018 >
>
> On Mon Nov 28 14:06:34 2016, sean.quinlan@endurance.com wrote:
> > Trying to cpanm install on Mac OSX 10.12.1 to 5.24.0 (using plenv).
>
> Do you perhaps have homebrew installed? And OpenSSL installed from
> homebrew? What version do you get when you do "openssl version"?
>
> OS X comes installed with 0.9.8zh, but it doesn't provide the headers. If
> you install openssl via homebrew, you get the headers for 1.0.2j. These are
> incompatible, and though the compiling and linking succeeds, running fails
> due to integer differences (that's why it tries to allocate 3-4 exabytes of
> memory, which is kind of difficult to do).
>
> I solved this by downloading the right version of OpenSSL from
> https://www.openssl.org/source/old/0.9.x/. Then extracting it, running
> `./config` which populates the `include` directory, and then running `cp
> -LR include/openssl /usr/local/include`.
>

From sean.quinlan@endurance.com on 2016-12-14 18:08:33:

Doug, finally got to installing a new perl version and re-building these
modules after installing the matching header per your suggestion appears to
have completely solved the problem. Thanks!

-Cheers,
Sean

On Mon, Dec 5, 2016 at 12:01 PM, Sean Quinlan <sean.quinlan@endurance.com>
wrote:

> Yes indeed, homebrew for openssl installs. Version is OpenSSL 0.9.8zh 14
> Jan 2016
>
> FYI I use the following to get Net::SSLeay etc to install:
> export PERL_MM_OPT='CCFLAGS="-I/usr/local/opt/openssl/include
> -L/usr/local/opt/openssl/lib"'
>
> But that didn't seem to be sufficient for Crypt::OpenSSL::RSA?
>
> (interestingly I had to unset that to get DBD::Pg to compile)
>
> I will try your suggestion after I next backup. Thank you!
>
> -Cheers,
> Sean
>
>
>
> On Fri, Dec 2, 2016 at 6:24 PM, Doug Bell via RT <
> bug-Crypt-OpenSSL-RSA@rt.cpan.org> wrote:
>
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=119018 >
>>
>> On Mon Nov 28 14:06:34 2016, sean.quinlan@endurance.com wrote:
>> > Trying to cpanm install on Mac OSX 10.12.1 to 5.24.0 (using plenv).
>>
>> Do you perhaps have homebrew installed? And OpenSSL installed from
>> homebrew? What version do you get when you do "openssl version"?
>>
>> OS X comes installed with 0.9.8zh, but it doesn't provide the headers. If
>> you install openssl via homebrew, you get the headers for 1.0.2j. These are
>> incompatible, and though the compiling and linking succeeds, running fails
>> due to integer differences (that's why it tries to allocate 3-4 exabytes of
>> memory, which is kind of difficult to do).
>>
>> I solved this by downloading the right version of OpenSSL from
>> https://www.openssl.org/source/old/0.9.x/. Then extracting it, running
>> `./config` which populates the `include` directory, and then running `cp
>> -LR include/openssl /usr/local/include`.
>>
>
>

From fayland@cpan.org on 2017-02-24 09:17:40:

I have to remove `-lssl -lcrypto` from Line 22, then it works.

On Wed Dec 14 13:08:33 2016, sean.quinlan@endurance.com wrote:
> Doug, finally got to installing a new perl version and re-building
> these
> modules after installing the matching header per your suggestion
> appears to
> have completely solved the problem. Thanks!
> 
> -Cheers,
> Sean
> 
> On Mon, Dec 5, 2016 at 12:01 PM, Sean Quinlan
> <sean.quinlan@endurance.com>
> wrote:
> 
> > Yes indeed, homebrew for openssl installs. Version is OpenSSL 0.9.8zh
> > 14
> > Jan 2016
> >
> > FYI I use the following to get Net::SSLeay etc to install:
> > export PERL_MM_OPT='CCFLAGS="-I/usr/local/opt/openssl/include
> > -L/usr/local/opt/openssl/lib"'
> >
> > But that didn't seem to be sufficient for Crypt::OpenSSL::RSA?
> >
> > (interestingly I had to unset that to get DBD::Pg to compile)
> >
> > I will try your suggestion after I next backup. Thank you!
> >
> > -Cheers,
> > Sean
> >
> >
> >
> > On Fri, Dec 2, 2016 at 6:24 PM, Doug Bell via RT <
> > bug-Crypt-OpenSSL-RSA@rt.cpan.org> wrote:
> >
> >> <URL: https://rt.cpan.org/Ticket/Display.html?id=119018 >
> >>
> >> On Mon Nov 28 14:06:34 2016, sean.quinlan@endurance.com wrote:
> >> > Trying to cpanm install on Mac OSX 10.12.1 to 5.24.0 (using
> >> > plenv).
> >>
> >> Do you perhaps have homebrew installed? And OpenSSL installed from
> >> homebrew? What version do you get when you do "openssl version"?
> >>
> >> OS X comes installed with 0.9.8zh, but it doesn't provide the
> >> headers. If
> >> you install openssl via homebrew, you get the headers for 1.0.2j.
> >> These are
> >> incompatible, and though the compiling and linking succeeds, running
> >> fails
> >> due to integer differences (that's why it tries to allocate 3-4
> >> exabytes of
> >> memory, which is kind of difficult to do).
> >>
> >> I solved this by downloading the right version of OpenSSL from
> >> https://www.openssl.org/source/old/0.9.x/. Then extracting it,
> >> running
> >> `./config` which populates the `include` directory, and then running
> >> `cp
> >> -LR include/openssl /usr/local/include`.
> >>
> >
> >
toddr commented 5 years ago

I'm going to close this for now. It's my bet that Crypt::OpenSSL::Guess is solving this problem now assuming you've built your own openssl. If you still have problems, let me know.