[GEM-dev] Re: [PD] PD on Mac-Intel

IOhannes m zmoelnig zmoelnig at iem.at
Mon Mar 27 16:27:03 CEST 2006


Cefn Hoile wrote:
> Thanks IOhannes.
> 
> Sounds like gem-dev's a more relevant list for these harder gem  issues.
> I'm now subscribed to gem-dev too. I'm still wondering  whether GCC can
> be called with a more generous interpretation of the  C code so it
> doesn't raise these spurious errors on a codebase which  is demonstrated
> to work for GCC3.3.

well, not necessarily. people (including me) have had serious problems
building Gem with gcc3.3 recently.
thats why i say: "use gcc>=4.0"

> 
> Anyway I've attached the latest useful looking build files for you to 
> look at. This is from the first build attempt described below with  nil
> swapped for null64, not the second, abortive one with MMX disabled.
> 
> 
> To carry out the first build attempt I executed the global code  changes
> you mentioned to check if the nil value is causing the problem.
> 
> So I used
> perl -pi -e 's/nil/null64/g' `find Pixes/ -type f -name '*.cpp'`
> for a global find replace of all files in place switching lowercase 
> 'nil' for 'null64'.
> 
> <BTW>
> Can I not just change it at the following line...
> Pixes/pix_chroma_key.cpp:277:  const __m64 nil=_mm_setzero_si64();
> </BTW>

yes of course you are right. i was implying that.

> 
> Then I get as far as...

good, so it _was_ the "nil" thing

> 
> g++ -c -fPIC -I/Users/cefn/Documents/curiosity/pdplay/pd-intel/
> pd-0.39-2/src/   -I..   pix_filmQT.cpp -o pix_filmQT.o
> pix_filmDarwin.cpp: In member function 'virtual void 
> pix_filmDarwin::closeMess()':
> pix_filmDarwin.cpp:63: warning: 'DisposeGWorld' is deprecated  (declared
> at /System/Library/Frameworks/ApplicationServices.framework/
> Frameworks/QD.framework/Headers/QDOffscreen.h:226)

well, we cannot do anything about that currently. while it seems to be
deprecated, it is still valid (and not an error, so i don't care _now_)


> pix_filmDarwin.cpp: In member function 'virtual void 
> pix_filmDarwin::getFrame()':
> pix_filmDarwin.cpp:413: error: 'null64' was not declared in this scope
> pix_filmDarwin.cpp:424: error: 'null64' was not declared in this scope
> make[1]: *** [pix_filmDarwin.o] Error 1
> make[1]: *** Waiting for unfinished jobs....

yep, here we have the reverse error as before:
the QuickDraw-framework _does_ declare a "nil" value, which broke the
MMX-code.
now that you have replaced _all_ "nil"s, they are missing there where
they need to be "nil".
so run your inverse perl-script on "*film*" and "*movie*".

> pix_filmYUV.h:150: error: ISO C++ forbids declaration of 'pixStruct' 
> with no type
> pix_filmYUV.h:150: error: expected ';' before '*' token

wow, i don't have a line150 here in pix_filmYUV.h (it is only 51lines long)

> 
> 
> 
> ...and in a second build attempt after following your suggestion to  add
> the undef to the gcc flags like...

well, i think this is not needed; the errors really were in the "nil"-name.


so the suggestions below, are trying to fix _these_ problems though the
_real_ problems are above...

> 
> src (501) : export CFLAGS="$CFLAGS -U__MMX__"
> src (502) : export CPPFLAGS="$CPPFLAGS -U__MMX__"
> src (503) : export CXXFLAGS="$CXXFLAGS -U__MMX__"

i assume you are setting these at the shell?
i guess you should rather set all these CFLAGS within the Make.config
setting them on the commandline should override the settings in
Make.config which is not what we want! we want both.


anyhow, your Make.config reveals that you (of course!) also have sse2
enabled; that's what makes the errors in your 2nd build.
you should disable that too.
just remove the "-msse2" and "-mmmx" parts from Make.config.

did you run configure with "--disable-SIMD" for the files you sent? if
so, the checks are seriously broken.
it would also be nice to have the output of configure, like with

./configure --disable-SIMD > myconf.log

(don't use config.log since that is already used by configure itself)



mfg.asdr
IOhannes




More information about the GEM-dev mailing list