On 28/10/2012 13:47, Steve Haun wrote:
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
     osname=linux, osvers=3.2.0-2-mx5, 
archname=arm-linux-gnueabihf-thread-multi-64int
     uname='linux build04.raspbian.lan 3.2.0-2-mx5 #1 sun apr 15 19:59:08 utc 
2012 armv7l gnulinux '
     config_args='-Dusethreads -Duselargefiles -Dcc=gcc-4.7 -Dccflags=-DDEBIAN 
-D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -Dldflags= -Wl,-z,relro -Dlddlflags=-shared 
-Wl,-z,relro -Dcccdlflags=-fPIC -Darchname=arm-linux-gnueabihf -Dprefix=/usr 
-Dprivlib=/usr/share/perl/5.14 -Darchlib=/usr/lib/perl/5.14 -Dvendorprefix=/usr 
-Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.14.2 
-Dsitearch=/usr/local/lib/perl/5.14.2 -Dman1dir=/usr/share/man/man1 
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 
-Dsiteman3dir=/usr/local/man/man3 -Duse64bitint -Dman1ext=1 -Dman3ext=3perl 
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm 
-Ui_libutil -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib 
-Dlibperl=libperl.so.5.14.2 -des'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=define, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='gcc-4.7', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN 
-fstack-protector
Your perl was compiled with gcc-4.7 and so that is what gets used when you build a module with C code. My raspberry pi is at work right now so I cannot check but basically the build is attempting to run gcc-4.7 and it either does not exist or is not on your path.

What do you get when you type the following at the command line:

$ which gcc
$ gcc
$ gcc --version
$ gcc-4.7

If gcc --version reports 4.7 then you can probably get away with adding a symbolic link in whatever dir gcc is found (see which gcc above) from gcc-4.7 to gcc. Something like:

cd /usr/bin
ln -s /usr/bin/gcc gcc-4.7

but that depends on what which gcc and gcc --version says.

BTW, I'm on irc.perl.org in the #dbi channel (as mje) if you want a chat.

Martin

<snipped more -V output>

 On Oct 28, 2012, at 8:42 AM, Martin J. Evans wrote:
On 28/10/2012 13:40, Steven Haun wrote:
It appears to be installed:

root@raspberrypi:/home/pi# sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@raspberrypi:/home/pi
What does perl -V output?

Martin
On Oct 28, 2012, at 8:36 AM, "Martin J. Evans" <martin.ev...@easysoft.com> 
wrote:

On 28/10/2012 13:34, Steven Haun wrote:
I am using 'sudo cpanm -i DBI' .  I found the details in the log (forgot to 
open it as sudo, so it looked blank). After the cp commands I found this (but 
don't know what 'gcc-4.7' is):

/usr/bin/perl -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp  -typemap 
/usr/share/perl/5.14/ExtUtils/typemap -typemap typemap  Perl.xs > Perl.xsc && 
mv Perl.xsc Per$
gcc-4.7 -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS$
/bin/sh: 1: gcc-4.7: not found
make: *** [Perl.o] Error 127
-> FAIL Installing DBI failed. See /root/.cpanm/build.log for details.
gcc is a C compiler - you need it to compile the C code in DBI.

You need to install the gcc package. As your using debian it is probably 
something like

sudo apt-get install gcc

Martin

On Oct 28, 2012, at 8:27 AM, "Martin J. Evans" <martin.ev...@easysoft.com> 
wrote:

On 28/10/2012 13:18, Steven Haun wrote:
I have tried cpan and cpanm installs and get very non description errors (other 
than failed).  Any help would be appreciated.  Thanks.
I installed DBI on a raspberry Pi ages ago. See bottom of 
http://www.martin-evans.me.uk/node/142 and 
http://www.martin-evans.me.uk/node/144

I had some problems running out of memory  (from the above post):

BTW, I tried to install Perl DBI (which does not have many dependencies) with 
cpanp and after 13 minutes it died with the signal 'Killed' - hmm. I've not 
investigated further yet - but I had plenty of disk space left on a 4gb card.
*UPDATE:* It appears I had some problems with my sd card - switched to another 
one and the machine seems faster but cpanp still bombs out as before - trying 
cpanminus.
*UPDATE2:* ilmari suggested cpanp might be a big memory user so I installed 
cpanm and managed to install DBI - although the test suite took over 60 minutes 
to run.

Doesn't cpanm have a verbose mode.

Martin

Reply via email to