SqueezeCenter and Scalar::Util

After upgrading to snv_93 SqueezeCenter (quite predictably) refused to start again. The error was:

# ./slimrun
Weak references are not implemented in the version of perl at /usr/perl5/site_perl/5.8.4/DBIx/Class/Schema.pm line 8
BEGIN failed–compilation aborted at /usr/perl5/site_perl/5.8.4/DBIx/Class/Schema.pm line 8.
Compilation failed in require at (eval 113) line 3.
…propagated at /usr/perl5/5.8.4/lib/base.pm line 85.
BEGIN failed–compilation aborted at /opt/csw/squeezecenter-7.2-21059-noCPAN/Slim/Schema.pm line 29.
Compilation failed in require at /opt/csw/squeezecenter-7.2-21059-noCPAN/Slim/Utils/Progress.pm line 11.
BEGIN failed–compilation aborted at /opt/csw/squeezecenter-7.2-21059-noCPAN/Slim/Utils/Progress.pm line 11.
Compilation failed in require at /opt/csw/squeezecenter-7.2-21059-noCPAN/Slim/Utils/Scanner.pm line 45.
. . .

The issue is related to the same Scalar::Util module. Just force install it like explained here.

MAC for UNIX

MAC (Monkey’s Audio Converter) for Windows can be downloaded from http://www.monkeysaudio.com. But what about a UNIX version? Two years ago v3.99 Update 4 Build 5 was released but then the development stopped because of some contradictory licensing reasons. That means that MAC for UNIX is not maintained anymore. Fortunately, the old version still works. I compiled it under Solaris 11 x86 and use it for SqueezeCenter.

The source tar file is attached to the post: mac-399-u4-b5.tgz (MD5)

Some notes.

  • To check the MD5 digest:
    % md5sum -c mac-3.99-u4-b5.tgz.md5
    mac-3.99-u4-b5.tgz: OK
  • Always use –prefix=/usr/local (or any other directory in which you keep non-standard files) configuration parameter, because by default the prefix is set to /usr. You might overwrite Solaris file /usr/bin/mac (message authentication code):
    % ./configure –prefix=/usr/local
  • If you are going to use –enable-assembly=yes option (you need yasm to compile assembler code) under Solaris change “sh” to “bash” in src/MACLib/Assembly/Makefile in the following line (line 214 in my case):
    STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh

    This is what the line should look like:

    STRIP_FPIC = bash $(top_srcdir)/strip_fPIC.sh
  • There is already a program /bin/mac (see above). If you don’t want to use the full path to the MAC, simply rename the latter:
    # mv /usr/local/bin/mac /usr/local/bin/MAC

SqueezeCenter and Compress::Zlib

After upgrading to Nevada b92 SqueezeCenter refused to start with the following error:

The following modules failed to load: Compress::Zlib

# perl -MCPAN -e shell
cpan> install Compress::Zlib
. . .
Module [Compress::Zlib] failed to load: is only available with the XS version
. . .

But the actual problem is Scalar::Util. To solve the problem reinstall Scalar::Util and then Compress::Zlib. Use force install if CPAN says that the latest version is already installed:

# perl -MCPAN -e shell
. . .
cpan[1]> install Scalar::Util
CPAN: Storable loaded ok (v2.12)
Going to read /var/tmp/cpan/Metadata
Database was generated on Tue, 24 Jun 2008 10:02:57 GMT
Scalar::Util is up to date (1.19).
cpan[2]> force install Scalar::Util
. . .
cpan[3]> force install Compress::Zlib
. . .

Sources: whirlpool.net.au and Usenet forums.

Firefox 3.0 and Solaris

Just a brain dump.

SqueezeCenter 7.1 under Solaris

The idea was to use “bare” SqueezeCenter without bundled CPAN (the CPAN directory was moved away) modules, Solaris 11 (or Nevada build 88) and supplied with Solaris PERL and MySQL.

Then if you start slimserver.pl the errors will let you know which CPAN modules to install. For example:

The following modules failed to load: version JSON::XS YAML::Syck GD
. . .
Can’t locate JSON::XS.pm in @INC (@INC contains: squeezecenter-7.1-19407-noCPAN/CPAN/arch/5.8/i86pc-solaris-64int

Or For Nevada b95:

The following CPAN modules were found but cannot work with SqueezeCenter:
File::Temp (loaded 0.14, need 0.17)
I18N::LangTags (loaded 0.29, need 0.35)

To fix this problem you have several options:
1. Install the latest version of the module(s) using CPAN: sudo cpan Some::Module
2. Update the module’s package using apt-get, yum, etc.
3. Run the .tar.gz version of SqueezeCenter which includes all required CPAN modules.

Usually, the bundled CPAN is not up to date. So, let’s install it first:

# perl -MCPAN -e shell
cpan[1]> install Bundle::CPAN
. . .
cpan[2]> quit

To install (or upgrade) a module run the following:

# perl -MCPAN -e shell
cpan[1]> install JSON::XS

The only exception is Encode/Detect/Detector.pm or Encode::Detect::Detector. It’s has not being touched by the developer for many years and is not recommended for use. The module can be compiled with c++ or g++ (instead of used by default cc or gcc), but with a lot of pain and manual intervention. The easiest way is to get rid of it completely:

  • Remove Encode::Detect::Detector from modules.conf (in the root directory of SqueezeCenter)
  • Remove or comment the following line in Slim/Utils/Unicode.pm:
    use Encode::Detect::Detector;

wine-0.9.59, OpenSolaris and Picasa

New release, new features, new bug fixes and new bugs.
Let’s start with compiling.

Compiling

  • You do not need to use –without-ldap anymore
    I used just two options: –disable-win16 and –without-capi (does anybody use ISDN?).
  • Do not forget the tricks from Part I and Part II
  • New error I haven’t seen before:
    ../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include   -DBUILD_SHA1=\"$(GIT_DIR=../../.git git rev-parse HEAD 2>/dev/null)\" -fowinetest.res winetest.rc
    /bin/sh: syntax error at line 1: `(' unexpected
    gmake: *** [winetest.res] Error 2

    Not sure if and why git is needed here, but I simply removed (commented) the following line from programs/winetest/Makefile:

    EXTRARCFLAGS = -DBUILD_SHA1=\"$$(GIT_DIR=$(TOPSRCDIR)/.git git rev-parse HEAD 2>/dev/null)\"

Applications
According to the Announcement, the following bugs (among others) were fixed in 0.9.59:

  • 2866 Support for X11 multi head configurations (Xinerama)
    I use Xinerama, but I haven’t noticed anything wrong about it, it was always working
  • 4528 Firefox vertical size wrong, doesn’t take gnome system menu or task
    bars into account
    Yes, it works correctly now. But Firefox 3 beta 5 crashes every 3 seconds 😉
  • 11574 Picasa cannot upload to web albums
    Still does not work for me. But instead it eats all possible and impossible CPU and memory resources:

    #top
    PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
    3731 alekz      9  28    4   26M   12M sleep    2:37   102% wine
    3710 alekz     11  38    4  134M  100M sleep    1:26 99.62% wine
    3713 alekz      1  28    4  109M  106M run     20:32 96.60% wineserver
    . . .

    And this is after I killed Picasa:

    PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
    3731 alekz     10   0    4   26M   12M cpu      8:06   102% wine
    3713 alekz      1   0    4  406M  404M cpu     26:46 99.85% wineserver

    I stopped Picasa, one process is gone, but what wine is doing now??! Also look at the consumed memory, it’s constantly increasing.

OpenSolaris Forum

There is a possibility that a Wine Community will be created for OpenSolaris. (aka Nevada, aka Solaris 11). BTW, you can try to use the wine configuring script (see further in the thread), but it does not solve the above mentioned problems, so do not waste your time.