[Gridflow-dev] Compiling on mac os 10.5

Mathieu Bouchard matju at artengine.ca
Wed Oct 14 23:37:38 EDT 2009


On Tue, 8 Sep 2009, Patrick Boivin wrote:

> On an iMac (intel 2.4GHz core duo), even though it detects a
> "Pentium-compatible CPU" during configure, i get the following error:
> /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:35:3: error:
> #error "SSE instruction set not enabled"
> /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:216:
> error: ?__m128? does not name a type

No idea how to handle this. Perhaps we could add a check for it in the 
./configure.

> when it gets to compiling those: format/quartz.m.fcs,
> format/quicktimeapple.c.fcs, optional/gem.c.fcs

So why those three parts and not the rest?

> So, all that's needed is to specify --no-pentium to ./configure ...

All that's needed is to figure out stuff like:

   $CFLAGS += " -mtune=$(CPU)" if $conf[:DEFINES][:CPU] and
     $conf[:DEFINES][:GCC_VERSION] >= "4"

... in ./configure. We'd see what it means in terms of missing the 
occasion to make machine code optimised for today's CPUs. But we'd also 
figure out what to replace it.

Basically, from the three above sourcefiles, there are #includes of 
Apple headers that contain macros (or inline-functions) that assume that 
if you have an i386-compatible CPU then you automatically have a 
SSE-compatible CPU. But at the same time, the -mcpu and -mtune stuff are 
asking GCC to produce plain i586 code (that runs even on non-MMX 
pentiums!). I think that I put this code for weird reasons long ago just 
to make the compiler shut up about something, but I have not much 
recollection of it (the corresponding brain cells jumped off a cliff, 
etc).

> Also, when I wanted to compile with FFTW, I got the following error:
> optional/fftw.c.fcs:70: error: ?ulong? was not declared in this scope

As I think that [#fft] is an especially cool part of GF, I think that we 
should look at this tomorrow.

> A little modification in CHECK_ALIGN16 (gridflow.h) did the job:
> gridflow-0.9.4 pb$ diff gridflow-old.h gridflow.h

fixed.

> Finally, there are two problems when compiling format/quartz.m.fcs.
> First, it needs to be done "manually" specifying the pd source code
> location ( -I/usr/src/pd-0.42-5/src ), as if g++ wasn't considering
> CPLUS_INCLUDE_PATH for Objective-C files.

Let's fix this tomorrow. I think that GCC has to choose one envvar or 
the other, and in this case, it favours C_INCLUDE_PATH at the exclusion of 
the other. This is because quartz.m is compiled in ObjectiveC++ mode, 
which is supposed to be to C++ as ObjectiveC is to C, and to be to 
ObjectiveC as C++ is to C, but that's actually slightly contradictory...

> Second, I had the following error (0.9.5 SVN only):
> < GRID_INLET(FormatQuartz,0) {
>> GRID_INLET(0) {

leftover incomprehensibly remaining from the ruby days? or somesuch

done.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Gridflow-dev mailing list