LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-11-2012, 03:23 PM   #1
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Rep: Reputation: 0
linux 64bit - cannot execute binary???


Hi

Have been trying to get some 64bit binaries to work on my machine; but seem to be having some issues when it comes to running them.

The box is running slackware 13 with kernel 2.6.37, I've since re-compiled the kernel and enabled the following in addition to the smp kernels default configuration, as I have not been able to execute the 64 bit file.

Processor Types and Features
-> Processor family - selected "Core 2/newer Xeon" - was previously Pentium-4 / older Xeon
-> High Memory Support -
> changed from 4 gb to 64 gb (system has 8 gb of ram)


Even after re-compiling, I still have not had any luck... Any ideas?



processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
stepping : 6
cpu MHz : 2992.252
cache size : 4096 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dts tpr_shadow
bogomips : 5984.50
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:


# uname -a
Linux dell1950 2.6.37.6-smp #4 SMP Wed Apr 11 00:02:22 EDT 2012 i686 Intel(R) Xeon(R) CPU 5160 @ 3.00GHz GenuineIntel GNU/Linux

# file unrar
unrar: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped

#./unrar
-bash: ./unrar: cannot execute binary file

# ls -al unrar
-rwxr-xr-x 1 1000 1000 221192 Feb 17 10:05 unrar*


thanks very much

Jonathan
 
Old 04-11-2012, 03:49 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by jc179 View Post
# uname -a
Linux dell1950 2.6.37.6-smp #4 SMP Wed Apr 11 00:02:22 EDT 2012 i686 Intel(R) Xeon(R) CPU 5160 @ 3.00GHz GenuineIntel GNU/Linux
That is a 32-bit kernel, so I would not expect to be able to run a 64-bit binary.

(I do not use Slackware, so if for some reason you're expecting that to work, do tell us why)
 
Old 04-11-2012, 03:53 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by jc179 View Post
The box is running slackware 13 with kernel 2.6.37, I've since re-compiled the kernel
I don't know what architecture kernel you had before recompiling, but after recompiling you have a 32 bit kernel. You confirmed that fact at least two ways in your post:
Quote:
-> High Memory Support -
> changed from 4 gb to 64 gb (system has 8 gb of ram)
Those choices only apply to 32 bit kernels.

Quote:
# uname -a
Linux dell1950 2.6.37.6-smp #4 SMP Wed Apr 11 00:02:22 EDT 2012 i686 Intel(R) Xeon(R) CPU 5160 @ 3.00GHz GenuineIntel GNU/Linux
The i686 in there indicates a 32 bit kernel.

You can't run any 64 bit programs under a 32 bit kernel even though you have a 64 bit CPU.
Quote:
Even after re-compiling, I still have not had any luck... Any ideas?
I can't quite tell what you are reporting: You never could run 64 bit programs but somehow thought recompiling your 32 bit kernel would fix that? Or you were able to run 64 bit programs and then (for whatever reason) recompiled the kernel and that caused 64 bit programs to stop working?

My best guess is that the "linux 64bit" in your thread title is an error. You have an ordinary 32 bit Linux on a 64 bit CPU. To run 64 bit programs, you should reinstall Linux using a 64 bit Linux.

Last edited by johnsfine; 04-11-2012 at 03:59 PM.
 
1 members found this post helpful.
Old 04-11-2012, 07:49 PM   #4
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hey

All I can say is AH Crap! Your right and thanks for the responses, I honestly didn't know there was a "64 bit kernel", I had just gone to kernel.org and pulled down the latest 2.6.37 kernel, and thought that was all that was required. Once running the 64 bit kernel, and 64 bit modules, the 32 bit binaries should still run.


Not looking to get flammed, but rather as a learning experience:

So going forward, where would I find a 64 bit kernel; On http://www.kernel.org/pub/linux/kernel/v2.6/, I just see the regular kernels available. Based on that I assume the 64 bit compiler use different flags that compile into a 64 bit kernel?

thanks

Jonathan

Quote:
Originally Posted by johnsfine View Post
I don't know what architecture kernel you had before recompiling, but after recompiling you have a 32 bit kernel. You confirmed that fact at least two ways in your post:

Those choices only apply to 32 bit kernels.



The i686 in there indicates a 32 bit kernel.

You can't run any 64 bit programs under a 32 bit kernel even though you have a 64 bit CPU.


I can't quite tell what you are reporting: You never could run 64 bit programs but somehow thought recompiling your 32 bit kernel would fix that? Or you were able to run 64 bit programs and then (for whatever reason) recompiled the kernel and that caused 64 bit programs to stop working?

My best guess is that the "linux 64bit" in your thread title is an error. You have an ordinary 32 bit Linux on a 64 bit CPU. To run 64 bit programs, you should reinstall Linux using a 64 bit Linux.
 
Old 04-11-2012, 07:57 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by jc179 View Post
So going forward, where would I find a 64 bit kernel;
The usual answer is completely reinstall Linux using a 64 bit build of the distribution. But I don't know enough about Slackware to give a Slackware specific answer

I have read one thread in which someone installed a 64 bit Kernel in a 32 bit Linux and got 64 bit programs to work, but it isn't supposed to be that simple. Inserting a 64 bit kernel into a 32 bit install of Linux is not supposed to be enough to get 64 bit programs working.

Quote:
Originally Posted by jc179 View Post
On http://www.kernel.org/pub/linux/kernel/v2.6/, I just see the regular kernels available.
IIUC, that location has kernel source code not binaries. Only the binaries are 32 bit or 64 bit. The source code is for all architectures.

A 32 bit Linux could have gcc configured to build your choice of 32 bit or 64 bit, but typically gcc in 32 bit Linux is set up to build 32 bit only. If gcc can build 64 bit, then I'm sure an expert in building Linux kernels could compile a 64 bit kernel while running on a 32 bit Linux. But I don't come close to knowing how.

Last edited by johnsfine; 04-11-2012 at 08:03 PM.
 
Old 04-11-2012, 10:11 PM   #6
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hey

Thanks, really appreciate the help! I think what I wanted to do with the source I downloaded was make ARCH=x86_64, or make ARCH=ia64 ... instead of just doing make =.=.

At least you've got me pointed in the right direction! I think in the end your most likely right; reinstalling the OS is the most straight forward.

Jonathan

Quote:
Originally Posted by johnsfine View Post
The usual answer is completely reinstall Linux using a 64 bit build of the distribution. But I don't know enough about Slackware to give a Slackware specific answer

I have read one thread in which someone installed a 64 bit Kernel in a 32 bit Linux and got 64 bit programs to work, but it isn't supposed to be that simple. Inserting a 64 bit kernel into a 32 bit install of Linux is not supposed to be enough to get 64 bit programs working.



IIUC, that location has kernel source code not binaries. Only the binaries are 32 bit or 64 bit. The source code is for all architectures.

A 32 bit Linux could have gcc configured to build your choice of 32 bit or 64 bit, but typically gcc in 32 bit Linux is set up to build 32 bit only. If gcc can build 64 bit, then I'm sure an expert in building Linux kernels could compile a 64 bit kernel while running on a 32 bit Linux. But I don't come close to knowing how.

Last edited by jc179; 04-11-2012 at 10:17 PM.
 
Old 04-12-2012, 08:40 AM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by jc179 View Post
I think what I wanted to do with the source I downloaded was make ARCH=x86_64, or make ARCH=ia64
Only x86_64 would be correct. ia64 is a different Intel 64 bit architecture which is incompatible with your hardware.

Keep that in mind if you continue trying to build the kernel yourself or if you get a binary distribution. Some distributions are available in ia64 binaries and those are not what you can use.

AMD64 is the same as x86_64, so if you find an AMD64 distribution, that is perfectly compatible with your Intel CPU. IA64 is something entirely different.

Intel's name for x86_64 is EM64T. Any of AMD64, EM64T and X86_64 describe the same architecture for an OS kernel. The name EM64T is very common in identifying the architecture of Windows binaries, but is rarely used in identifying the architecture of Linux binaries.

Last edited by johnsfine; 04-12-2012 at 08:45 AM.
 
  


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
Is it possible to execute a raw binary file on linux? boxerfangg Linux - Software 4 07-28-2011 02:15 AM
Cannot execute binary on ARM-Linux mungulish Linux - Software 0 06-01-2007 05:50 AM
./egather2-2.09.linux :cannot execute binary file brazinho Linux - General 2 09-07-2006 01:00 AM
Can Linux execute binary files? GiaCo Linux - Newbie 7 11-04-2004 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:56 AM.

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