Bug 6987 - Add Support for perl 5.10
: Add Support for perl 5.10
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Platform Support
: 7.0
: PC Linux (other)
: -- normal with 2 votes (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 12:48 UTC by Mark Miksis
Modified: 2009-07-31 10:16 UTC (History)
7 users (show)

See Also:
Category: ---


Attachments
patch for perl 5.10 version string behavior (1.60 KB, patch)
2008-03-31 16:06 UTC, Mark Miksis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Miksis 2008-02-06 12:48:37 UTC
Fedora 9, due out in late April, is tentatively planning to ship with perl 5.10.  It would be good for SC to support 5.10 by then, perhaps in 7.0.1.  This would require building the binary perl modules for 5.10.  I'm not sure if any other changes to SC are required...
Comment 1 Mark Miksis 2008-03-13 11:17:38 UTC
FYI, perl 5.10 has been merged into F9 and will be part of the F9 beta next week.  This indicates that F9 final will use it unless something turns out to be really broken.
Comment 2 James Richardson 2008-03-31 09:23:32 UTC
Matt:  Please work with Andy on implementing this.
Comment 3 Mark Miksis 2008-03-31 09:54:52 UTC
I've done some very limited testing while playing with Fedora 9 Beta and there are definitely a few other issues.

After building the necessary perl modules, the first problem I encountered was:

[snip]
Extended @INC to contain:
/usr/share/squeezecenter/CPAN/arch/118.53/i386-linux-thread-multi
/usr/share/squeezecenter/CPAN/arch/118.53/i386-linux-thread-multi/auto
/usr/share/squeezecenter/CPAN/arch/118.53.46.49.48.46.48/i386-linux-thread-multi
/usr/share/squeezecenter/CPAN/arch/118.53.46.49.48.46.48/i386-linux-thread-multi/auto
/usr/share/squeezecenter/CPAN/arch/118.53/i386-linux-thread-multi
/usr/share/squeezecenter/CPAN/arch/118.53/i386-linux-thread-multi/auto
[snip]

This is explained at http://perldoc.perl.org/perldelta.html#%24%5eV-is-now-a-'version'-object-instead-of-a-v-string

After working around that, SC still won't start.  The following is logged to the console:

Log4perl: Seems like no initialization happened. Forgot to call init()?
Use of uninitialized value $_[0] in join or string at /usr/lib/perl5/5.10.0/File/Spec/Unix.pm line 81.
Useless use of a constant in void context at /usr/lib/perl5/vendor_perl/Slim/Networking/Slimproto.pm line 104.
Use of uninitialized value $old in pattern match (m//) at /usr/lib/perl5/vendor_perl/Slim/Utils/Prefs.pm line 265.

and then after a short delay:

Internal error: Root Logger not initialized. at /usr/share/squeezecenter/CPAN/Log/Log4perl/Logger.pm line 557.

The log contains only:

[08-03-31 02:35:05.3325] Slim::Utils::MySQLHelper::startServer (298) FATAL: Server didn't startup in 30 seconds! Exiting!
[08-03-31 02:35:05.3392] Log::Log4perl::Logger::and_die (850) Warning: FATAL: Server didn't startup in 30 seconds! Exiting! at /usr/lib/perl5/vendor_perl/Slim/Utils/MySQLHelper.pm line 298

I've done very little debugging beyond this except to note that mysqld really does start, but SC can't talk to it for some reason.  I'm fairly sure it's not a firewall or SELinux issue.

I have no idea whether the Log4perl issue and the mysql issue are related (or whether either of them are really due to perl 5.10).

Hope this helps.

Note that F9 is still scheduled for release in late April so it would be nice to see this resolved before 7.1.
Comment 4 Matt Wise 2008-03-31 14:02:05 UTC
I'll get a FC9 system booted up by tomorrow and start experimenting with this... 
Comment 5 Mark Miksis 2008-03-31 16:06:19 UTC
Created attachment 3168 [details]
patch for perl 5.10 version string behavior

Matt/Andy,

Here's how I chose to work around the perl version string issue.  I'm not a perl guy, so there's probably a better/cleaner way...

Is this (or something similar) OK for 7.0/trunk?  (I noticed someone retargeted this bug to 7.1.)
Comment 6 Andy Grundman 2008-03-31 17:07:33 UTC
I'm OK with it as long as it doesn't break any other platforms.
Comment 7 Mark Miksis 2008-04-01 10:44:43 UTC
(In reply to comment #6)
> I'm OK with it as long as it doesn't break any other platforms.
> 

Yeah, unfortunately I have no convenient way to test on non-Linux...
Comment 8 Rob 2008-04-06 20:22:15 UTC
I have squeezecenter 7.0.1 working on fc9 with perl 5.1. Though I'm not sure I could explain how I got it working in a sufficient fashion to help anyone; I had to try so many things. In essence, I installed all the RPM's for the perl modules that were being used but most weren't being recognized correctly. So I ended up compiling and installing most of the modules directly; I didn't have much difficulty with that though it was time consuming. I didn't use the included perl script to download and compile the modules, it didnt work, but installed the CPAN module and used the cpan command to download the source and compiled them directly. Then I had to modify some of the squeezecenter scripts to support the new format of JSON::XS. Everything seems to be working now. 

-- Rob

Comment 9 Andy Grundman 2008-04-25 13:08:48 UTC
OK I've applied the bootstrap patch to 7.0.1, will work on compiling binary modules for 5.10 for 7.1.
Comment 10 Mark Miksis 2008-05-07 13:35:39 UTC
Matt, Andy,

Any ETA on getting the binary stuff added to a CPAN/arch/5.10 directory?  I have a clean install of F9 Beta and I'm interested in doing some more testing/experimenting with the RPM before F9 final comes out on Tuesday.
Comment 11 Andy Grundman 2008-05-07 13:40:55 UTC
No, but feel free to compile and check in Linux binary modules for 7.1.
Comment 12 Mark Miksis 2008-05-07 13:47:28 UTC
(In reply to comment #11)
> No, but feel free to compile and check in Linux binary modules for 7.1.
> 

Do you have a script you normally use for this (other than build-perl-modules.pl)?  I was wondering whether the reason I had problems the last time I looked at this might be because you built with some options I didn't know about.  That's why I was waiting for you...
Comment 13 Andy Grundman 2008-05-07 13:51:47 UTC
Some are easy, but those that require other libraries must include the libraries instead of dynamically linking them.  Just run ldd on them when you're done and check for dynamic links.  The hardest one is GD, and I wrote some docs on that: platforms/doc/Perl-XS-notes.txt
Comment 14 KDF 2008-05-15 01:43:50 UTC
*** Bug 8157 has been marked as a duplicate of this bug. ***
Comment 15 Ian Whalley 2008-05-15 08:10:30 UTC
F9 is out, and I find myself in the unfortunate position of not being able to run slimserver on it.

Adding self to Cc:.
Comment 16 Jan van Haarst 2008-05-16 05:51:29 UTC
Is there a way to work around this ?
Right now I can't listen to my music using my Debian unstable box.
Comment 17 Andy Grundman 2008-05-16 19:33:32 UTC
There are instructions on the forum for manually compiling modules and getting 5.10 working.

The reason this is a bit more complicated than it first appears is that some modules we are currently using need to be updated in order to work with 5.10.  For example, DBI 1.50 does not work with 5.10, and so we will need to update to the latest version across the board on all OS's.
Comment 18 Andy Grundman 2008-05-17 08:59:07 UTC
5.10 support for Linux i386 has been checked in.
Comment 19 Mark Miksis 2008-05-17 10:54:45 UTC
(In reply to comment #18)
> 5.10 support for Linux i386 has been checked in.
> 

Cool.  Limited testing indicates that with these modules added the RPM works out-of-the box with F9.  I'll test with Mandriva 2008.1 when I get a chance.

Should I reopen this bug to request the perl modules be built for x86_64, or would you prefer a new bug?
Comment 20 Andy Grundman 2008-05-17 11:00:35 UTC
Yeah, I don't have an x86_64 system to build on at the moment, though.
Comment 21 Stabilo 2008-05-19 01:59:27 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > 5.10 support for Linux i386 has been checked in.
> > 
> 
> Cool.  Limited testing indicates that with these modules added the RPM works
> out-of-the box with F9.  I'll test with Mandriva 2008.1 when I get a chance.
> 
> Should I reopen this bug to request the perl modules be built for x86_64, or
> would you prefer a new bug?
> 

Which RPM did you use? I just tried queezecenter-7.1-0.1.19797.noarch.rpm from http://repos.slimdevices.com/yum/squeezecenter/unstable/ and still get the same error about a load error concerning YAML::Syck
Comment 22 Mark Miksis 2008-05-19 09:39:12 UTC
(In reply to comment #21)
> Which RPM did you use? I just tried queezecenter-7.1-0.1.19797.noarch.rpm from
> http://repos.slimdevices.com/yum/squeezecenter/unstable/ and still get the same
> error about a load error concerning YAML::Syck
> 

Yeah, I tested by manually adding the binary perl modules from SVN since there was no new nightly build yet.  It now appears that RPMs have not been built at all for the last few days so there's no RPM available that includes the updated modules.  Hopefully this will be corrected soon now that the weekend is over.
Comment 23 Andy Grundman 2008-05-20 12:26:37 UTC
x86_64 modules committed in change 19938.

We don't need to support 5.10 on Mac or Windows yet so I'm considering this bug fixed.
Comment 24 Ian Whalley 2008-05-31 04:53:07 UTC
(In reply to comment #23)
>x86_64 modules committed in change 19938.
>We don't need to support 5.10 on Mac or Windows yet so I'm considering this bug
>fixed.

Thanks for this -- I was able to download a daily build, install it on Fedora 9 x86_64 and it worked just fine.

Comment 25 James Richardson 2008-07-10 14:54:28 UTC
(In reply to comment #24)
> (In reply to comment #23)
> >x86_64 modules committed in change 19938.
> >We don't need to support 5.10 on Mac or Windows yet so I'm considering this bug
> >fixed.
> 
> Thanks for this -- I was able to download a daily build, install it on Fedora 9
> x86_64 and it worked just fine.
> 

Changing bug status
Comment 26 Chris Owens 2008-07-30 15:26:55 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 27 James Richardson 2008-12-15 12:32:15 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 28 Chris Owens 2009-07-31 10:16:48 UTC
Reduce number of active targets for SC