View previous topic :: View next topic |
Author |
Message |
beba n00b
Joined: 23 Jul 2008 Posts: 19 Location: Belarus
|
Posted: Wed Oct 10, 2012 7:52 am Post subject: Illegal instruction at gawk. After emerge world. [SOLVED] |
|
|
Hi,
I have a some problem.
Make emerge world. After installing package gawk-4.0.1 from list, I have a error 'Illegal instruction' at another packages.
Code: | config.status: creating Makefile
./config.status: line 2389: 24536 Done(141) eval sed \"\$ac_sed_extra\" "$ac_file_inputs"
24537 Illegal instruction | $AWK -f "$ac_tmp/subs.awk" > $ac_tmp/out
config.status: error: could not create Makefile |
And this error (or like this) exist at almost everyone emerge
I was installed eselect-awk package.
Do command:
Code: | linux # eselect awk list
Available awk implementations:
[1] gawk *
[2] busybox
eselect awk set 2
eselect awk list
Available awk implementations:
[1] gawk
[2] busybox *
|
After that, some package was installed, but less 20 package have a like error. After install gawk with "busybox awk" i have a message with Example awk scripts. Make this and have:
Code: | linux # awk -F: '{ print $1 }' /etc/passwd
Illegal instruction |
But if I change awk use busybox i don't have error.
Maybe have any ideas to solved my problem? Thanks.
P.s. Sorry for my English
Last edited by beba on Fri Oct 12, 2012 8:23 am; edited 1 time in total |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Oct 10, 2012 12:54 pm Post subject: |
|
|
It sounds like gawk needs to be rebuilt. Post your make.conf, though as you might have some dodgy flags. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Oct 10, 2012 1:31 pm Post subject: |
|
|
beba ...
I'm not sure how you ended up with eselect-awk as its currently ~arch, and gawk-4.0.1 doesn't have it as a dependency. Did the issue occur prior to using eselect-awk?
Also, what version of sys-libs/readline and sys-devel/gettext is installed, and what useflags are currently set for these packages?
best ... khay |
|
Back to top |
|
|
beba n00b
Joined: 23 Jul 2008 Posts: 19 Location: Belarus
|
Posted: Thu Oct 11, 2012 6:55 am Post subject: |
|
|
Hi all..
Thanks for answer.
My make.conf - http://pastebin.com/i13eK6PJ.
Versions of some packages and his flags:
sys-libs/readline-6.2_p1
sys-devel/gettext-0.18.1.1-r3 USE="acl cxx git nls openmp -cvs -doc -emacs -java -static-libs"
About eselect-awk package.
Insert into the file /etc/portage/package.accept_keywords this rows:
#required by app-admin/eselect-awk (argument)
=app-admin/eselect-awk-0.2 ~amd64
After that, emerge eselect-awk..
And i think, that eselect awk it works. See what I do:
Code: | mybox ~ # eselect awk list
Available awk implementations:
[1] gawk
[2] busybox *
mybox ~ # awk -F: '{ print $1 }' /etc/passwd
RESULT WITH USERS STRINGS
mybox ~ # eselect awk set 1
Couldn't find a man page for gawk; skipping.
mybox ~ # eselect awk list
Available awk implementations:
[1] gawk *
[2] busybox
mybox ~ # awk -F: '{ print $1 }' /etc/passwd
Illegal instruction
mybox ~ #
|
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Oct 11, 2012 7:42 am Post subject: |
|
|
beba wrote: | Insert into the file /etc/portage/package.accept_keywords this rows:
#required by app-admin/eselect-awk (argument)
=app-admin/eselect-awk-0.2 ~amd64 |
beba ... yes, I know that it was keyworded, but your assumption is that it will work with the current stable awk. If that was the case eselect-awk would have been set as a dependency. Its probably keyworded ~arch for a reason. This seems like the most obvious explanation for the issue.
best ... khay |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Oct 11, 2012 8:48 am Post subject: |
|
|
You have: "-march=core2 -msse4" in CFLAGS and "mmx sse sse2 sse3 sse4" in USE.
On the core2 arch, sse4 is not available. I'd imagine "-march=core2 -msse4" is the cause of the problem. The error you're getting is EILSEQ (Illegal Instruction Sequence), which means the executable code is not suitable for the CPU, and causes the kernel to send SIGILL that kills your process.
Also, setting "-march=core2 -mtune=generic" is contradictory. -march tells it to consider those instructions available, as the base pool, and -mtune=generic then says optimise for the generic case. The best flags are just: "-O2 -pipe -march=native" ime. Some people like to add "-mtune=native" too. With just the first, I get flags that specify the cache sizes on my machine. (See cach0rr0's post a few down from the first link.)
If you want to make it "generic core2" rather than "tuned to my machine", use "-march=core2 -mtune=core2" if you must, or just get rid of -mtune.
edit:
As noted in cach0rr0's post you can use: gcc -Q --help=target and add whichever flags you like to see the differences.
Wow, I don't have any of -msse etc enabled testing that with -march=native here(!). I'm sure there is another command you can run, but that worries me.
Last edited by steveL on Fri Oct 12, 2012 10:00 am; edited 1 time in total |
|
Back to top |
|
|
beba n00b
Joined: 23 Jul 2008 Posts: 19 Location: Belarus
|
Posted: Thu Oct 11, 2012 9:21 am Post subject: |
|
|
Thanks..
(((
I try to solve my problem. Change value CFLAGS from "-march=core2 -mtune=generic -msse4 -O2 -pipe" to "-march=core2 -O2 -pipe" and change USE in make.conf ("-sse4 ssse3").
After that I need reinstall gawk?.. I try reinstall @sytem, but error error must exists
Maybe any ideas? |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Oct 11, 2012 3:12 pm Post subject: |
|
|
beba wrote: | After that I need reinstall gawk?.. I try reinstall @sytem, but error error must exists :( |
Easiest option is to download a binpkg from http://tinderbox.dev.gentoo.org/default-linux/
eg: http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-apps/
It's a bit out of date (currently I see: gawk-3.1.8.tbz2 2011-Oct-23) but it should be enough to get you running again.
You put that in portage package directory, PKGDIR (see man make.conf), which defaults to /usr/portage/packages, so here do:
Code: | mkdir -p /usr/portage/packages/sys-apps |
..and copy the file there. I use: PKGDIR="/var/pkg" in /etc/portage/make.conf since /var is the namespace for this sort of thing (the directory is root:root, not portage here, as I don't want users to be able to write to it.) If you want to do that, obviously change to:
Code: | mkdir -p /var/pkg/sys-apps |
Once you've downloaded the file there, run:
Code: | emerge -K =sys-apps/gawk-3.1.8 |
See man emerge for --usepkgonly option.
The reason you set up a PKGDIR, is so that you can set FEATURES="buildpkg" in make.conf. Portage will then build a binpkg every time it compiles a package, so you can roll-back to any version of anything ever installed on your system (til you eclean the binpkg, or otherwise delete it.) If you do that, you'll never again have a problem like this you can't recover from using what you've already built.
Note you might need other packages, depending on how long you've had that setting. Good luck :-) |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
|
Back to top |
|
|
beba n00b
Joined: 23 Jul 2008 Posts: 19 Location: Belarus
|
Posted: Fri Oct 12, 2012 8:23 am Post subject: |
|
|
Oh, yes... !!!!!
Very big thanks steveL!
Works with Gentoo yet 4-5 years, but about packages from PKGDIR not known ((
I am very ashamed
I looked link from last post to You tips and I will be read posts, because it contain very helpful information.!!!
Once again, THANKS!
All works, topic closed. SOLVED.
P.s. Sorry for My English |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Fri Oct 12, 2012 9:59 am Post subject: |
|
|
beba wrote: | All works, topic closed. SOLVED. |
Excellent, glad to be of help. :)
Quote: | P.s. Sorry for My English :( |
No worries: I can understand you well enough, and it helps that you're doing your own thinking ;)
Regards,
steveL. _________________
creaker wrote: | systemd. It is a really ass pain |
update - "a most excellent portage wrapper"
#friendly-coders -- We're still here for you™ ;) |
|
Back to top |
|
|
|