General
cancel
Showing results for 
Search instead for 
Did you mean: 

64 bit vs 32 bit environment

SOLVED
Go to solution
john guardian
Super Advisor

64 bit vs 32 bit environment

I have a couple of users who are trying to run some "older" scripts on a 64 bit distro. They don't run yet will work on a 32 bit distro.

Isn't there a command that needs to be issued on a 64 bit machine that will allow the scripts to run?
9 REPLIES
Steven Schweda
Honored Contributor

Re: 64 bit vs 32 bit environment

It's just possible that it would be useful to
know what you mean by "scripts" and "don't
run". What, exactly, fails, and how?

> Isn't there a command that needs to be
> issued on a 64 bit machine that will allow
> the scripts to run?

I can't imagine what that command might be,
but I also can't imagine what's failing in
your scripts.
john guardian
Super Advisor

Re: 64 bit vs 32 bit environment

When I got in this AM, I had a note on my desk. No details... So I can't really provide anything else...
Steven Schweda
Honored Contributor

Re: 64 bit vs 32 bit environment

> So I can't really provide anything else...

If you can provide no useful information,
then a call to a psychic hotline might be
more productive than a posting here.
Matti_Kurkela
Honored Contributor
Solution

Re: 64 bit vs 32 bit environment

So let me try my crystal ball on this one ;-)

By my experience, "script" is usually something that is run through an interpreter, so in a 64-bit environment a script might be using the environment's native script interpreter. So the interpreter should be 64-bit-compatible by default.

One possible source of errors could then be that the script does not get the response it expects from the system. For example, if the script is using "uname -m" or something similar to identify the architecture and does not know about the new 64-bit architectures (x86_64 or ia64), it will return an error.

There *is* a command that allows the system to "lie" about its architecture identifier to a given process and all its children. It is useful only on systems that have some multi-architecture capability. That command is "setarch".

On my home machine (Debian Etch, x86_64) I can do this:
$ uname -m
x86_64
$ setarch i386 uname -m
i686

You can also use just the name of the desired architecture as a command. This invokes "setarch" through a symbolic link. Setarch does the right thing automatically:
$ uname -m
x86_64
$ i386 uname -m
i686

Apparently you can also use the setarch command to escape from the fake 32-bit mode, if necessary:
$ i386 bash
$ uname -m
i686
$ setarch x86_64 uname -m
x86_64
$ x86_64 uname -m
x86_64

If running the script with "setarch i386" makes it work, it might be easy to modify the script to automatically identify the compatible 64-bit architectures.

MK
MK
john guardian
Super Advisor

Re: 64 bit vs 32 bit environment

REPLY to STEVEN SCHWEDA:

Apparently Steven, the only thing YOU have to offer this site is your POMPOUS IGNORANCE. I suggest you take it elsewhere.

Matti, on the other hand, provided me with the info I needed to actually SOLVE the problem.

john guardian
Super Advisor

Re: 64 bit vs 32 bit environment


CHEERS to Matti, the "Problem Solver"!

JEERS to Steven, the "Problem Child".

Thanks again, Matti!
Steven Schweda
Honored Contributor

Re: 64 bit vs 32 bit environment

Yes, I'm a terrible nuisance. Isn't it sad?

Feel free to enlighten me (and any future
readers of this thread) by explaining exactly
what the actual problem was, and what you did
to solve it.
john guardian
Super Advisor

Re: 64 bit vs 32 bit environment

I've already enlightened you, Steven.

Matti solved the issue. The user's machine, which I didn't have access to in the TS Clearance lab, was Debian.

But I wouldn't call you a nuisance... It's too gentile a word. If we ever have the opportunity to speak face2face, I'll be happy to explain it to you publicly, using words similar to your own, so you'll understand them, you know... the mono-syllabic variety.

In the meantime, go polish you crystal ball and leave the problem solving to Matti!
Steven Schweda
Honored Contributor

Re: 64 bit vs 32 bit environment

> I've already enlightened you, Steven.

Thanks for clarifying that. I was in some
doubt before.