Slimserver

Ubuntu 8.04 / Squeezecenter 7.0.1

Looks like I'm missing the "apparmor" module, whatever that is.

wget http://www.slimdevices.com/downloads/SqueezeCenter_v7.0.1/squeezecenter_7.0.1_all.deb
dpkg -i squeezecenter_7.0.1_all.deb
apt-get install mysql-server mysql-client flac sox
apt-get -f install
...
Setting up squeezecenter (7.0.1) ...
Adding system user `squeezecenter' (UID 116) ...
Adding new user `squeezecenter' (UID 116) with group `nogroup' ...
Not creating home directory `/usr/share/squeezecenter'.
ls: cannot access /sys/module/apparmor: No such file or directory
ls: cannot access /sys/module/apparmor: No such file or directory
ls: cannot access /sys/module/apparmor: No such file or directory
Loading AppArmor module: Failed.
dpkg: error processing squeezecenter (--configure):
 subprocess post-installation script returned error exit status 1
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 squeezecenter
E: Sub-process /usr/bin/dpkg returned an error code (1)

More about this problem in this thread:
Slimcenter 7.0 on Ubuntu 8.04 - apparmor issues

Ubuntu 8.04 / Slimserver 6.5.2

After struggling with 7.0.2 for a while I decided to go back to 6.5.2. I had the usual trouble with perl packages, but the only other problem was creating the database and mysql user.

apt-get install mysql-server mysql-client
mysql --user=root --password=xxxxxx
use mysql;
create user 'slimserver'@'localhost';
create database slimserver;
grant all on slimserver.* to 'slimserver'@'localhost';
slimserver.pref: dbusername, dbsource
[I tried setting a password on the database user but couldn't get it to work]
./slimserver.pl --d_mysql --prefsfile /u/rees/slimp3/slimserver.pref --playeraddr 10.0.1.155 --noupnp

OpenBSD 4.3 / Squeezecenter 7.0.1

Slimserver has been renamed Squeezecenter. It now depends on libgd. There is no package for this on OpenBSD. It won't build from source because the libgd configure assumes the wrong location for png.h.

Bin/build-perl-modules.pl
Perl-Modules
(fails)
Bin/build-perl-modules.pl JSON::XS YAML::Syck
perl -MCPAN -e shell
install GD
(fails; depends on libgd; why didn't build-perl-modules.pl tell me that?)

Fetch libgd source and fix it:

configure
ed Makefile
/libpng.libpng/s'/usr/local/include/libpng/libpng'/usr/local/include/libpng'p
gmake install

Try GD again:

Bin/build-perl-modules.pl GD
(thinks it worked, but it's wrong; try CPAN again)
perl -MCPAN -e shell
install GD

At this point perl is completely confused and I'm thinking about selling my Slimp3 and just using Apple products instead. Check out this cute error message:

./slimserver.pl --d_mysql --prefsfile /u/rees/slimp3/slimserver.pref --playeraddr 10.0.1.1 --noupnp
The following CPAN modules were found but cannot work with SqueezeCenter:
  XML::Parser (loaded 2.34, need 2.34)

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.

Slimserver 6.5.2

You can bypass the annoying click-through license by going directly to the downloads directory.

OpenBSD 4.1 / Slimserver 6.5.1

I tried to just use packages this time. This turned out to be a mistake. Apparently with perl you just can't mix packages and non-package modules. The OpenBSD package system is too inflexible to use for installing perl modules. See below.

pkg_add mysql-client* mysql-server*
ln -s mysqld_safe /usr/local/bin/mysqld
/usr/local/bin/mysql_install_db
edit Bin/build-perl-modules.pl (see below)
Bin/build-perl-modules.pl
/usr/local/bin/mysqld --defaults-file=/u/rees/slimp3/my.cnf
./slimserver.pl --d_mysql --prefsfile /u/rees/slimp3/slimserver.pref --playeraddr 10.0.1.2 --noupnp

Another possible fix for the missing mysqld (from Urs Breinlinger):

--- server/Slim/Utils/Misc.pm.orig	2007-03-04 23:54:17.000000000 +0100
+++ server/Slim/Utils/Misc.pm	2007-03-04 23:54:44.000000000 +0100
@@ -110,7 +110,7 @@
 
 	if (Slim::Utils::OSDetect::OS() ne "win") {
 
-		push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /usr/libexec /sw/bin /usr/sbin));
+		push @paths, (split(/:/, $ENV{'PATH'}), qw(/usr/bin /usr/local/bin /usr/libexec /sw/bin /usr/sbin /usr/local/libexec));

Got stuck here:

% ./slimserver.pl --prefsfile /u/rees/slimp3/slimserver.pref --playeraddr 10.0.1.1 --noupnp
Can't locate auto/Compress/Zlib/autosplit.ix in @INC...
Starting mysqld daemon with databases from /u/rees/slimp3/MySQL
STOPPING server from pid file /u/rees/slimp3/slimserver-mysql.pid
070515 16:54:39  mysqld ended

2007-05-15 16:55:08.8332 ERROR: DBI Connection failed: DBI connect...

At this point I tried installing some p5 packages, and pkg_add had the audacity to tell me it couldn't install some files because they were already installed and had the correct md5, and that's a fatal error! So I gave up on packages and did this instead:

perl -MCPAN -e shell
/u/root/cpan
PREFIX=/usr/local EXPATLIBPATH=/usr/local/lib EXPATINCPATH=/usr/local/include
UNINST=1
ftp://ftp.wayne.edu/cpan/
ftp://cpan.cse.msu.edu/
ftp://cpan.uchicago.edu/pub/CPAN/
install Flickr::Upload

Still can't get mysqld to not die. Turned out slim had some wrong config files:

% ./slimserver.pl --d_mysql --d_sql --prefsfile /u/rees/slimp3/slimserver.pref --playeraddr 10.0.1.1 --noupnp
2007-05-16 14:10:58.5837 MySQLHelper: createConfig() Creating config from file: [/u/rees/SlimServer_v6.5.1/MySQL/my.tt] -> [/u/rees/slimp3/my.cnf].
2007-05-16 14:10:58.8231 MySQLHelper: startServer() About to start MySQL with command: [/usr/local/bin/mysqld --defaults-file=/u/rees/slimp3/my.cnf]
Starting mysqld daemon with databases from /u/rees/slimp3/MySQL
STOPPING server from pid file /u/rees/slimp3/slimserver-mysql.pid
070516 14:10:58  mysqld ended
% grep error /u/rees/slimp3/my.cnf
log-error             = /u/rees/slimp3/mysql-error-log.txt
% cat  /u/rees/slimp3/mysql-error-log.txt
070515 16:34:51  mysqld started
070515 16:34:52 [ERROR] Error message file '/u/rees/SlimServer_v6.5.1/MySQL/errmsg.sys' had only 463 error messages,
but it should contain at least 472 error messages.
Check that the above file is the right version for this program!
070515 16:34:52 [ERROR] Aborting

Aha!

rm -f MySQL/errmsg.sys; cp /usr/local/share/mysql/english/errmsg.sys MySQL

Now perl will often dump core for no reason but with some persistence it can be made to start. I start it in a "screen" window and leave it running.

OpenBSD 3.9 / Slimserver 6.5.0

This was a bit of a struggle. I started by installing the pre-requisites from packages. I got stuck on mysqld. There were conflicts due to some perl modules I had installed. At this point I would have been happy with a forced install that would either blow away the conflicting files or simply install mysqld without resolving the pre-requisites. But the pkg_add man page doesn't describe what the various -F options do, so I tried them all, and -i. Nothing worked. As far as I can tell, none of the options or environment variables listed on the man page do anything. So I just used tar to extract the files from the package. This mostly worked.

Now I needed to install the perl modules needed by slimserver. Again pkg_add failed me. I tried just fetching from cpan but quickly descended into dependency hell. So next I tried slimserver's build-perl-modules.pl. It failed with the useless message "There was a problem creating Makefile - exiting!" The Slim wiki provided the answer, some code to make the XML module look in /usr/local for the expat libs and includes.

slim.diff

Next problem:

Illegal hexadecimal digit 'h' ignored at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 57...
2006-10-20 07:10:30.2501 ERROR: Slim::Formats::readTags: While trying to ->getTag(/u/mp3/Compilations/Two Zombies Later _ Strange and Unusual Music from the Exotica Mailing List/Fuad Motel.mp3) : panic: frexp at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 59.

This turned out to be a bad tag added by iTunes. Removing the tag fixed the problem.

Finally, I had trouble with many tunes showing up twice. This turned out to be iTunes again, this time putting the wrong path in some playlist files. I removed the offending playlists and everything was fine.

% ./slimserver.pl
Starting mysqld daemon with databases from /u/rees/slimp3/MySQL
2006-10-20 06:59:22.1271 UPnP: Error adding multicast membership, UPnP may not work properly: Protocol not available
2006-10-20 06:59:22.1289 UPnP: Error setting multicast TTL: Protocol not available
2006-10-20 07:01:28.6101 About to look for files in /u/mp3
2006-10-20 07:01:28.6148 For files with extensions in: [(?i-xsm:\.(?:ape|wma|shn|wav|wave|mp3|mp2|flc|flac|m4a|mov|m4b|mp4|mp+|mpc|ogg|aif|aiff|cue)$)]
2006-10-20 07:01:43.7236 Found 8063 files in /u/mp3
Illegal hexadecimal digit 'h' ignored at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 57.
Use of uninitialized value in subroutine entry at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 83.
Use of uninitialized value in subroutine entry at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 84.
Use of uninitialized value in subroutine entry at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 84.
Use of uninitialized value in division (/) at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 77.
Use of uninitialized value in subroutine entry at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 89.
2006-10-20 07:10:30.2501 ERROR: Slim::Formats::readTags: While trying to ->getTag(/u/mp3/Compilations/Two Zombies Later _ Strange and Unusual Music from the Exotica Mailing List/Fuad Motel.mp3) : panic: frexp at /u/rees/SlimServer_v6.5.0/Slim/Utils/SoundCheck.pm line 59.

2006-10-20 07:10:30.2511 Backtrace:

   frame 0: Slim::Formats::readTags (/u/rees/SlimServer_v6.5.0/Slim/Schema.pm line 750)
   frame 1: Slim::Schema::newTrack (/u/rees/SlimServer_v6.5.0/Slim/Utils/Scanner.pm line 322)
   frame 2: Slim::Utils::Scanner::scanDirectory (/u/rees/SlimServer_v6.5.0/Slim/Music/MusicFolderScan.pm line 72)
   frame 3: Slim::Music::MusicFolderScan::startScan (/u/rees/SlimServer_v6.5.0/Slim/Music/Import.pm line 393)
   frame 4: Slim::Music::Import::runImporter (/u/rees/SlimServer_v6.5.0/Slim/Music/Import.pm line 236)
   frame 5: Slim::Music::Import::runScan (/u/rees/SlimServer_v6.5.0/scanner.pl line 179)
   frame 6: (eval) (/u/rees/SlimServer_v6.5.0/scanner.pl line 173)
   frame 7: main::main (/u/rees/SlimServer_v6.5.0/scanner.pl line 330)

Size mismatch on COMM
 at /u/rees/SlimServer_v6.5.0/Slim/Formats/MP3.pm line 129
2006-10-20 07:26:28.7150 About to look for files in /u/mp3/AAA
2006-10-20 07:26:28.7203 For files with extensions in: [(?i-xsm:\.(?:asf|wax|asx|lnk|wpl|m3u|pls|xspf|cue)$)]
2006-10-20 07:26:28.9154 Found 15 files in /u/mp3/AAA
2006-10-20 07:26:31.4182 Slim::Formats::Playlists::M3U::read:

Can't remove directory /u/rees/slimp3/templates/u/rees/SlimServer_v6.5.0/HTML/EN: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
Can't remove directory /u/rees/slimp3/templates/u/rees/SlimServer_v6.5.0/HTML: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
Can't remove directory /u/rees/slimp3/templates/u/rees/SlimServer_v6.5.0: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
Can't remove directory /u/rees/slimp3/templates/u/rees: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
Can't remove directory /u/rees/slimp3/templates/u: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
Can't remove directory /u/rees/slimp3/templates: Directory not empty at /u/rees/SlimServer_v6.5.0/scanner.pl line 210
2006-10-20 08:06:12.8406 Bogus streamstate for unpause  
2006-10-20 08:06:12.8419 Backtrace:

   frame 0: Slim::Networking::SliMP3::Stream::unpause (/u/rees/SlimServer_v6.5.0/Slim/Player/SLIMP3.pm line 144)
   frame 1: Slim::Player::SLIMP3::resume (/u/rees/SlimServer_v6.5.0/Slim/Player/Source.pm line 448)
   frame 2: Slim::Player::Source::playmode (/u/rees/SlimServer_v6.5.0/Slim/Player/Playlist.pm line 613)
   frame 3: Slim::Player::Playlist::reshuffle (/u/rees/SlimServer_v6.5.0/Slim/Control/Commands.pm line 1077)
   frame 4: Slim::Control::Commands::playlistXtracksCommand (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 1485)
   frame 5: (eval) (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 1485)
   frame 6: Slim::Control::Request::execute (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 774)
   frame 7: Slim::Control::Request::executeRequest (/u/rees/SlimServer_v6.5.0/Slim/Player/Client.pm line 462)
   frame 8: Slim::Player::Client::execute (/u/rees/SlimServer_v6.5.0/Slim/Buttons/BrowseDB.pm line 226)
   frame 9: Slim::Buttons::BrowseDB::__ANON__ (/u/rees/SlimServer_v6.5.0/Slim/Hardware/IR.pm line 830)
   frame 10: Slim::Hardware::IR::executeButton (/u/rees/SlimServer_v6.5.0/Slim/Buttons/Input/List.pm line 141)
   frame 11: Slim::Buttons::Input::List::__ANON__ (/u/rees/SlimServer_v6.5.0/Slim/Hardware/IR.pm line 830)
   frame 12: Slim::Hardware::IR::executeButton (/u/rees/SlimServer_v6.5.0/Slim/Control/Commands.pm line 148)
   frame 13: Slim::Control::Commands::buttonCommand (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 1485)
   frame 14: (eval) (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 1485)
   frame 15: Slim::Control::Request::execute (/u/rees/SlimServer_v6.5.0/Slim/Control/Request.pm line 774)
   frame 16: Slim::Control::Request::executeRequest (/u/rees/SlimServer_v6.5.0/Slim/Player/Client.pm line 462)
   frame 17: Slim::Player::Client::execute (/u/rees/SlimServer_v6.5.0/Slim/Hardware/IR.pm line 844)
   frame 18: Slim::Hardware::IR::processCode (/u/rees/SlimServer_v6.5.0/Slim/Hardware/IR.pm line 700)
   frame 19: Slim::Hardware::IR::releaseCode (/u/rees/SlimServer_v6.5.0/Slim/Hardware/IR.pm line 517)
   frame 20: Slim::Hardware::IR::checkRelease (/u/rees/SlimServer_v6.5.0/Slim/Utils/Timers.pm line 181)
   frame 21: Slim::Utils::Timers::checkTimers (./slimserver.pl line 490)
   frame 22: main::idle (./slimserver.pl line 440)
   frame 23: main::main (./slimserver.pl line 1039)

Back to OpenBSD Hacks

Jim Rees