"cc1: error: invalid option 'tune=i686'" while installing Perl modules via CPAN
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"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.
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).
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):
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...
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:
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?
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)...
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.