Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Illegal instruction at gawk. After emerge world. [SOLVED]

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
beba
n00b
n00b
Posts: 19
Joined: Wed Jul 23, 2008 3:43 pm
Location: Belarus

Illegal instruction at gawk. After emerge world. [SOLVED]

  • Quote

Post by beba » Wed Oct 10, 2012 7:52 am

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: Select all

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: Select all

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: Select all

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.
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Wed Oct 10, 2012 12:54 pm

It sounds like gawk needs to be rebuilt. Post your make.conf, though as you might have some dodgy flags.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Wed Oct 10, 2012 1:31 pm

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
Top
beba
n00b
n00b
Posts: 19
Joined: Wed Jul 23, 2008 3:43 pm
Location: Belarus

  • Quote

Post by beba » Thu Oct 11, 2012 6:55 am

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: Select all

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 ~ #
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Thu Oct 11, 2012 7:42 am

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
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Thu Oct 11, 2012 8:48 am

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.
Top
beba
n00b
n00b
Posts: 19
Joined: Wed Jul 23, 2008 3:43 pm
Location: Belarus

  • Quote

Post by beba » Thu Oct 11, 2012 9:21 am

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?
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Thu Oct 11, 2012 3:12 pm

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 ... /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: Select all

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: Select all

mkdir -p  /var/pkg/sys-apps
Once you've downloaded the file there, run:

Code: Select all

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 :-)
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Thu Oct 11, 2012 5:42 pm

Ah, got the new url for bonsaikitten's site:
http://packages.gentooexperimental.org/packages/

You can get gawk-4.0.1 (2012-Sep-11 for amd64) there.

I took this stuff from my use a binhost post. (That thread has some other tips you might find useful.)

HTH,
SteveL.
Top
beba
n00b
n00b
Posts: 19
Joined: Wed Jul 23, 2008 3:43 pm
Location: Belarus

  • Quote

Post by beba » Fri Oct 12, 2012 8:23 am

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 :(
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Fri Oct 12, 2012 9:59 am

beba wrote:All works, topic closed. SOLVED.
Excellent, glad to be of help. :)
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™ ;)
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy