GNUMP3d problem: “uninitialized value in concatenation” fixed
If you’ve attempted to install GNUMP3d on a Windows XP machine, there’s a good chance you’ve made it to step 4 and received the following error message when running C:\gnump3d2\gnump3d-index.bat:
Use of uninitialized value in concatenation (.) or string at c:\gnump3d2\lib/gnump3d/config.pm line 140.
Use of uninitialized value in concatenation (.) or string at c:\gnump3d2\lib/gnump3d/config.pm line 140.
Can’t read configuration in : No such file or directory
If you were brave enough to move on to the second step 4, you’d find there’s not actually a file even located at C:\gnump3d2\bin\run.bat. Turns out, you can still run the program by running C:\gnump3d2\bin\gnump3d.bat but many of the statistics don’t work and will kick out the same error message above.
I was unable to find any fixes on teh intarweb, so I set about creating my own. I’m no professional programmer, but here’s what I did (and it worked):
- banged head on wall while attempting to use SysInternal’s FileMon to see exactly what was going on…
- …and failed
Finally I relaxed a little and used Perl’s debug and trace features to see what was happening. Because the steps posted at http://www.gnu.org/software/gnump3d/README.Windows are so erroneous, I’ve posted the new steps below (steps 1-3 were taken verbatim from the GNUMP3d website, with the exception of my note in #3). Remember, this information is accurate as of 03-05-2007 and only pertains to version 2.9.9.1 (and possibly earlier versions as well, but I don’t want to check the changelog or test this fix on previous versions).
- Download and install a recent version of Perl from ActiveState.
- Unzip the gnump3d-2.x.zip file; and move the extracted directory to C:\gnump3d2 - preserving any existing configuration file you might have.
- Make any changes to c:\gnump3d2\etc\gnump3d.conf.win (make sure to change "root" if your music is not located at C:\mp3).
- In C:\gnump3d2\bin\gnump3d-index, put this at line 162 after the end of the first IF statement
- In \gnump3d2\lib\gnump3d\filetypes.pm, change line 72 from
- Create a folder to hold the logs at c:\gnump3d2\logs\ (normally this is created by gnump3d-index.bat in the next step, but for some reason the Win XP version doesn’t)
- Run C:\gnump3d2\gnump3d-index.bat one time
- Edit C:\gnump3d2\gnump3d.bat to reflect your music’s root location (the default is C:\mp3). This value should match the value used in Step 3.
- Run C:\gnump3d2\gnump3d.bat to start the program
- Enjoy your tunes from anywhere
else
{
$CONFIG{’file’} = "C:/gnump3d2/etc/gnump3d.conf.win";
}
if ( -e "C:/gnump3d2/file.types" );
to
if ( -e "C:/gnump3d2/etc/file.types" );