PDA

View Full Version : Problem building perl modules on NSLU2



gharris999
2005-07-29, 10:11
I'm trying to get slimserver up and running on my NSLU2, following the directions at http://www.nslu2-linux.org/wiki/HowTo/InstallSlimServer

I've gotten to the point where I'm executing the build-perl-modules.pl

I'm getting the following error:

gcc: No such file or directory
make: *** [Zlib.0] Error 127
Couldn't find a valid dynamic library for Compress-Zilb-1.33.tar.gz - sometthing is wrong. Exiting!

I'm a linux noob, so any help would be appreciated!

mac
2005-07-29, 21:37
I'll try to help.

What is the output for each of the following commands?


# ipkg list_installed perl
# ipkg list_installed unslung-devel
# ipkg list_installed which
# ipkg list_installed expat
# ipkg list_installed zlib
# ipkg list_installed wget
# ls -l /etc/slim-data/

gharris999
2005-07-29, 22:14
OK:

# ipkg list_installed perl
perl - 5.8.6-3 - perl language interpreter
# ipkg list_installed unslung-devel
unslung-devel - 3.18-3 - This is a meta package that bundles all the packages required for unslung development.
# ipkg list_installed which
which - 2.16-2 - which prints out the full path of the executablesthat bash(1) would execute when the passed program names would have been enter
# ipkg list_installed expat
expat - 1.95.8-3 - XML Parser library
# ipkg list_installed zlib
zlib - 1.2.2-2 - zlib is a library implementing the 'deflate' compression system.
# ipkg list_installed wget
wget - 1.9.1-r1 -
# ls -l /etc/slim-data/
#

Should I see anything /etc/slim-data since I havent yet tried to run slimserver, just the build_perl_modules.pl script?

Thanks for the help, by the way...

mac
2005-07-29, 23:06
Well, you have all the packages installed required to build Slimserver.

I'm guessing that there is a problem with your 'build-perl-modules.pl' source file. Can you try using the one that I've attached and then run it as described in the HowTo? You might also try diffing my version against yours.

Cheers, mac.

p.s. If you can't download the attached file you can get it here (http://lowfat.sytes.net/build-perl-modules.pl).

gharris999
2005-07-30, 09:55
OK, here is the diff of yours vs. mine:

# diff build-perl-modules.pl.macs build-perl-modules.pl.mine
58,64c58,63
< 'XML-Parser-2.34' => {
< 'Makefile.PL' => join(' ', qw(
< EXPATLIBPATH=/opt/lib
< EXPATINCPATH=/opt/include
< )),
< },
<
---
> 'XML-Parser-2.34' => {
> 'Makefile.PL' => join(' ', qw(
> EXPATLIBPATH=/opt/lib
> EXPATINCPATH=/opt/include
> )),
> },
66a66,67
>
>
111a113,115
> # Let the build process use modules installed already:
> $ENV{'PERL5LIB'} = "$slimServerPath/CPAN";
>
#

The first diference seems to be only white space. The second difference must be due to the fact that I was using yesterday's 6.1.x nightly.

Using your build-perl-modules.pl, I still get:

=================================================

# ./build-perl-modules.pl
Welcome to the Slim Devices perl module installer.

These packages are needed for SlimServer 6 to function.
You will need a C compiler (gcc), make, and perl installed.

*** Ignore any warnings about AppConfig. ***

Please enter a perl binary to use (defaults to /usr/bin/perl)
This must be the same perl binary that you ran this program with --> /usr/bin/perl
Please enter the path to your SlimServer directory (ex: /usr/local/slimserver) --> /usr/local/slimserver
Please enter a directory to download files to --> /usr/local
Downloads will use wget to fetch tarballs.

Downloading Compress-Zlib-1.33.tar.gz to: /usr/local
Uncompressing..
Configuring..
/usr/bin/perl Makefile.PL
Up/Downgrade complete.
Building..
gcc: No such file or directory
make: *** [Zlib.o] Error 127
Couldn't find a valid dynamic library for Compress-Zlib-1.33.tar.gz - something is wrong. Exiting!
#

================================================

Something is going wrong when build-perl-modules.pl invokes make on the Compress-Zlib-1.33 Makefile.

I think that I'll wipe my NSLU2's hard disk and start over and see if I can get past this point. Thanks.

mac
2005-07-30, 10:36
Please enter a directory to download files to --> /usr/local
I believe you should specify /etc/slim-data


$ ls -l /etc/slim-data
total 40
drwxr-xr-x 6 1000 1000 4096 Jul 5 04:56 Compress-Zlib-1.33
drwxr-xr-x 5 1000 1000 4096 Jul 5 05:09 DBD-SQLite-1.08
drwxr-xr-x 5 1000 1000 4096 Jul 5 05:00 DBI-1.46
drwxr-xr-x 7 1000 1000 4096 Jul 5 05:10 HTML-Parser-3.45
drwxr-xr-x 12 1000 1000 4096 Jul 5 05:11 Template-Toolkit-2.13
drwxr-xr-x 6 1000 1000 4096 Jul 5 05:14 Time-HiRes-1.66
drwxr-xr-x 7 1000 1000 4096 Jul 5 05:15 XML-Parser-2.34
-rw------- 1 root root 7117 Jul 29 10:53 slimserver.pref
drwx--S--- 3 root root 4096 Jul 5 05:27 usr

Dan Sully
2005-07-30, 10:50
* gharris999 shaped the electrons to say...

>gcc: No such file or directory

You don't have gcc installed on the NSLU2.

-D
--
<phone> i am a sausage fan

Dave Edwards
2005-07-30, 11:43
I am having exactly the same problem.

I have tried wiping my harddrive 3 times and tried 2 different versions of unslung and 2 different versions of SlimServer and get the same problem every time.

I have tried unslung 4.20 and SlimServer 6.0.2, which are the exact versions used in the howto.

It looks like somehow the gcc binary is getting lost / corrupted at install time for me. I'm not sure exactly which package installs gcc - I'm guessing it is one that gets installed by unslung-devel.

Is there a specific .ipk that I can force install to fix the problem?

Any help would be much appreciated.

Here is my output.....
:
:
# Bin/build-perl-modules.pl
Welcome to the Slim Devices perl module installer.

These packages are needed for SlimServer 6 to function.
You will need a C compiler (gcc), make, and perl installed.

*** Ignore any warnings about AppConfig. ***

Please enter a perl binary to use (defaults to /usr/bin/perl)
This must be the same perl binary that you ran this program with -->
Please enter a directory to download files to --> /etc/slimdata
Downloads will use wget to fetch tarballs.

Downloading Compress-Zlib-1.33.tar.gz to: /etc/slimdata
Uncompressing..
Configuring..
/usr/bin/perl Makefile.PL
Up/Downgrade complete.
Building..
gcc: No such file or directory
make: *** [Zlib.o] Error 127
Couldn't find a valid dynamic library for Compress-Zlib-1.33.tar.gz - something is wrong. Exiting!
# ls -al /opt/bin/gcc
lrwxrwxrwx 1 root root 41 Jul 30 18:18 /opt/bin/gcc -> /opt/armeb/bin/armv5b-softfloat-linux-gcc
# ls -al /opt/armeb/bin/armv5b-softfloat-linux-gcc
ls: /opt/armeb/bin/armv5b-softfloat-linux-gcc: No such file or directory

mac
2005-07-30, 12:23
My environment:

$ ls -al /opt/bin/gcc
lrwxrwxrwx 1 root root 41 Jul 5 04:34 /opt/bin/gcc -> /opt/armeb/bin/armv5b-softfloat-linux-gcc

$ ls -al /opt/armeb/bin/armv5b-softfloat-linux-gcc
lrwxrwxrwx 1 root root 41 Jul 5 04:35 /opt/armeb/bin/armv5b-softfloat-linux-gcc -> /opt/armeb/armv5b-softfloat-linux/bin/gcc

$ ipkg list_installed libgcc
libgcc - 3.4.4-r0 -

$ ipkg list | grep unslung-devel
unslung-devel - 3.18-3 - This is a meta package that bundles all the packages required for unslung development.
unslung-devel - 3.18-2 -

$ find /. | grep gcc
/./lib/libgcc_s.so.1
/./opt/bin/gcc
/./opt/armeb/armv5b-softfloat-linux/bin/gcc
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir/libgcc_s.so.1
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir/install.sh
/./opt/armeb/armv5b-softfloat-linux/lib/libgcc_s.so.1.dir/uninstall.sh
/./opt/armeb/bin/armv5b-softfloat-linux-gccbug
/./opt/armeb/bin/armv5b-softfloat-linux-gcc
/./opt/armeb/bin/armv5b-softfloat-linux-gcc-3.3.5
/./opt/armeb/lib/gcc-lib
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/float.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/iso646.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/stdarg.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/stdbool.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/stddef.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/varargs.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/unwind.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/limits.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/README
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/include/syslimits.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/cc1
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/crtbegin.o
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/crtbeginS.o
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/crtend.o
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/crtendS.o
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/specs
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/float.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/iso646.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/stdarg.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/stdbool.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/stddef.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/varargs.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/unwind.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/include/limits.h
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/mkheaders
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/install-tools/mkheaders.conf
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/collect2
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/libgcc.a
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/cc1plus
/./opt/armeb/lib/gcc-lib/armv5b-softfloat-linux/3.3.5/libgcc_eh.a
/./opt/armeb/info/gcc.info
/./opt/armeb/info/gccint.info
/./opt/armeb/man/man1/armv5b-softfloat-linux-gcc.1
/./usr/lib/ipkg/info/libgcc.postinst
/./usr/lib/ipkg/info/libgcc.list
/./usr/lib/ipkg/info/libgcc.control
/./initrd/lib/libgcc_s.so.1
/./initrd/usr/lib/ipkg/info/libgcc.postinst
/./initrd/usr/lib/ipkg/info/libgcc.list
/./initrd/usr/lib/ipkg/info/libgcc.control


Try:

$ ipkg update

$ grep unslung-devel /usr/lib/ipkg/lists/*
/usr/lib/ipkg/lists/cross:Package: unslung-devel
/usr/lib/ipkg/lists/cross:Filename: unslung-devel_3.18-3_armeb.ipk
/usr/lib/ipkg/lists/unslung-cross:Package: unslung-devel
/usr/lib/ipkg/lists/unslung-cross:Filename: unslung-devel_3.18-3_armeb.ipk

$ ipkg install unslung-devel

gharris999
2005-07-30, 14:02
I seem to have some differences in my environment:

# ipkg list | grep unslung-devel
unslung-devel - 3.18-3 - This is a meta package that bundles all the packages required for unslung development.

I don't have 3.18-2

# find /. | grep gcc
/./lib/libgcc_s.so.1
/./opt/bin/gcc
/./opt/armeb/bin/armv5b-softfloat-linux-gccbug
/./opt/armeb/bin/armv5b-softfloat-linux-gcc
/./opt/armeb/bin/armv5b-softfloat-linux-gcc-3.3.5
/./usr/lib/ipkg/info/libgcc.postinst
/./usr/lib/ipkg/info/libgcc.list
/./usr/lib/ipkg/info/libgcc.control
/./usr/lib/ipkg.old/info/libgcc.postinst
/./usr/lib/ipkg.old/info/libgcc.list
/./usr/lib/ipkg.old/info/libgcc.control
/./share/hdd/conf/lib/libgcc_s.so.1
/./share/hdd/conf/usr/lib/ipkg/info/libgcc.postinst
/./share/hdd/conf/usr/lib/ipkg/info/libgcc.list
/./share/hdd/conf/usr/lib/ipkg/info/libgcc.control
/./initrd/lib/libgcc_s.so.1
/./initrd/usr/lib/ipkg/info/libgcc.postinst
/./initrd/usr/lib/ipkg/info/libgcc.list
/./initrd/usr/lib/ipkg/info/libgcc.control

MrC
2005-07-30, 14:43
* gharris999 shaped the electrons to say...

>gcc: No such file or directory

You don't have gcc installed on the NSLU2.


I'm not sure this make sense. This output indicates that gcc is outputing the error message (note the gcc:). W/out gcc, you would get:

Skip blib/lib/Compress/Zlib.pm (unchanged)
gcc -c -I./zlib-src -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"1.33\" -DXS_VERSION=\"1.33\" -fpic "-I/usr/local/lib/perl5/5.8.7/i686-linux/CORE" Zlib.c
/bin/sh: line 1: gcc: command not found
make: *** [Zlib.o] Error 127

However, the error messages typically given by gcc would be something like:

gcc: xxx: No such file or directory.

Even if there was a null value for the filename or an argument, you would get:

gcc: : No such file or directory.

So, I'm not sure how to reproduce your error to help resolve it!

If you can create a temporary login for me (and feel comfortable doing so), I'll be happy to debug the problem.

gharris999
2005-07-31, 00:34
Well, messing around in the dark didn't do me much good. I managed to break ipkg, so now I really need to start over from scratch. Social obligations taking precedence tomorrow, it will be a day or two before I can report on any progress, or lack thereof. I do think Dan was right, though. Somehow, gcc got lost.

Dave Edwards
2005-07-31, 04:19
I finally managed to get mine working after another reinstall. It seems something went wrong somewhere in the installation of one of the unslung-devel packages.

I followed the instructions exactly as appear here and everything looks good:
http://www.nslu2-linux.org/wiki/HowTo/InstallSlimServer

I am writing a detailed description of everything I have done to install it - right through from turning on the NSLU2 for the first time, installing Unslung, to getting SlimServer running. If this would help you, then I will post a link when it is complete. Let me know if I can help in any other way in the meantime.

On a related note:
Can anyone suggest a reliable way of starting slimserver automatically on bootup of the NSLU2? I've tried the same approach as the auto telnet enabler and also putting a line in the /etc/inittab but neither work.

gharris999
2005-07-31, 09:43
Yes! Please post your description! For someone like me, who knows just enough about Linux to pose a health-hazard to myself and those in my immediate vicinity, hyper-detailed instructions make all the difference.

mac
2005-07-31, 10:56
Can anyone suggest a reliable way of starting slimserver automatically on bootup of the NSLU2?
This works well for me. Adjust the paths to suit your environment.


$ cat /unslung/rc.local
#!/bin/sh

#start the slimserver
if [ -n "`pidof slimserver.pl`" ] ;then
/bin/killall slimserver.pl 2>/dev/null
fi

/usr/local/SlimServer_v6.0.2/slimserver.pl --daemon --prefsfile /etc/slim-data/slimserver.pref --cachedir /etc/slim-data

return 1

Dave Edwards
2005-07-31, 14:11
Thank you for the information Mac - this works great!

As requested here is a very quick text file that I put together to help me install Unslung and the SlimServer software on a NSLU2. It contains various bits of info cut and paste from various sources and from my own discoveries. I have just brought it all together to make life a bit easier for myself after all the problems I've experienced! I hope there are no errors but as I only received my NSLU2 on Thursday, I have been unable to verify it all.

It is very much a work in progress and I will add further information as I work it out.

I hope someone finds it useful.

It can be found here:
http://www.geocities.com/daveyed123/nslu2-howto-2005-07-31.txt

Dave

mac
2005-10-13, 10:30
Just a follow-up for those who run into problems building slimserver on their NSLU2 down the road...

Turns out that I ran into this identical problem myself yesterday after attempting to build from the latest source. The root problem was that 'gcc' was a zero-byte executable file! Apparently, one of the packages that I installed on my NSLU2 since I first built slimserver stomped on it.

Normally, when invoking gcc you should see something like this:


[root@slug public]$ gcc
gcc: no input files
However, what it was doing was this:


[root@slug public]$ gcc
<nothing>
To resolve my problem I download the gcc cross-compiler binary from http://peter.korsgaard.com/articles/debian-nslu2.php and copied gcc from that tarball to /opt/armeb/armv5b-softfloat-linux/bin/gcc. Problem resolved.


[root@slug]$ ls -la /opt/bin/gcc
lrwxrwxrwx 1 root root 41 Jul 5 04:34 /opt/bin/gcc -> /opt/armeb/bin/armv5b-softfloat-linux-gcc
[root@slug]$ ls -la /opt/armeb/bin/armv5b-softfloat-linux-gcc
lrwxrwxrwx 1 root root 41 Jul 5 04:35 /opt/armeb/bin/armv5b-softfloat-linux-gcc -> /opt/armeb/armv5b-softfloat-linux/bin/gcc
[root@slug]$ ls -la /opt/armeb/armv5b-softfloat-linux/bin/gcc
-rwx------ 1 root root 303190 Oct 12 22:55 /opt/armeb/armv5b-softfloat-linux/bin/gcc
Note the file size of '/opt/armeb/armv5b-softfloat-linux/bin/gcc'. Prior to copying that binary the size was 0.

Cheers, mac.

VicoEsco
2006-07-21, 12:58
gcc broke somehow. I had the same problem, finally got it work by doing a ipkg install of core utils and forced a reinstall. then it worked. Problem now is that slimserver is running slow as hell. Gotta go overclock my slug now.