Page 1 of 2

Blender as Universal Binary?

Posted: Sun Jan 22, 2006 2:22 pm
by William
Quick question: Is anyone working on making a Universal Binary version of Blender? I am considering a new Macbook Pro, and Blender is important to me.

I would assume Blender would be relatively easy to port since it is designed in a very cross-platform way, and mostly relies on OpenGL, which is implemented natively into the new intel macs. Blender is not tied to a specific processor or any specific OS APIs.

Is anyone persuing this? If not, I suppose I could try compiling myself, but I'm not so good at that, so I don't expect any results.

-Bill

Re: Blender as Universal Binary?

Posted: Sun Jan 22, 2006 3:54 pm
by lukep
William wrote:Quick question: Is anyone working on making a Universal Binary version of Blender? I am considering a new Macbook Pro, and Blender is important to me.

I would assume Blender would be relatively easy to port since it is designed in a very cross-platform way, and mostly relies on OpenGL, which is implemented natively into the new intel macs. Blender is not tied to a specific processor or any specific OS APIs.

Is anyone persuing this? If not, I suppose I could try compiling myself, but I'm not so good at that, so I don't expect any results.

-Bill
To build and test an Intel mac version, you need such a comp. unfortunately neither Ton or I intends to buy one shortly.

If you are ready to do it, we will gladly accept the help ;)

Now building an univ binary may be not that straight forward, there is a lot of places where we tested __APPLE__ def to check if we needed to do things big or small endians ways.

this will likely have to be changed

Posted: Mon Jan 23, 2006 5:38 pm
by MrMunkily
I thought you could build binaries for both architectures on a PPC machine...

Posted: Mon Jan 23, 2006 7:13 pm
by lukep
MrMunkily wrote:I thought you could build binaries for both architectures on a PPC machine...
to build yes, but test no.

As i said there will be likely some problems

Posted: Mon Jan 23, 2006 11:37 pm
by William
I was thinking... For a universal binary, would we have to switch to XCode for the mac version of Blender? As far as I know Blender doesn't really compile in Xcode ATM, or am I wrong?

Posted: Tue Jan 24, 2006 1:20 am
by lukep
William wrote:I was thinking... For a universal binary, would we have to switch to XCode for the mac version of Blender? As far as I know Blender doesn't really compile in Xcode ATM, or am I wrong?
no need to switch to xcode, but my actual build system is gcc3.3 and i would need to use gcc4.4

Blender Universal Binary testing

Posted: Wed Feb 01, 2006 5:45 pm
by jjjolton
Depending on how things go this month, I may be able to test it on a lab of Intel iMacs. Does that help?

Re: Blender Universal Binary testing

Posted: Wed Feb 01, 2006 8:44 pm
by lukep
jjjolton wrote:Depending on how things go this month, I may be able to test it on a lab of Intel iMacs. Does that help?
if you can debug C code, yes. but you would be mostly on your own.

unless a coder has physical (or via ssh) access to an intel mac, resolving the hurdles is unprobable

Posted: Thu Feb 02, 2006 12:22 am
by jjjolton
Sorry - I'm not of the skill level to debug C code :-(

Hopefully someone will get a MacTel to you for this - Universal Binary is the future for the nonce, and Blender can only benefit from both these new dual-core machines and the render-farm power of Xgrid.

Posted: Sat Feb 11, 2006 12:05 am
by dschnell289
I've ran blender on an intel mac through rosetta..works seamlessly and is a little slower than my iMac 1.8 G5. (Store model, so no builds/debugging from me). But I have an unrelated question - how can I run blender from the terminal and use the option switches? nothing I tried works. (like -b for background rendering).

Posted: Tue Feb 21, 2006 5:21 am
by Eidetiken
I just order a loaded Intel iMac. If you can compile a Universal binary I'll test it out for you.

20" 2GHz iMac (Intel Core duo)
2GB 667 DDR2 SDRAM - 2x1GB
ATI Radeon X1600-256MB SDRAM
500 gig HD

Posted: Fri Apr 07, 2006 4:12 am
by ben_h
Hi folks. I'm fairly new to Blender but I have a decent amount of experience writing C.

I've got a nice new MacBook Pro that I'm more than happy to use to help in getting universal binaries happening.

At the moment, I'm not really sure where to start - I'm about to download the source and have a dig around in it. Any suggested starting points - anyone else been using Xcode to build? et cetera.

Posted: Fri Apr 07, 2006 5:14 am
by ben_h
Alright, I made a little progress.

Firstly I hacked nan_compile.mk inside the ifeq($(OS),darwin) conditional to provide correct -march flags depending on the setting of $CPU:

Code: Select all

ifeq ($(OS),darwin)
    CC  = gcc
    CCC = g++

    ifeq ($(CPU),i386)
        CFLAGS  += -pipe -fPIC -ffast-math -march=pentium-m
        CCFLAGS += -pipe -fPIC
    else
        CFLAGS  += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5
        CCFLAGS += -pipe -fPIC
    endif

    REL_CFLAGS  += -O2
    REL_CCFLAGS += -O2
    CPPFLAGS    += -D_THREAD_SAFE
    NAN_DEPEND  = true
    OPENGL_HEADERS = /System/Library/Frameworks/OpenGL.framework
    AR = ar
    ARFLAGS = ruv
    RANLIB = ranlib
    ARFLAGSQUIET = ru
endif
Individual files build fine now. I'll find out pretty quickly if pentium-m is the correct arch - if need be I'll just change it back to i386 for now.

The next problem is that I need a bunch of 3rd party libs to build - freetype etc. What the usual way people provide them on PPC Darwin? Via Fink?

Fink on Intel Darwin is prety low on packages at the moment, so they'll probably have to be built manually. Just wanted to see what people do about the libs in general before I go off in the wrong direction :)

WOW

Posted: Fri Apr 07, 2006 3:16 pm
by bobbagoose
That's great. I'm glad someone is making progress on this. I just got a MacMini Intel Core Duo, and am finding it increasingly difficult to get my workflow mac oriented. Unfortunately I have little programming experience, but would be glad to test your binaries on my system once you have something working.

Keep up the good work.

Posted: Thu Apr 20, 2006 1:55 pm
by Bischofftep
ben_h wrote:Individual files build fine now. I'll find out pretty quickly if pentium-m is the correct arch - if need be I'll just change it back to i386 for now.
I'd be curious to know if pentium-m is correct! Please let me know what you find out?
ben_h wrote:The next problem is that I need a bunch of 3rd party libs to build - freetype etc. What the usual way people provide them on PPC Darwin? Via Fink?
I had good success running everything through darwinports: it compiles native on your machine, so assuming that's an Intel Mac (as mine is) it works just fine.

Note that you'll need to get libiconv (that isn't immediatley obvious from the dependencies) and do some tweaking of the lib directory, but it can be made to work.

I've noticed, though, that SDL and OpenAL define some symbols identically, so I've yet to get OpenAL to work, but you can certainly compile without that.

Now to tackle Endian issues...

-Bischofftep