LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-02-2007, 03:47 AM   #1
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
"Illegal Instruction" on AMD Barton processor - why?


I'm having immense problems getting Samba and PHP to work on a new AMD system I've got at work.

At home I have successfully compiled and installed PHP and Apache and Samba on my Intel based system under FC6 with the 2.6.18.1 kernel.

At work I have exactly the same kernel on an AMD processor (Barton). However, Samba and PHP simply will not work after compiling on this system. All Samba applications abort with "Illegal Instruction". PHP cannot eveb be installed fully, the part that says "Installing PEAR..." also just prints out "Illegal Instruction" and then drops back to the shell prompt after doing make install.

If I start up Apache with PHP, no PHP page renders at all - in the Apache log I have

[Mon Jul 02 09:07:05 2007] [notice] Apache/2.2.3 (Unix) PHP/5.1.6 configured -- resuming normal operations
[Mon Jul 02 09:07:28 2007] [notice] SIGHUP received. Attempting to restart
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Mon Jul 02 09:07:28 2007] [notice] Apache/2.2.3 (Unix) PHP/5.1.6 configured -- resuming normal operations
[Mon Jul 02 09:09:52 2007] [notice] SIGHUP received. Attempting to restart
[Mon Jul 02 09:09:52 2007] [notice] Apache/2.2.3 (Unix) PHP/5.1.6 configured -- resuming normal operations
[Mon Jul 02 09:10:32 2007] [notice] SIGHUP received. Attempting to restart
[Mon Jul 02 09:10:32 2007] [notice] Apache/2.2.3 (Unix) PHP/5.1.6 configured -- resuming normal operations
[Mon Jul 02 09:12:00 2007] [notice] child pid 21575 exit signal Illegal instruction (4)
[Mon Jul 02 09:12:07 2007] [notice] child pid 21578 exit signal Illegal instruction (4)
[Mon Jul 02 09:12:31 2007] [error] [client 127.0.0.1] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jul 02 09:12:38 2007] [notice] child pid 21576 exit signal Illegal instruction (4)
[Mon Jul 02 09:13:01 2007] [notice] child pid 24202 exit signal Illegal instruction (4)
[Mon Jul 02 09:13:18 2007] [notice] child pid 24204 exit signal Illegal instruction (4)
[Mon Jul 02 09:13:18 2007] [error] [client 10.0.0.8] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jul 02 09:13:51 2007] [notice] child pid 24205 exit signal Illegal instruction (4)
[Mon Jul 02 09:17:00 2007] [notice] child pid 24203 exit signal Illegal instruction (4)
[Mon Jul 02 09:17:08 2007] [notice] child pid 21577 exit signal Illegal instruction (4)
[Mon Jul 02 09:17:12 2007] [notice] child pid 24238 exit signal Illegal instruction (4)
[Mon Jul 02 09:27:17 2007] [error] [client 10.0.0.7] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jul 02 09:27:18 2007] [notice] child pid 24285 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:05 2007] [error] [client 10.0.0.8] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jul 02 10:17:05 2007] [error] [client 10.0.0.8] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jul 02 10:17:05 2007] [notice] child pid 24286 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:05 2007] [notice] child pid 24287 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:11 2007] [notice] child pid 24213 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:11 2007] [notice] child pid 24330 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:12 2007] [notice] child pid 24236 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:12 2007] [notice] child pid 24858 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:12 2007] [notice] child pid 24859 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:12 2007] [notice] child pid 24860 exit signal Illegal instruction (4)
[Mon Jul 02 10:17:24 2007] [notice] child pid 21579 exit signal Illegal instruction (4)
[Mon Jul 02 10:18:04 2007] [notice] child pid 24862 exit signal Illegal instruction (4)
[Mon Jul 02 10:18:04 2007] [notice] child pid 24863 exit signal Illegal instruction (4)

What the heck is going on? I've already tried dropping back to gcc34 (since FC6 has gcc4, I thought this might be compiling corrupt executables). I've already tried different arches for GCC:

CFLAGS='-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt -falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=i686 -mmmx -msse2

and

CFLAGS='-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt -falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=athlon -mmmx -msse2

with both having the "illegal instruction" result in all Samba apps and PHP as well...

The only thing different between my two Linux systems is that one has an Intel CPU and this machine has an AMD CPU - and the AMD compiled binaries keep aborting with "Illegal instruction".

Any ideas? Any help appreciated!

Thanks...
 
Old 07-02-2007, 04:30 AM   #2
mallux
Member
 
Registered: Jun 2007
Location: London, UK
Distribution: Ubuntu, RHEL, Fedora
Posts: 46
Blog Entries: 1

Rep: Reputation: 16
Quote:
... -march=athlon -mmmx -msse2
Does Barton support SSE2? The comparison on Wikipedia seems to suggest not.
 
Old 07-03-2007, 11:27 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Original Poster
Rep: Reputation: 103Reputation: 103
Solved

I was really stupid regarding this the solution was to change the compiler options from

-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt -falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=i686 -mmmx -msse2

to

-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt -falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=amd -mmmx -m3dnow

so that binaries will run correctly on an AMD processor.

As I said, stupid me...
 
  


Reply



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
Any Samba program reports "illegal instruction" rylan76 Linux - Software 2 07-03-2007 11:27 AM
"Illegal instruction" error indienick Linux - Software 7 08-15-2006 11:03 AM
jpeg2yuv "Illegal instruction" natewlew Linux - Software 1 05-17-2006 02:41 AM
Which linux instruction is equivalent to windows' instruction "tracert"? backpacker Linux - Software 1 04-04-2006 10:55 PM
What do you recommend ""I want to built my Pc using AMD 64 bit."" nuketemala Linux - Hardware 1 05-01-2004 01:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration