Pandora Compiling Perl on the Pandora


j6cubic

Member
Joined
Nov 20, 2008
Messages
203
I wasn't sure where to put this topic. I hope it belongs here.

Perhaps you know about AirTunes, Apple's proprietary sound streaming technology. Perhaps you also know that there's now a working software implementation (Shairport), which is rumored to go great with a Raspberry Pi.

I decided that I really want some of that action, just without the Raspberry Pi – I already have a neat little embedded Linux computer, after all. The only problem with my plan is that Shairport requires at least Perl 5.10. The Pandora comes with 5.8.8. And now the pain begins.

Perl requires a lengthy setup process where it asks you dozens of questions you won't know how to answer unless you are a Perl developer. After guessing my way through that I proceed to build the makefile, which goes over smoothly, and run `make test`, which fails horribly. Depending on which way I have guessed during the configuration process it can fail in a variety of ways but it usually does so while spitting out thousands of redundant error messages.

A sample output of `make test` has been attached for your perusal, as has been my most recent config.sh. Do note that this has been after a few rounds of messing with random settings in a futile attempt to appease the dark gods of Perl's build environment. Also, this was a rerun of `make test` so only the test that failed gets executed.

A few words on my build environment: It's a loop.mounted ext2 image file with plenty of space left. Despite what config.sh pretends, the prefix is actually /usr/local, which is another loop-mounted image – not that I get that far.

Now, does anyone have any idea on how to build (or procure a ready-made version of) Perl 5.10 or newer on the Pandora?

Or, barring that, is there hope for an updated userland in the near future? I don't really want to nuke one of my SD cards so that I can put a Debian on it just to run one single program.
 

Attachments

  • config.sh.txt
    32.5 KB · Views: 212
  • errors.txt
    16.6 KB · Views: 179
Last edited by a moderator:
Hmm, perl 5.14 is in the Angstrom repository. Does anyone know why the Pandora can't be updated? Does it rely on newer libraries that aren't compatible?
 
After the Code::Blocks Perl turned out to be unable to install any packages (CPAN consistently crashing the Perl runtime) I finally decided to just bite the bullet and wipe one of my SD cards to install Debian on it.

Then the SD card died. (No, this has no bearing on the other issues I had; I did all of that on the other card, which seems to work fine.) Now I'll have to wait for a new SD card to arrive before I can find out whether Perl not running on mthe Pandora is just me, Zaxxon's vintage userland or an as-yet undescribed law of nature.
 
code::blocks can install CPAN package, but probably not on Fat32 card. Put codeblocks on an ext2 partition and it will work better.
 
I tried creating an ext2 file and mouting that as Code::Blocks's appdata directory. No dice. CPAN still crashes.

Of course it would help if CPAN could generate error messages besides "Killed".
 
That's strange. I have already run CPAN installer a few times without any issue. If your PND is on Ext2 partition, there will be no write problem, Strange. You launch the codeblocks command line directly or do you mount all this manualy?

Which module do you try to install?
 
The error occurs every time I try to use CPAN to install anything. `cpan CPAN` yields the same result as `cpan HTTP::Request`. I'm running everything from the "Dev. Command Line Interface" provided by the Code::Blocks PND.

I have a working theory, though: There is some kind of dependency issue (such as a required Perl module not being installed). which causes CPAN to crash. Since the CPAN devs don't believe in useful error messages, a bailout due to, say, the YAML module not being present is indistinguishable from a bailout due to Perl segfaulting. This would also explain why CPAN kept crashing in my Debian installation (the SD card arrived today) until I used apt-get to install things like libyaml-perl (aka Perl's YAML module) and a few other things CPAN's initial setup script mentions.

In fact, I would have a running system right now if not for another hitch: The ready-made Debian (version 1.0.5) uses what appears to be a mix of Emdebian and regular Debian. Unfortunately this means that the package tree is broken and I can't get apt to install the gcc, g++ or libgomp1 packages, no matter if I use the Debian or the Emdebian repository.

I think that if I identify all dependencies CPAN has and compile them manually I might be able to get CPAN working. Then again I could just compile all of Shairport's required Perl modules by hand, which might be easier than getting that bizzarre package manager to work.

My next attempts, in order:

1. Make a /pandora/menu directory on the Debian SD card, put the Code::Blocks PND there and see if that makes CPAN work.

2. Compile and install all required Perl modules by hand and try to make it run that way.

3. Wipe the Debian SD card and run through the manual assembly instructions in the "Debian on SD" wiki page until I've got a working chroot. Then attempt to do everything in the chroot without ever booting into it. (The idea is that this will save me the work of having to set up a bootable system. With a few symlinks I might be able to talk to ALSA etc. from within the chroot.)

4. Dump a generic BeagleBoard Linux onto the SD card and hope I can make that work. Nubs, a touchscreen and a keyboard are considered dispensable at this point at this point as long as I can ssh in somehow.

5. Give up and buy a Raspberry Pi.

Edit:

I tried putting the PND on the Debian card but despite the entire card being world-readable and world-writable, every attempt by CPAN to untar the downloaded modules ends with tar saying "Cannot allocate memory". I can untar them just fine, however CPAN insists on untarring them itself, causing the build to fail. Any suggestions?
 
Last edited by a moderator:
Okay, I solved the problem... by installing Slackware. Turns out that SL4P's CPAN doesn't despise me. I now have beautiful, semi-reliable sound coming over the network.

(For those interested in replicating it: The instructions boil down to "install SL4P, install Shairport, run Shairport".)
 
Back
Top