View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

macosx vs. macintel error: ecl.e Bad CPU type in executable

mdykhuis wrote on Jul 06, 2011

Hi,

I'm relatively new to IRAF. I have recently installed IRAF 2.15.1a on my Mac OS X 10.6.8. The installation completed successfully with no errors, but when I attempted to start IRAF I got the error message:

/usr/local/scisoft//packages/iraf/iraf/bin.macintel/ecl.e: Bad CPU type in executable.


I was able to evade this error by editing the "export MACH=macintel" in my Setup.bash and irafuser.bash to "export MACH=macosx", but the error has cropped up again as I attempt to use "xc.e": the symbolic link for "xc" points toward the "iraf$unix/bin.macintel/xc.e" executable, instead of the bin.macosx/xc.e one. Changing this link temporarily evades the error, but I've got the feeling it won't work to keep putting bandaids on this problem. Any advice?

-MD

Mike Fitzpatrick wrote on Jul 06, 2011

If I had to guess, I'd say you have an older Macbook (Pro)??? In v2.15 the 'macintel' architecture refers to 64-bit platforms only, the 'macosx' arch is a universal ppc/intel 32-bit binary, and since these seem to work on your system my guess about the machine refers to the fact that some older Mac systems can't run 64-bit binaries (hence, the 'bad CPU type'). Note that you don't need to be running a 64-bit OSX kernel (i.e. a "uname -m" command returns 'x86_64' instead of 'i386') to run 64-bit binaries, but even on hardware that should be 64-bit capable, Apple restricted them in the firmware for some laptop models.

The good news is that by simply setting IRAFARCH=macosx you can force IRAF to use the 32-bit universal binaries. The question of whether SciSoft continues to distribute these binaries or switches to 64-bit entirely is a different matter, however you can continue to get the IRAF installation outside of IRAF for 32-bit.

mdykhuis wrote on Jul 06, 2011

Thanks for the quick reply. 'setenv IRAFARCH macosx' seems to fix the problem for now.

By the way, I have a Mac Mini with an Intel Core Duo, 32-bit. My 'uname -m' is 'i386'.

-MD

Mike Fitzpatrick wrote on Jul 06, 2011

Right, "Core Duo" is 32-bit only, "Core 2 Duo" is 64-bit capable but crippled in the firmware for some older model systems. Looks like you're stuck with 32-bit on this machine.

Last post on Jul 06, 2011