Hello,
It seems I'm not the only one who has had trouble with squeezeboxserver not starting recently, due to Perl having trouble loading bundled CPAN modules. I got things running with locally built CPAN modules, by reading this forum.
However I prefer to have my software packages fully handled by a package manager, so I have spent a little while putting together a way to build a Debian package with locally built CPAN modules. I figured others might be interested in such a package, so here's a small guide. It's currently .deb specific, but making it work for rpms shouldn't be too hard.
Installing needed software
Various software is needed to build the software, but I found it the easiest to install a bundle, rather than figuring out exactly what was or wasn't needed:
Code:$ sudo aptitude install debhelper fakeroot build_essential subversion nasm
Get and patch a copy of the source tree
In a new folder, run:
Save the attached patch to your build folder, and apply it:Code:$ svn co http://svn.slimdevices.com/repos/slim/7.6/trunk
The patch is needed for the build scripts to build CPAN modules for the package, and to find Perl 5.12.4, which is the current Perl in Debian testing.Code:$ cd trunk $ patch -p0 < ../buildCPAN.patch
Build the package
Depending on your system, you may need a different set of modules built. If you don't know which modules are failing on your machine, run /usr/sbin/squeezeboxserver, it tell you in the output. With the patched build script, you can give a comma separated list of modules to rebuild. Note that if "XML::Parser::Expat" is failing, you have to put just the name "XML::Parser" in the list.
I used this command to build my current package:
If all goes well, your package will be ready for you one folder out, install:Code:./buildme.pl --build debian --buildDir ../build/ --sourceDir . --destDir ../ --releaseType nightly --fakeroot --buildCPAN EV,XML::Parser,HTML::Parser,JSON::XS,Digest::SHA1,YAML::Syck,Sub::Name,Image::Scale
You may find that your first list of failing modules wasn't complete so the software still wont start. In that case, figure out which modules are failing now, and build again, adding to the list of modules to build. For me, this just added Image::Scale.Code:$ sudo dpkg -i ../squeezeboxserver_<some version number>
Enjoy!
Results 1 to 10 of 16
-
2011-07-17, 08:27 #1Junior Member
- Join Date
- Jul 2011
- Posts
- 6
Building your own installer package (Debian/Ubuntu)
Last edited by dnj; 2011-07-17 at 08:31.
-
2011-07-17, 23:53 #2Junior Member
- Join Date
- Jul 2011
- Posts
- 9
hey. thanks for helping out with this. i got someplace but still dont have a working install.
After many unsuccessful builds, i got as far as this
The server seems to start and isnt dying but .. i see this in my logsCode:./buildme.pl --build debian --buildDir ../build/ --sourceDir . --destDir ../ --releaseType nightly --fakeroot --buildCPAN EV,XML::Parser,HTML::Parser,JSON::XS,Digest::SHA1,YAML::Syck,Sub::Name,Image::Scale,DBI,Audio::Scan,Class::XSAccessor,DBD::SQLite,Template::Stash::XS
Notice, I added the that in the include but it didnt seem to do anything. The server does not respond to requests and I cant access anything on port 9000 using the browser. any suggestions?Code:2011-07-17 23:26:03 squeezeboxserver_safe started. [11-07-17 23:26:03.9361] main::init (349) Starting Squeezebox Server (v7.6.0, r32728, Sun Jul 17 23:11:00 PDT 2011) perl 5.012004 [11-07-17 23:26:04.0900] Slim::bootstrap::tryModuleLoad (289) Warning: Module [Template::Stash::XS] failed to load: Couldn't load Template::Stash::XS 2.21: Can't load '/usr/share/squeezeboxserver/CPAN/arch/5.12/x86_64-linux-thread-multi/auto/Template/Stash/XS/XS.so' for module Template::Stash::XS: libssp.so.0: cannot open shared object file: No such file or directory at /usr/lib/perl/5.12/DynaLoader.pm line 192. at /usr/lib/perl5/Template/Stash/XS.pm line 31 BEGIN failed--compilation aborted at /usr/lib/perl5/Template/Stash/XS.pm line 31. Compilation failed in require at (eval 720) line 2. BEGIN failed--compilation aborted at (eval 720) line 2.
-
2011-07-18, 00:49 #3Junior Member
- Join Date
- Jul 2011
- Posts
- 6
Try replacing "Template::Stash::XS" by just "Template":
If you open trunk/vendor/CPAN/buildme.sh there's a list of strings that work in the function "build_all".Code:./buildme.pl --build debian --buildDir ../build/ --sourceDir . --destDir ../ --releaseType nightly --fakeroot --buildCPAN EV,XML::Parser,HTML::Parser,JSON::XS,Digest::SHA1,YAML::Syck,Sub::Name,Image::Scale,DBI,Audio::Scan,Class::XSAccessor,DBD::SQLite,Template
-
2011-07-18, 09:09 #4Junior Member
- Join Date
- Jul 2011
- Posts
- 9
perfect thanks. works finally!
-
2011-07-18, 09:21 #5Junior Member
- Join Date
- Jul 2011
- Posts
- 6
That's great.
I have build tested the instructions with 7.5, which appeared to work too. Simply replace "7.6" with "7.5" when checking out the source tree.
-
2011-07-19, 08:08 #6Junior Member
- Join Date
- Jul 2011
- Posts
- 5
Hello,
I don't know why, but the deb file is not created for the 7.5 trunk and the 7.6 trunk.
Code:dh_installdirs: Compatibility levels before 5 are deprecated. cp: impossible d'évaluer «*/home/squeeze_7.5/build/platforms/../server/revision.txt*»: Aucun fichier ou dossier de ce type make: *** [install] Erreur 1
I'm using a debian sid with French language. Any Idea ?Code:# Copy the revision file cp /home/squeeze_7.5/build/platforms/../server/revision.txt /home/squeeze_7.5/build/platforms/debian/squeezeboxserver/usr/share/squeezeboxserver/ mv: impossible d'évaluer «*../build//*.deb*»: no file or folder of that type
thanks,
youen
-
2011-07-19, 14:25 #7Junior Member
- Join Date
- Jul 2011
- Posts
- 6
As I read the first quoted part, your machine can't find the file "build/server/revision.txt". The build script is supposed to fill that with the number following "Last Changed Rev:" in the output of "svn info".
The output of "svn info" is probably in French on your machine, so it doesn't say "Last Changed Rev:" anywhere.
You could try changing the script to look for the correct French string on your machine (it's line 316 in trunk/buildme.pl), but I don't know if the scripts depends on the machine locale in other places. Or you could try temporarily switching to an English locale while building the package.
-
2011-07-19, 15:38 #8Junior Member
- Join Date
- Jul 2011
- Posts
- 5
Thanks, That was the issue. I was looking in that kind of direction in the buildme.sh, but didn't though at the locale.
Now, I think I'm facing the last issue :
I tried with dbd::mysql instead of SQLite, but it didn't change anything.Code:The following modules failed to load: DBD::mysql GD
-
2011-07-20, 10:03 #9Junior Member
- Join Date
- Jul 2011
- Posts
- 6
If you passed DBD:mysql and GD to --buildCPAN, and those modules are still failing, I'd imagine the build of them failed.
Try going to vendor/CPAN and run ./buildme.sh DBD::mysql and ./buildme.sh GD and if those commands fail, see if you can figure out if it's due to some missing package(s).
-
2011-07-20, 12:57 #10Junior Member
- Join Date
- Jul 2011
- Posts
- 9
i got the same thing with 7.5. 7.6 compiled fine. dnj's suggestion makes sense. I'll try that and see. GD compiled fine but mysql was still failing.
why does the build script explicitly link to perl5.XX rather than just point to /usr/bin/perl? Debian links perl to perl5.XX anyway. That would just make it easier to compile and build.

Reply With Quote
