vishi has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks
I am trying to install Perl modules on my local home directory (as I do not have root/su permission on the server). I am able to generate the Makefile without any issues, but when I try to run
make install
I get the following error:
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/ +perl5/5.8.8/ExtUtils/typemap Tty.xs > Tty.xsc && mv Tty.xsc Tty.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdecla +ration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI +LE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTI +FY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 +-m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERS +ION=\"1.10\" -DXS_VERSION=\"1.10\" -fPIC "-I/usr/lib/perl5/5.8.8/i386 +-linux-thread-multi/CORE" -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTP +T -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R +-DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_SYS_STROPTS_H -DHAVE_TERMIOS_H - +DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT Tty.c cc1: error: unrecognized command line option "-fstack-protector" cc1: error: invalid parameter `ssp-buffer-size' Tty.c:1: error: bad value (generic) for -mtune= switch
Now, I have used the "search" feature on this site and I came up with this thread. I believe I have a similar issue on hand, but I'm a little confused on what compiler Perl is trying to use. When I tried a few things, here's what I found:
$ perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: ... ... ... Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasin +g -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFI +LE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions +-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=g +eneric -fasynchronous-unwind-tables', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -W +declaration-after-statement -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-48)', gcco +sandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define
So, I am guessing Perl wants to use gcc 4.1.2... Right! Now, when I try and find what gcc is set in the path, here's what I found:
$ which gcc /usr/bin/gcc $ gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- +infodir=/usr/share/info --enable-shared --enable-threads=posix --disa +ble-checking --with-system-zlib --enable-__cxa_atexit --disable-libun +wind-exceptions --enable-languages=c,c++,f77 --disable-libgcj --host= +i386-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-4)
But, when I do a "ls" in the directory /usr/lib/gcc, I find that there is a 4.1.1 also available
$ ls -ltr total 20 drwxr-xr-x 3 root root 4096 Feb 16 2010 4.1.1 lrwxrwxrwx 1 root root 5 Jul 1 16:52 4.1.2 -> 4.1.1 drwxr-xr-x 3 root root 4096 Jul 1 16:52 3.4.6
So, am I right in assuming that Perl has gotten "disconnected" from the gcc it was configured to use? How do I fix this issue? Whatever the solution is, I need a really solid justification to convince the Sys Admins & their bosses to get this fixed. Any help would be highly appreciated as am currently looking at a dead end, while the project deadlines are fast approaching!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GCC and Perl: Module installation error cc1
by shmem (Chancellor) on Aug 09, 2011 at 09:07 UTC | |
by vishi (Beadle) on Aug 09, 2011 at 11:14 UTC | |
by shmem (Chancellor) on Aug 09, 2011 at 14:49 UTC |