Blender as Universal Binary?

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

William
Posts: 0
Joined: Tue Jan 11, 2005 3:07 am

Blender as Universal Binary?

Post by William » Sun Jan 22, 2006 2:22 pm

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

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Re: Blender as Universal Binary?

Post by lukep » Sun Jan 22, 2006 3:54 pm

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

MrMunkily
Posts: 53
Joined: Mon Oct 14, 2002 5:24 am

Post by MrMunkily » Mon Jan 23, 2006 5:38 pm

I thought you could build binaries for both architectures on a PPC machine...

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Post by lukep » Mon Jan 23, 2006 7:13 pm

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

William
Posts: 0
Joined: Tue Jan 11, 2005 3:07 am

Post by William » Mon Jan 23, 2006 11:37 pm

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?

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Post by lukep » Tue Jan 24, 2006 1:20 am

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

jjjolton
Posts: 0
Joined: Fri Mar 14, 2003 7:30 pm

Blender Universal Binary testing

Post by jjjolton » Wed Feb 01, 2006 5:45 pm

Depending on how things go this month, I may be able to test it on a lab of Intel iMacs. Does that help?

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Re: Blender Universal Binary testing

Post by lukep » Wed Feb 01, 2006 8:44 pm

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

jjjolton
Posts: 0
Joined: Fri Mar 14, 2003 7:30 pm

Post by jjjolton » Thu Feb 02, 2006 12:22 am

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.

dschnell289
Posts: 0
Joined: Fri Nov 05, 2004 6:21 pm

Post by dschnell289 » Sat Feb 11, 2006 12:05 am

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).
----

Eidetiken
Posts: 0
Joined: Tue Feb 21, 2006 5:11 am

Post by Eidetiken » Tue Feb 21, 2006 5:21 am

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

ben_h
Posts: 0
Joined: Fri Apr 07, 2006 4:06 am

Post by ben_h » Fri Apr 07, 2006 4:12 am

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.

ben_h
Posts: 0
Joined: Fri Apr 07, 2006 4:06 am

Post by ben_h » Fri Apr 07, 2006 5:14 am

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 :)

bobbagoose
Posts: 0
Joined: Fri Apr 07, 2006 3:12 pm

WOW

Post by bobbagoose » Fri Apr 07, 2006 3:16 pm

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.

Bischofftep
Posts: 0
Joined: Thu Feb 06, 2003 11:01 pm
Location: Richmond, VA
Contact:

Post by Bischofftep » Thu Apr 20, 2006 1:55 pm

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

Post Reply