Giter Site home page Giter Site logo

alien-base-modulebuild's People

Contributors

alranel avatar ambs avatar dakkar avatar giatorta avatar gugod avatar jberger avatar jtpalmer avatar midlifexis avatar mohawk2 avatar nshp avatar plicease avatar polettix avatar preaction avatar run4flat avatar salva avatar vikasnkumar avatar zmughal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ppisar sysfce2

alien-base-modulebuild's Issues

Provide better diagnostics for when SSL libraries are not installed.

HTTP::Tiny has an annoying way of handing exceptions and as a result AB::MB has for a long time had the very unhelpful "Internal Exception" error for any connection error.

Bonus points: the best way to get the SSL prereqs is to specify https as a protocol instead of http. This hasn't been documented well unfortunately, so the diagnostic for an SSL failure should direct to a FAQ or issue which explains the best way for the maintainer to fix it.

Running ./Build test before ./Build might skip package tests

twin% perl Build.PL
+ pkg-config --modversion uPB
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Alien-uPB' version '0.12'
twin% ./Build test
Use of uninitialized value in string eq at /home/ollisg/opt/perl/5.30.0-RC2/lib/site_perl/5.30.0/Alien/Base/ModuleBuild.pm line 507.
Testing library (if applicable) ... Done
+ pkg-config --modversion uPB
Use of uninitialized value in pattern match (m//) at /home/ollisg/opt/perl/5.30.0-RC2/lib/site_perl/5.30.0/Alien/Base/ModuleBuild/Repository.pm
 line 22.
Downloading File: https://github.com/mbarbon/upb/archive/a99b98f94f3289c50f653e2ab7d87d2416bbb89b.zip ... Done
Extracting Archive ... Done
Building library ... 
+ cd /tmp/Alien-uPB-0.12/_alien/upb-a99b98f94f3289c50f653e2ab7d87d2416bbb89b
+ make default googlepb CXXFLAGS="-std=c++11" USER_CPPFLAGS="-pthread -fPIC" 
...

Note the diagnostic:

Use of uninitialized value in string eq at /home/ollisg/opt/perl/5.30.0-RC2/lib/site_perl/5.30.0/Alien/Base/ModuleBuild.pm line 507.

It's not the normal order of how ./Build and ./Build test are invoked by cpan clients, but it is probably a legal thing to do, and in the very least it should be easy enough to support.

This is a harmless diagnostic for Aliens that do not have package tests (that is execute tests that come with the alienized packages, rather than the perl tests in t), but for Aliens with package tests this is a problem, as the packaged tests will be skipped.

This diagnostic was reported via email by someone saying they saw the diagnostic when running ./Build first, but I wasn't able to reproduce it with the ABMB 1.06.

Build.PL still checks for pkg-config

1.00 removed Alien::Base::PkgConfig module, but Build.PL still checks for pkg-config and PkgConfig:

unless (`pkg-config --version` && $? == 0) {
  $build_args{'requires'}->{'PkgConfig'} = '0.07520';
}

# For now we prefer PkgConfig.pm over pkg-config on
# Solaris 64 bit Perls.  We may need to do this on
# other platforms, in which case this logic should
# be abstracted so that it can be shared here and
# in lib/Alien/Base.pm#pkg_config_command
if($^O eq 'solaris' && $Config{ptrsize} == 8) {
  $build_args{'requires'}->{'PkgConfig'} = '0.08826';
}

I think the code could be removed from the Build.PL.

Test t/alien_base_modulebuild_repository_http.t fails on Windows 10, MSYS2

System info: Windows 10, MSYS2, perl version 5.32.2.

$ ./Build test
t/00_diag.t .................................. 1/? #
#
#
# HARNESS_ACTIVE=1
# HARNESS_VERSION=3.42
# LANG=en_US.UTF-8
# PERL5LIB=/home/hakon/perl/cpan-source/debug/Alien-Base-ModuleBuild-1.14/blib/lib:/home/hakon/perl/cpan-source/debug/Alien-Base-ModuleBuild-1.14/blib/arch
# PERL_DL_NONLAZY=1
# PERL_USE_UNSAFE_INC=1
# SHELL=/usr/bin/bash
#
#
#
# PERL5LIB path
# /home/hakon/perl/cpan-source/debug/Alien-Base-ModuleBuild-1.14/blib/lib
# /home/hakon/perl/cpan-source/debug/Alien-Base-ModuleBuild-1.14/blib/arch
#
#
#
# perl                    5.032000
# Acme::Alien::DontPanic  -
# Alien::Base             2.26
# Alien::Base::PkgConfig  2.26
# Archive::Extract        0.86
# Archive::Tar            2.36
# Capture::Tiny           0.48
# Digest::SHA             6.02
# File::chdir             0.1010
# HTML::LinkExtor         3.69
# HTTP::Tiny              0.076
# Inline                  -
# Inline::C               -
# Inline::CPP             -
# LWP::UserAgent          6.46
# List::Util              1.55
# Module::Build           0.4231
# Path::Tiny              0.114
# Shell::Config::Generate 0.34
# Shell::Guess            0.09
# Sort::Versions          1.62
# Test2::V0               0.000130
# Text::ParseWords        3.30
# URI                     1.76
# URI::file               4.21
# parent                  0.238
#
#
#
t/00_diag.t .................................. ok
t/alien_base_modulebuild.t ................... ok
t/alien_base_modulebuild_cabinet.t ........... ok
t/alien_base_modulebuild_file.t .............. ok
t/alien_base_modulebuild_repository.t ........ ok
t/alien_base_modulebuild_repository_ftp.t .... ok
t/alien_base_modulebuild_repository_http.t ... 1/?         # Failed test at t/alien_base_modulebuild_repository_http.t line 102.
        # +------+------------------+---------------------+
        # | PATH | GOT              | CHECK               |
        # +------+------------------+---------------------+
        # | [0]  | <DOES NOT EXIST> | relativepackage.txt |
        # +------+------------------+---------------------+
    # Failed test 'LWP::UserAgent'
    # at t/alien_base_modulebuild_repository_http.t line 103.

# Failed test 'list_files()'
# at t/alien_base_modulebuild_repository_http.t line 104.
t/alien_base_modulebuild_repository_http.t ... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests
t/alien_base_modulebuild_repository_local.t .. ok
t/alien_base_modulebuild_utils.t ............. ok
t/inline.t ................................... skipped: test requires Inline 0.56 + Inline::C + Acme::Alien::DontPanic 0.010
t/inline_cpp.t ............................... skipped: test requires Inline 0.56 + Inline::C + Acme::Alien::DontPanic 0.010

Test Summary Report
-------------------
t/alien_base_modulebuild_repository_http.t (Wstat: 256 Tests: 9 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=11, Tests=58, 17 wallclock secs ( 0.06 usr  0.09 sys +  3.91 cusr  7.70 csys = 11.77 CPU)
Result: FAIL
Failed 1/11 test programs. 1/58 subtests failed.

Suspected link extor fail on older Perls

The fetch should warn if it fails, so I think it is having trouble extracting the links from the HTML.
http://www.cpantesters.org/cpan/report/0ebc1ef4-00f5-11e9-afbf-aec3b07506ca
http://www.cpantesters.org/cpan/report/5eadb9dc-00f4-11e9-afbf-aec3b07506ca
http://www.cpantesters.org/cpan/report/9ca6a5c4-00f3-11e9-afbf-aec3b07506ca

# 
#                      perl 5.008009
#    Acme::Alien::DontPanic undefined
#       Acme::Ford::Prefect undefined
#  Acme::Ford::Prefect::FFI undefined
#              Alien::Build 1.49
#          Archive::Extract 0.80
#              Archive::Tar 2.04
#             Capture::Tiny 0.30
#                File::Spec 3.74
#                File::Temp 0.22
#               File::chdir 0.1010
#           HTML::LinkExtor 3.69
#                HTTP::Tiny 0.056
#                    Inline undefined
#                 Inline::C undefined
#               Inline::CPP undefined
#            LWP::UserAgent 6.35
#             Module::Build 0.4216
#                  Net::FTP 2.77
#   Shell::Config::Generate 0.33
#              Shell::Guess 0.09
#            Sort::Versions 1.62
#                Test2::API 1.302136
#                 Test2::V0 0.000117
#          Text::ParseWords 3.27
#                       URI 1.69
#                    parent 0.234
t/00_diag.t .................................. ok
t/alien_base_modulebuild_cabinet.t ........... ok
t/alien_base_modulebuild_file.t .............. ok
t/alien_base_modulebuild_repository.t ........ ok
Variable "$bin" will not stay shared at (eval 181) line 15.
t/alien_base_modulebuild_repository_ftp.t .... ok
        # Failed test at t/alien_base_modulebuild_repository_http.t line 104.
        # +------+------------------+---------------------+
        # | PATH | GOT              | CHECK               |
        # +------+------------------+---------------------+
        # | [0]  | <DOES NOT EXIST> | relativepackage.txt |
        # +------+------------------+---------------------+
    # Failed test 'LWP::UserAgent'
    # at t/alien_base_modulebuild_repository_http.t line 105.

# Failed test 'list_files()'
# at t/alien_base_modulebuild_repository_http.t line 106.
t/alien_base_modulebuild_repository_http.t ... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/9 subtests 
t/alien_base_modulebuild_repository_local.t .. ok
t/alien_base_modulebuild.t ................... ok
t/inline.t ................................... skipped: Module 'Inline' is not installed
t/alien_base_modulebuild_utils.t ............. ok
t/inline_cpp.t ............................... skipped: Module 'Inline' is not installed

Test Summary Report
-------------------
t/alien_base_modulebuild_repository_http.t (Wstat: 256 Tests: 9 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=11, Tests=58,  2 wallclock secs ( 0.08 usr  0.03 sys +  2.79 cusr  0.56 csys =  3.46 CPU)
Result: FAIL
Failed 1/11 test programs. 1/58 subtests failed.

Messed '%s' value

Hi

Accordingly with the docs, %s is "The full path to the final installed location of the share directory (builder method alien_library_destination). This is where the library should install itself; for autoconf style installs this will look like".

Nevertheless, I am getting:
./configure --prefix=/root/.cpanm/work/1574460480.32178/Alien-ImageMagick-0.07/blib/lib/auto/share/dist/Alien-ImageMagick ...

And of course that doesn't make sense.

Although the resulting files get installed in the proper place (as blib is copied) the C code from the library is configured with this specific path hardcoded, and when running, it will search for that path to get its dependencies.

Is there something I might be missing? Or is it a bug and can be fixed?
Thanks

Probably harmless diagnostic

When building Alien::uPB (which has the appropriate configuration):

twin% perl Build.PL
+ pkg-config --modversion uPB
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Alien-uPB' version '0.12'
twin% ./Build
Building Alien-uPB
+ pkg-config --modversion uPB
Use of uninitialized value in pattern match (m//) at /home/ollisg/opt/perl/5.30.0-RC2/lib/site_perl/5.30.0/Alien/Base/ModuleBuild/Repository.pm line 22.
Downloading File: https://github.com/mbarbon/upb/archive/a99b98f94f3289c50f653e2ab7d87d2416bbb89b.zip ... Done
Extracting Archive ... Done
Building library ... 
+ cd /tmp/Alien-uPB-0.12/_alien/upb-a99b98f94f3289c50f653e2ab7d87d2416bbb89b
+ make default googlepb CXXFLAGS="-std=c++11" USER_CPPFLAGS="-pthread -fPIC" 
CC upb/def.c
upb/def.c: In function ‘upb_fielddef_descriptortype’:
upb/def.c:1066:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
...

Note the diagnostic:

Use of uninitialized value in pattern match (m//) at /home/ollisg/opt/perl/5.30.0-RC2/lib/site_perl/5.30.0/Alien/Base/ModuleBuild/Repository.pm line 22.

I think this is harmless, and the undef should be checked in ABMB, but need to do some due diligence first. Otherwise it may need to be reported to Alien::uPB.

List::Util 1.45 Required But Not Enforced, Installation Fails

Installation of Alien::Base::ModuleBuild fails on a fresh Ubuntu v16.04.4 with the default Perl v5.22.1, this is causing everything else to fail such as Alien::GSL and RPerl itself, etc etc.

The main failure appears to be due to the currently-installed List::Util v1.41 not providing the uniq() subroutine:

t/00_diag.t .................................. ok
"uniq" is not exported by the List::Util module
Can't continue after import errors at /home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/lib/Alien/Base/ModuleBuild.pm line 16

I can see that we are already requiring List::Util v1.45 in order get access to the 'uniq()' subroutine:

https://github.com/Perl5-Alien/Alien-Base-ModuleBuild/blob/master/dist.ini#L29

However, cpanm does not actually enforce the requirement of List::Util v1.45, and lets Alien::Base::ModuleBuild start running tests without recursively installing a List::Util upgrade.

The full output from A::B::MB failure is below:

$ cpanm -v --installdeps RPerl
...
Building and testing Alien-Base-ModuleBuild-1.11 ... Building Alien-Base-ModuleBuild
# 
# 
# 
# HARNESS_ACTIVE=1
# HARNESS_VERSION=3.35
# LANG=en_US.UTF-8
# PERL5LIB=/home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/lib:/home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild
-1.11/blib/arch:lib:/home/wbraswell/perl5/lib/perl5/5.22.1/x86_64-linux-gnu-thread-multi:/home/wbraswell/perl5/lib/perl5/5.22.1:/home/wbraswell/perl5/lib/perl
5/x86_64-linux-gnu-thread-multi:/home/wbraswell/perl5/lib/perl5:lib:/home/wbraswell/perl5/lib/perl5
# PERL_DL_NONLAZY=1
# PERL_LOCAL_LIB_ROOT=/home/wbraswell/perl5
# PERL_MB_OPT=--install_base "/home/wbraswell/perl5"
# PERL_MM_OPT=INSTALL_BASE=/home/wbraswell/perl5
# PERL_MM_USE_DEFAULT=1
# PERL_USE_UNSAFE_INC=1
# SHELL=/bin/bash
# 
# 
# 
# PERL5LIB path
# /home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/lib
# /home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/arch
# lib
# /home/wbraswell/perl5/lib/perl5/5.22.1/x86_64-linux-gnu-thread-multi
# /home/wbraswell/perl5/lib/perl5/5.22.1
# /home/wbraswell/perl5/lib/perl5/x86_64-linux-gnu-thread-multi
# /home/wbraswell/perl5/lib/perl5
# lib
# /home/wbraswell/perl5/lib/perl5
# 
# 
# 
# perl                    5.022001
# Alien::Base             1.98
# Alien::Base::PkgConfig  1.98
# Archive::Extract        0.86
# Archive::Tar            2.04
# Capture::Tiny           0.48
# File::chdir             0.1010
# HTTP::Tiny              0.054
# Module::Build           0.4216
# Path::Tiny              0.112
# Shell::Config::Generate 0.33
# Shell::Guess            0.09
# Sort::Versions          1.62
# Test2::Mock             0.000129
# Test2::Require::Module  0.000129
# Test2::V0               0.000129
# URI                     1.71
# URI::file               4.21
# parent                  0.232
# 
# 
# 
t/00_diag.t .................................. ok
"uniq" is not exported by the List::Util module
Can't continue after import errors at /home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/lib/Alien/Base/ModuleBuild.pm line 16.
BEGIN failed--compilation aborted at /home/wbraswell/.cpanm/work/1580604471.6262/Alien-Base-ModuleBuild-1.11/blib/lib/Alien/Base/ModuleBuild.pm line 16.
Compilation failed in require at t/alien_base_modulebuild.t line 4.
BEGIN failed--compilation aborted at t/alien_base_modulebuild.t line 4.
t/alien_base_modulebuild.t ................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
t/alien_base_modulebuild_cabinet.t ........... ok
t/alien_base_modulebuild_file.t .............. ok
t/alien_base_modulebuild_repository.t ........ ok
t/alien_base_modulebuild_repository_ftp.t .... ok
t/alien_base_modulebuild_repository_http.t ... ok
t/alien_base_modulebuild_repository_local.t .. ok
t/alien_base_modulebuild_utils.t ............. ok
t/inline.t ................................... skipped: Module 'Inline' is not installed
t/inline_cpp.t ............................... skipped: Module 'Inline' is not installed

Test Summary Report
-------------------
t/alien_base_modulebuild.t                 (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=11, Tests=39,  3 wallclock secs ( 0.05 usr  0.03 sys +  2.79 cusr  0.28 csys =  3.15 CPU)
Result: FAIL
Failed 1/11 test programs. 0/39 subtests failed.
! Installing Alien::Base::ModuleBuild failed. See /home/wbraswell/.cpanm/work/1580604471.6262/build.log for details. Retry with --force to force install it.
FAIL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.