Welcome to iraf.net Saturday, January 20 2018 @ 07:10 AM GMT

The following comments are owned by whomever posted them. This site is not responsible for what they say.

  • IRAF on Intel Macs -- universal binaries.
  • Authored by: sirmarcos on Monday, February 20 2006 @ 11:34 PM GMT

Well, that's cool. Until today, I hadn't figured out how to make an intel binary from the command line with the latest OS X dev tools. I could do it in Xcode, both with my IRAF Button program, and with some command line c programs I've written... but I didn't know what I needed to put in the makeflie I need to do to the makefile to make it happen without the Xcode IDE... the -arch flag never seems to work.

After googling today, though I came across this page

http://developer.apple.com/documentation/Porting/ Conceptual/ PortingUnix/compiling/chapter_4_section_3.html

So my (very simple) makefile now looks like:

CFLAGS= -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -
arch i386
LDFLAGS= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -
arch ppc -arch i386

bisector: bisector.o bisector_subs.o
	cc bisector.o bisector_subs.o -o bisector -lm $(LDFLAGS)

bisector.o: bisector.c
	cc -c bisector.c $(CFLAGS)
bisector_subs.o: bisector_subs.c
	cc -c bisector_subs.c $(CFLAGS)

Walla, the Finder says it's a "universal unix executable" and it's about twice the size of the PPC only one.

So it might be possible to make "universal" binaries of IRAF, if this trick can work on a larger scale. THough that'd be twice as big a download.

  • IRAF on Intel Macs -- universal binaries.
  • Authored by: fitz on Tuesday, February 21 2006 @ 07:10 PM GMT
For a simple hello.c the multiple -arch flags are all that's needed for a universal binary. Specifying '-arch i386' on a G4/5 will compile a native intel binary and it's this trick I was referring to in cross-compiling iraf packages i.e. simply set IRAFARCH to 'macintel' and let the system worry about setting the flags to produce intel binaries, all you need is to have the intel iraf libs installed. So, developers could install both archs but users still only need one.

The size of universal binaries is not a minor issue for IRAF: a typical IRAF+STSDAS+TABLES system would run 1GB, most of it wasted space. A UniBin XGterm might make be okay, but we've already got the concept of architectures in IRAF and most people will only want one or the other binary anyway.

Privacy Policy
Terms of Use

User Functions