Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails on Alpine based Docker image #8

Open
szabgab opened this issue Jul 8, 2018 · 4 comments
Open

Test fails on Alpine based Docker image #8

szabgab opened this issue Jul 8, 2018 · 4 comments

Comments

@szabgab
Copy link

szabgab commented Jul 8, 2018

cpanm (App::cpanminus) 1.7044 on perl 5.026002 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1531050407.2285
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (busybox) 1.27.2
You have /usr/bin/unzip
Searching POSIX::strftime::Compiler () on cpanmetadb ...
--> Working on POSIX::strftime::Compiler
Fetching http://www.cpan.org/authors/id/K/KA/KAZEBURO/POSIX-strftime-Compiler-0.42.tar.gz
-> OK
Unpacking POSIX-strftime-Compiler-0.42.tar.gz
Entering POSIX-strftime-Compiler-0.42
Checking configure dependencies from META.json
Checking if you have Module::Build 0.38 ... Yes (0.4224)
Checking if you have ExtUtils::Install 1.46 ... Yes (2.04)
Configuring POSIX-strftime-Compiler-0.42
Running Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'POSIX-strftime-Compiler' version '0.42'
cp META.json MYMETA.json
cp META.yml MYMETA.yml
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Time::Local 0 ... Yes (1.25)
Checking if you have POSIX 0 ... Yes (1.76)
Checking if you have Carp 0 ... Yes (1.42)
Checking if you have Test::More 0.98 ... Yes (1.302073)
Checking if you have Exporter 0 ... Yes (5.72)
Building and testing POSIX-strftime-Compiler-0.42
Building POSIX-strftime-Compiler
t/00_compile.t ... ok
t/01_basic.t ..... ok

#   Failed test 'tmzone1(CET-1CEST)'
#   at t/02_timezone.t line 30.
#          got: '+0200'
#     expected: '+0100'

#   Failed test 'tmname1(CET-1CEST)'
#   at t/02_timezone.t line 31.
#          got: 'CEST'
#     expected: 'CET'
# Looks like you failed 2 tests of 4.
t/02_timezone.t ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests
t/03_isoweek.t ... ok


    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-1-10 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-1-10 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-5-10 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-5-10 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-8-15 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-8-15 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-11-15 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:A?CST)'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0930'

    #   Failed test 'Australia/Darwin / 2013-11-15 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:A?CST)'
    # Looks like you failed 16 tests of 16.

#   Failed test 'Australia/Darwin'
#   at t/04_tzset.t line 56.

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-1-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-1-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-5-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-5-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-8-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-8-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-11-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'JST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0900'

    #   Failed test 'Asia/Tokyo / 2013-11-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'JST'
    # Looks like you failed 16 tests of 16.

#   Failed test 'Asia/Tokyo'
#   at t/04_tzset.t line 56.

    #   Failed test 'Europe/London / 2013-1-10 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:(GMT|WET))'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/London / 2013-5-10 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:(BST|WEST))'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/London / 2013-5-10 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:(BST|WEST))'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/London / 2013-8-15 => UTC'
    #   at t/04_tzset.t line 37.
    #                   'UTC'
    #     doesn't match '(?^:(BST|WEST))'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/London / 2013-8-15 => GMT'
    #   at t/04_tzset.t line 47.
    #                   'GMT'
    #     doesn't match '(?^:(BST|WEST))'
    # Looks like you failed 9 tests of 16.

#   Failed test 'Europe/London'
#   at t/04_tzset.t line 56.

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/Paris / 2013-1-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'CET'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/Paris / 2013-1-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'CET'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0200'

    #   Failed test 'Europe/Paris / 2013-5-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'CEST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0200'

    #   Failed test 'Europe/Paris / 2013-5-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'CEST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0200'

    #   Failed test 'Europe/Paris / 2013-8-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'CEST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0200'

    #   Failed test 'Europe/Paris / 2013-8-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'CEST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/Paris / 2013-11-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'CET'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '+0100'

    #   Failed test 'Europe/Paris / 2013-11-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'CET'
    # Looks like you failed 16 tests of 16.

#   Failed test 'Europe/Paris'
#   at t/04_tzset.t line 56.

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '-0500'

    #   Failed test 'America/New_York / 2013-1-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'EST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '-0500'

    #   Failed test 'America/New_York / 2013-1-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'EST'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '-0400'

    #   Failed test 'America/New_York / 2013-5-10 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'EDT'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '-0400'

    #   Failed test 'America/New_York / 2013-5-10 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'EDT'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '-0400'

    #   Failed test 'America/New_York / 2013-8-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'EDT'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '-0400'

    #   Failed test 'America/New_York / 2013-8-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'EDT'

    #   Failed test at t/04_tzset.t line 35.
    #          got: '+0000'
    #     expected: '-0500'

    #   Failed test 'America/New_York / 2013-11-15 => UTC'
    #   at t/04_tzset.t line 41.
    #          got: 'UTC'
    #     expected: 'EST'

    #   Failed test at t/04_tzset.t line 45.
    #          got: '+0000'
    #     expected: '-0500'

    #   Failed test 'America/New_York / 2013-11-15 => GMT'
    #   at t/04_tzset.t line 51.
    #          got: 'GMT'
    #     expected: 'EST'
    # Looks like you failed 16 tests of 16.

#   Failed test 'America/New_York'
#   at t/04_tzset.t line 56.
# Looks like you failed 5 tests of 6.
t/04_tzset.t .....
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/6 subtests

Test Summary Report
-------------------
t/02_timezone.t (Wstat: 512 Tests: 4 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
t/04_tzset.t   (Wstat: 1280 Tests: 6 Failed: 5)
  Failed tests:  1-2, 4-6
  Non-zero exit status: 5
Files=5, Tests=381,  1 wallclock secs ( 0.09 usr  0.02 sys +  0.62 cusr  0.07 csys =  0.80 CPU)
Result: FAIL
Failed 2/5 test programs. 7/381 subtests failed.
-> FAIL Installing POSIX::strftime::Compiler failed. See /root/.cpanm/work/1531050407.2285/build.log for details. Retry with --force to
force install it.

When trying to install it in a Docker image created with this Dockerfile:

FROM alpine:3.7
RUN apk update && \
    apk add wget && \
    apk add perl && \
    apk add perl-dev && \
    apk add make && \
    apk add g++ && \
    wget https://cpanmin.us/ && \
    perl index.html App::cpanminus && \
    rm index.html
@abh
Copy link

abh commented Dec 4, 2018

@szabgab it works if you 'apk add tzdata'

@abh
Copy link

abh commented Feb 5, 2022

tzdata doesn't seem to fix this anymore,

Building and testing POSIX-strftime-Compiler-0.44
cp lib/POSIX/strftime/Compiler.pm blib/lib/POSIX/strftime/Compiler.pm
t/00_compile.t ... ok
t/01_basic.t ..... ok

#   Failed test 'tmzone1(CET-1CEST)'
#   at t/02_timezone.t line 26.
#          got: '+0200'
#     expected: '+0100'

#   Failed test 'tmname1(CET-1CEST)'
#   at t/02_timezone.t line 27.
#          got: 'CEST'
#     expected: 'CET'
# Looks like you failed 2 tests of 4.
t/02_timezone.t ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests
t/03_isoweek.t ... ok
t/04_tzset.t ..... ok

Test Summary Report
-------------------
t/02_timezone.t (Wstat: 512 Tests: 4 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=5, Tests=381,  1 wallclock secs ( 0.05 usr  0.01 sys +  0.46 cusr  0.11 csys =  0.63 CPU)
Result: FAIL
-> FAIL Installing POSIX::strftime::Compiler failed. See /root/.cpanm/work/1644052723.157/build.log for details. Retry with --force to force install it.

@superherointj
Copy link

superherointj commented Jan 14, 2023

I could replicate this issue in NixOS when building for Musl. [Issue is not exclusive to Alpine but Musl then.] Glibc builds fine.

Logs: https://gist.github.com/superherointj/358fafaf6686b8c2de6e23a74a6ee0dd

To reproduce, at nixpkgs repo, run:
nix build .#pkgsMusl.perl536Packages.POSIXstrftimeCompiler

I have tried adding tzdata but no success.

@superherointj
Copy link

I suggest changing the title to convey it fails in Musl generally, and not just in a specific Linux distribution (Alpine and NixOS tested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants