install module with CPAN - how to change default compiler flags?

A

Alex Hunsley

Pretty simple stuff... trying to install Text::CSV_XS module via cpano
on a redhat 8 system.
So I run the command and get the output:

[root@jura ~]# perl -MCPAN -e 'install "Text::CSV_XS"'

CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Wed, 06 Apr 2005 00:54:44 GMT
Running install for module Text::CSV_XS
Running make for J/JW/JWIED/Text-CSV_XS-0.23.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for
/root/.cpan/sources/authors/id/J/JW/JWIED/Text-CSV_XS-0.23.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Text-CSV_XS-0.23/
Text-CSV_XS-0.23/ChangeLog
Text-CSV_XS-0.23/CSV_XS.pm
Text-CSV_XS-0.23/CSV_XS.xs
Text-CSV_XS-0.23/Makefile.PL
Text-CSV_XS-0.23/MANIFEST
Text-CSV_XS-0.23/ppport.h
Text-CSV_XS-0.23/README
Text-CSV_XS-0.23/t/
Text-CSV_XS-0.23/t/base.t
Text-CSV_XS-0.23/t/file.t
Text-CSV_XS-0.23/t/misc.t
Text-CSV_XS-0.23/t/samples.t
Text-CSV_XS-0.23/t/types.t
Text-CSV_XS-0.23/test.pl
Removing previously used /root/.cpan/build/Text-CSV_XS-0.23

CPAN.pm: Going to build J/JW/JWIED/Text-CSV_XS-0.23.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.5/ExtUtils/typemap CSV_XS.xs > CSV_XS.xsc && mv
CSV_XS.xsc CSV_XS.c
gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386
-mtune=pentium4 -DVERSION=\"0.23\" -DXS_VERSION=\"0.23\" -fPIC
"-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" CSV_XS.c
cc1: invalid option `tune=pentium4'
make: *** [CSV_XS.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible


..... So it appears I need to get rid of the tune=pentium4 option being
passed to gcc, but I can't find out where to make this change, can
anyone help?
thanks
alex
 
A

Alex Hunsley

Alex said:
Pretty simple stuff... trying to install Text::CSV_XS module via cpano
on a redhat 8 system.
So I run the command and get the output:
[snip]
cc1: invalid option `tune=pentium4'
make: *** [CSV_XS.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible


.... So it appears I need to get rid of the tune=pentium4 option being
passed to gcc, but I can't find out where to make this change, can
anyone help?
thanks
alex

Following up to myself...
still got the problem, but the obvious workaround was to then go to the
package installation directory in /root/.cpan/build/[packageName], edit
Makefile to remove the offending option, then do

make
make test
make install


alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top