Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 570936

Summary: >=dev-perl/Date-Manip-6.510.0 on musl-amd64 - Use of uninitialized value $zone
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: [OLD] UnspecifiedAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: alex_y_xu, fsvm88, musl, perl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: output of emerge --info

Description tt_1 2016-01-05 07:21:05 UTC
Created attachment 421942 [details]
output of emerge --info

I am playing around with a musl-stage-3 here, and a recent update of dev-perl/DateManip made genlop to post some errors, still it is readable and correct though. If you need more informations please tell me, thank you. 

user / #  genlop -i DateManip
Use of uninitialized value $zone in lc at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 199.
Use of uninitialized value $zone in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 1325.
ERROR: [date_period] Invalid zone: 
Use of uninitialized value $z in lc at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 940.
Use of uninitialized value $zone in lc at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 199.
Use of uninitialized value $zone in concatenation (.) or string at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 1325.
ERROR: [date_period] Invalid zone: 
Use of uninitialized value $z in lc at /usr/lib/perl5/vendor_perl/5.20.2/Date/Manip/TZ.pm line 940.
 * dev-perl/DateManip


   Total builds: 2
   Global build time: 49 seconds.
   Average merge time: 24 seconds.

   Info about currently installed ebuild:

   * dev-perl/DateManip-6.510.0
   Install date: Sun Jan  3 11:11:48 2016
   USE=" -test"
   CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"   CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 1 Alex Xu (Hello71) 2016-01-06 14:07:01 UTC
try setting TZ.
Comment 2 tt_1 2016-02-15 13:00:02 UTC
By typing export TZ= with the correct timezone all the errors are gone for the session. So setting timezone helps indeed. 

It used to work without problems with DateManip-6.410.0 , but I'm not sure whom to blame for that.
Comment 3 Fabio Scaccabarozzi 2016-04-01 23:44:01 UTC
I hit the same when recompiling a minimal stage3 chroot.
I noticed that we don't depend on timezone-data, while glibc does.
In case we want to add the dependency to musl, we should require timezone-data[-nls], as it tries to link against -lintl (alternatively, we can patch the ebuild).
Comment 4 Felix Janda 2016-04-02 21:24:49 UTC
@Fabio: Please open a bug with your patch for the timezone-data ebuild.
This can easily be fixed in the main tree.

I think sys-libs/musl has (not yet) a dependency on sys-libs/timezone-data
for historical reasons: When musl was added to gentoo, musl did not yet
support reading timezone data.
Comment 5 Fabio Scaccabarozzi 2016-04-03 09:05:24 UTC
(In reply to Felix Janda from comment #4)
> @Fabio: Please open a bug with your patch for the timezone-data ebuild.
> This can easily be fixed in the main tree.
> 
> I think sys-libs/musl has (not yet) a dependency on sys-libs/timezone-data
> for historical reasons: When musl was added to gentoo, musl did not yet
> support reading timezone data.

Still have to draft it - I went the easy route and compiled timezone-data with USE="-nls". I will write it and open the bug.
Comment 6 Fabio Scaccabarozzi 2016-04-05 19:02:13 UTC
Opened. See bug #579104.
Comment 7 tt_1 2016-05-15 09:53:59 UTC
the bug is solved by emerging recent timezone-data, so could please someone add it as a dependency to the sys-libs/musl-1.1.4 ebuild?
Comment 8 Anthony Basile gentoo-dev 2016-10-20 11:11:37 UTC
(In reply to tt_1 from comment #7)
> the bug is solved by emerging recent timezone-data, so could please someone
> add it as a dependency to the sys-libs/musl-1.1.4 ebuild?

if dev-perl/Date-Manip needs timezone-data, then it should pull it in, not the musl ebuild.
Comment 9 tt_1 2016-10-22 08:17:34 UTC
Well, if it is possible to add some conditional statement to the Date-Manip ebuild that, in case of elibc being musl, then RDEPEND on timezone-data, that would be ok for me. I just wonder if this bug gets hit by other packages as well? Those possible breakages could be fixed by adding RDEPEND on timezone-data to the musl ebuild.
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2016-10-22 19:27:59 UTC
(In reply to tt_1 from comment #9)
> Well, if it is possible to add some conditional statement to the Date-Manip
> ebuild that, in case of elibc being musl, then RDEPEND on timezone-data,
> that would be ok for me. I just wonder if this bug gets hit by other
> packages as well? Those possible breakages could be fixed by adding RDEPEND
> on timezone-data to the musl ebuild.

Dependency added, thanks!