LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-20-2006, 12:14 AM   #1
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
"cc1: error: invalid option 'tune=i686'" while installing Perl modules via CPAN


For some reason I am no longer able to install Perl modules via CPAN. I'm getting a consistent error message everytime I try to install something, regardless of what it is (which leads me to think it's a library issue), and Google turns up absolutely nothing useful that I've found. For instance, I'm trying to install the Gtk module to build a front-end for a program I'm working on. This is what takes place:
Code:
/usr/X11R6/include  -I./Gtk -I./build -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i486 -mtune=i686   -DVERSION=\"0.7000\" -DXS_VERSION=\"0.7000\" -fPIC "-I/usr/lib/perl5/5.8.8/i486-linux/CORE"  -DPERL_POLLUTE -DGTK_HVER=0x01020a build/GtkDefs.c
cc1: error: invalid option `tune=i686'
cc1: error: unrecognized option `-Wdeclaration-after-statement'
make: *** [build/GtkDefs.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

cpan>
I'm then returned to a cpan> prompt (like above) and that's that. I tried using cpanp which I've read works a little better, but it gets to "Installing Gtk..." and freezes. Any help with this is greatly appreciated.
 
Old 02-20-2006, 06:19 PM   #2
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
have you tried -
1) checking / rebuilding your config file OR
2) installing module (which is failing as above ) by hand?

On 1) : for CPAN , locate MyConfig.pm
in my setup its at $HOME/.cpan/CPAN
is there a value for the hash key 'make_arg' ? (just a guess)

however I'm confused about a few things: you also tried cpanp (front end to CPANPLUS)? Did you install that
successfully via CPAN? (And i assume CPANPLUS would have also been installed). And, if CPANPLUS was installed
, could you have made the same error in the config setup (maybe my hunch above is totally off)?

Regarding 2)
How about simply downloading a module, say IO::Prompt, and then going to the build directory and installing
by hand. Usually it's perl Makefile.PL; make ; su -c 'make install' but follow the directions per the README.
(there's also the newer build method).
 
Old 02-21-2006, 08:51 AM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Original Poster
Rep: Reputation: 47
I've rebuilt the config file from within cpan, and I've checked it for 'tune', it's not present. Just in case though, here is my Config.pm:
Code:
[scuzzy@slackdell /usr/lib/perl5/5.8.8/CPAN]$ ls -l Config.pm
-rw-rw-r--  1 root cpan 1602 2006-02-18 20:08 Config.pm
[scuzzy@slackdell /usr/lib/perl5/5.8.8/CPAN]$ cat Config.pm

# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
# ~/.cpan/CPAN/MyConfig.pm.

$CPAN::Config = {
  'build_cache' => q[1024],
  'build_dir' => q[/usr/cpan/build],
  'cache_metadata' => q[1],
  'cpan_home' => q[/usr/cpan],
  'dontload_hash' => {  },
  'ftp' => q[/bin/ftp],
  'ftp_proxy' => q[],
  'getcwd' => q[cwd],
  'gpg' => q[/usr/bin/gpg],
  'gzip' => q[/usr/bin/gzip],
  'histfile' => q[/usr/cpan/histfile],
  'histsize' => q[100],
  'http_proxy' => q[],
  'inactivity_timeout' => q[0],
  'index_expire' => q[1],
  'inhibit_startup_message' => q[0],
  'keep_source_where' => q[/usr/cpan/sources],
  'lynx' => q[/usr/bin/lynx],
  'make' => q[/usr/bin/make],
  'make_arg' => q[],
  'make_install_arg' => q[],
  'makepl_arg' => q[],
  'ncftpget' => q[/usr/bin/ncftpget],
  'no_proxy' => q[],
  'pager' => q[/usr/bin/less],
  'prerequisites_policy' => q[follow],
  'scan_cache' => q[atstart],
  'shell' => q[/usr/bin/bash],
  'tar' => q[/usr/bin/tar],
  'term_is_latin' => q[1],
  'unzip' => q[/usr/bin/unzip],
  'urllist' => [q[ftp://cpan.cse.msu.edu/], q[ftp://cpan.erlbaum.net/CPAN/], q[ftp://cpan.hostrack.net/pub/CPAN], q[ftp://cpan.llarian.net/pub/CPAN/], q[ftp://cpan.mirrors.redwire.net/pub/CPAN/], q[ftp://cpan.mirrors.tds.net/pub/CPAN], q[ftp://cpan.netnitco.net/pub/mirrors/CPAN/], q[ftp://cpan.pair.com/pub/CPAN/], q[ftp://cpan.teleglobe.net/pub/CPAN], q[ftp://cpan.uchicago.edu/pub/CPAN/]],
  'wget' => q[/usr/bin/wget],
};
1;
__END__
[scuzzy@slackdell /usr/lib/perl5/5.8.8/CPAN]$
As you've probably guessed, I have scuzzy as a member of the cpan group
It is quite curious, now that you mention it, that I was able to build cpanp. I've just tried building the Term::ReadKey module (a dependency of IO::Prompt), and it failed with this (the same errors as with CPAN):
Code:
[scuzzy@slackdell /home/scuzzy/tarball/TermReadKey-2.30]$ make test
cp ReadKey.pm blib/lib/Term/ReadKey.pm
AutoSplitting blib/lib/Term/ReadKey.pm (blib/lib/auto/Term/ReadKey)
/usr/bin/perl5.8.8 -I/usr/lib/perl5/5.8.8 genchars.pl

Writing termio/termios section of cchars.h... Done.
Checking for sgtty...
        Sgtty NOT found.
Writing sgtty section of cchars.h... Done.
/usr/bin/perl5.8.8 /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -noprototypes -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap  ReadKey.xs > ReadKey.xsc && mv ReadKey.xsc ReadKey.c
cc -c  -I/usr/include/bsd -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i486 -mtune=i686   -DVERSION=\"2.30\" -DXS_VERSION=\"2.30\" -fPIC "-I/usr/lib/perl5/5.8.8/i486-linux/CORE"   ReadKey.c
cc1: error: invalid option `tune=i686'
cc1: error: unrecognized option `-Wdeclaration-after-statement'
make: *** [ReadKey.o] Error 1
[scuzzy@slackdell /home/scuzzy/tarball/TermReadKey-2.30]$
I just remembered that I upgraded gcc a couple of weeks ago (had to because I upgraded KDE) and haven't tried to install a Perl module since. Perhaps this is what's causing it - a problem with gcc? If it helps any: gcc is working fine - I can still compile C applications. I've done a few searches though, and can't find anything related...

Last edited by scuzzman; 02-21-2006 at 08:53 AM.
 
Old 02-21-2006, 03:03 PM   #4
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
a few more things to try -

which make does perl use (should be same as in Config above!):
perl -V:make

run this perl script:

Code:
#!/usr/bin/perl -w 
@keys   = keys %ENV;
@values = values %ENV;
while (@keys) {
    print pop(@keys), '=', pop(@values), "\n";
}
pipe it into more, less or redirect to a file. Check the environmental settings.

as for a problem with gcc, it don't think gcc gets involved in the make step when the makefile was generated by perl, e.g.,

perl Makefile.PL #builds a makefile for the perl interpreter.#
make

#make by itself is compiler/interpreter independent#
...

instead of using the make, try with Module::Build from cpan.
http://search.cpan.org/~kwilliams/Mo...odule/Build.pm

(sorry i can;t remember if it needs `make` to be installed itself)

HTH
 
Old 02-21-2006, 03:59 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,988
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Did you play around with .bashrc and have set some stuff
in CFLAGS that the compiler doesn't like?


Cheers,
Tink
 
Old 02-22-2006, 08:17 AM   #6
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Original Poster
Rep: Reputation: 47
It doesn't appear I have that, Tink... The only line in my ~/.bashrc is my "export PS1=..." line... TBH, I don't know what this file is for... or any of the bash* files in my ~.
As for CFLAGS, there is no definition for that, and I don't know where I would find one (didn't adjust it - I'm sure of that).

As for the above Perl script and command, here are the results:
Code:
[scuzzy@slackdell /home/scuzzy/devel/perl]$ ./env.pl
KDE_MULTIHEAD=false
PS2=>
SESSION_MANAGER=local/slackdell:/tmp/.ICE-unix/3875
HUSHLOGIN=FALSE
KDEDIR=/opt/kde
HZ=100
KDE_FULL_SESSION=true
SHELL=/bin/bash
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.bat=01;32:*.BAT=01;32:*.btm=01;32:*.BTM=01;32:*.cmd=01;32:*.CMD=01;32:*.com=01;32:*.COM=01;32:*.dll=01;32:*.DLL=01;32:*.exe=01;32:*.EXE=01;32:*.arj=01;31:*.bz2=01;31:*.deb=01;31:*.gz=01;31:*.lzh=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tb2=01;31:*.tbz2=01;31:*.tbz=01;31:*.tgz=01;31:*.tz2=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.ZIP=01;31:*.zoo=01;31:*.asf=01;35:*.ASF=01;35:*.avi=01;35:*.AVI=01;35:*.bmp=01;35:*.BMP=01;35:*.flac=01;35:*.FLAC=01;35:*.gif=01;35:*.GIF=01;35:*.jpg=01;35:*.JPG=01;35:*.jpeg=01;35:*.JPEG=01;35:*.m2a=01;35:*.M2a=01;35:*.m2v=01;35:*.M2V=01;35:*.mov=01;35:*.MOV=01;35:*.mp3=01;35:*.MP3=01;35:*.mpeg=01;35:*.MPEG=01;35:*.mpg=01;35:*.MPG=01;35:*.ogg=01;35:*.OGG=01;35:*.ppm=01;35:*.rm=01;35:*.RM=01;35:*.tga=01;35:*.TGA=01;35:*.tif=01;35:*.TIF=01;35:*.wav=01;35:*.WAV=01;35:*.wmv=01;35:*.WMV=01;35:*.xbm=01;35:*.xpm=01;35:
MINICOM=-c on
_=./env.pl
OLDPWD=/home/scuzzy
HOSTNAME=slackdell.adelphia.net
GS_LIB=/home/scuzzy/.fonts
XCURSOR_THEME=neutral
QTDIR=/usr/lib/qt
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/scuzzy/.gtkrc-2.0:/home/scuzzy/.kde/share/config/gtkrc-2.0
MAIL=/var/spool/mail/scuzzy
GTK_RC_FILES=/etc/gtk/gtkrc:/home/scuzzy/.gtkrc:/home/scuzzy/.kde/share/config/gtkrc
DISPLAY=:0.0
MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/opt/kde/man:/usr/lib/qt/doc/man:/usr/share/texmf/man
JAVA_HOME=/usr/lib/java
HOME=/home/scuzzy
TERM=xterm
T1LIB_CONFIG=/usr/share/t1lib/t1lib.config
COLORTERM=
WINDOWID=39845895
KONSOLE_DCOP=DCOPRef(konsole-4853,konsole)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/share/kde/bin:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
CPLUS_INCLUDE_PATH=/usr/lib/qt/include:/usr/lib/qt/include
INPUTRC=/etc/inputrc
SHLVL=5
LS_OPTIONS= --color=auto -F -b -T 0
LOGNAME=scuzzy
XDG_CONFIG_DIRS=/opt/kde/etc/xdg
USER=scuzzy
LANG=en_US
PWD=/home/scuzzy/devel/perl
LESSOPEN=|lesspipe.sh %s
WINDOW_MANAGER=metacity
GDK_USE_XFT=1
LC_COLLATE=C
LESS=-M
PS1=[\u@\h $PWD]$
XAUTHORITY=/home/scuzzy/.Xauthority
KONSOLE_DCOP_SESSION=DCOPRef(konsole-4853,session-1)
[scuzzy@slackdell /home/scuzzy/devel/perl]$ perl -V:make
make='make';
[scuzzy@slackdell /home/scuzzy/devel/perl]$
It doesn't have a CFLAGS defined, nor is there anything in there about make...

Edit: just installed Module::Build with a typical "perl Makefile.PL && make && sudo make install"

Last edited by scuzzman; 02-22-2006 at 08:20 AM.
 
Old 02-22-2006, 08:29 AM   #7
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
Quote:
just installed Module::Build with a typical "perl Makefile.PL && make && sudo make install"
Excellent! Now, in a downloaded package's folder, you can use:
perl Build.PL
./Build
./Build test
./Build install

(perhaps you've already tried it!)
 
Old 02-23-2006, 11:26 AM   #8
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Original Poster
Rep: Reputation: 47
Sorry for the delay, had a few things happening... This is what takes place though:
When I cd to a package I've downloaded and type 'perl Build.PL' this happens:
Code:
[scuzzy@slackdell /home/scuzzy/tarball/TermReadKey-2.30]$ perl Build.PL
Can't open perl script "Build.PL": No such file or directory
So, I thought I had to specify the Build.PL in the directory of the Module-Build, so I did this:
Code:
[scuzzy@slackdell /home/scuzzy/tarball/TermReadKey-2.30]$ perl ../Module-Build-0.2611/Build.PL 
Checking whether your kit is complete...
Looks good
 * Optional prerequisite Module::Signature isn't installed
 * Optional prerequisite ExtUtils::ParseXS isn't installed
 * Optional prerequisite ExtUtils::CBuilder isn't installed
ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
 of the modules indicated above before proceeding with this installation.

Feature 'YAML_support' disabled because of the following prerequisite failures:
 * Prerequisite YAML isn't installed

Can't open 'lib/Module/Build.pm' for version: No such file or directory at /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm line 623.
[scuzzy@slackdell /home/scuzzy/tarball/TermReadKey-2.30]$
There is no Build.PL in the TermKey directory... What am I missing?
 
Old 02-23-2006, 08:05 PM   #9
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
My omission, sorry Module::Build is relatively new and not all packages can take advantage of it. IO::Prompt is an example of one with it: what I wanted is just that you can prove that it's possible to install perl modules on your system, then try to work back and find the reason for that tune=i686 error (if it's still a problem)...

Sounds like
HTH John
 
Old 02-24-2006, 05:10 AM   #10
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Original Poster
Rep: Reputation: 47
What's with the "cc1" in the error message on the make? Does that mean it's using gcc or cc (which would make sense if the modules are written in C and not Perl - especially in the case of Gtk or Gnome modules)? If so, it could be a CFLAGS error as Tink pointed out before, but I can't, for the life of me, figure out where this is set. Where would that "tune=i686" come from, and is it possible to just take it out? Also, the more I look, I'm seeing -mtune=i686 used, not -tune...

Last edited by scuzzman; 02-24-2006 at 05:21 AM.
 
Old 02-26-2006, 11:20 AM   #11
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Original Poster
Rep: Reputation: 47
Got the problem fixed. Downgraded from Perl v5.8.8 to Perl v5.8.7 and it fixed it strangely enough. Thanks for both your help though.
 
Old 02-26-2006, 03:29 PM   #12
jxi
Member
 
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
glad to hear it. I didn'nt have much more to offer.
But I just noticed (checking my Perl version, which is 5.8.7)
typing
perl -V

under Compiler: there's settings like
cc='cc', ccflags =' ...

and so on. Maybe those were misconfigured previously.
 
Old 08-21-2006, 09:30 PM   #13
hydroxyblue
LQ Newbie
 
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
I found I got the same error "tune=686" for perl 5.8.8 (slackware 10.0 with various 10.0 CD installed packages)

This was on a new install of 10.0 last night on a vmware partition.

I 'removepkg perl' to remove bundled version.

I downloaded latest perl from slackware/pb (5.8.8) and:
installpkg perl*
perl -MCPAN -e shell
> install Bundle::CPAN

I got the error during numerous cc1's throughout the session, and it ultimately failed.

I'd forgotten to install the /l packages, once I did that, the error disappeared.

So the issue might just be a missing library package. I'll see if I can find the offending one, but since I 'installpkg /l/*.tgz' I'm not sure which one it is, and it may be difficult to find.

I suppose we could check the perl 5.8.8 prerequisite libraries...

Last edited by hydroxyblue; 08-21-2006 at 09:35 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 6 03-21-2013 10:35 AM
"Invalid File Handle" error on Fat32 Samba deiphage Linux - Networking 1 02-05-2006 01:15 PM
Partition problem windows not booting "Invalid disk error" julian_s Linux - Newbie 1 04-02-2004 09:26 PM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 03:31 PM
LinNeighborhood --"nmblookup: invalid option -- o" wlfdgcrkz Linux - Software 0 04-27-2003 01:35 PM


All times are GMT -5. The time now is 02:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration