Created attachment 2127 exo-mmintrin.diff When building exo as a Universal Binary, there is a problem with <mmintrin.h>: checking mmintrin.h usability... no checking mmintrin.h presence... yes configure: WARNING: mmintrin.h: present but cannot be compiled configure: WARNING: mmintrin.h: check for missing prerequisite headers? configure: WARNING: mmintrin.h: see the Autoconf documentation configure: WARNING: mmintrin.h: section "Present But Cannot Be Compiled" configure: WARNING: mmintrin.h: proceeding with the preprocessor's result configure: WARNING: mmintrin.h: in the future, the compiler will take precedence configure: WARNING: ## ---------------------------------------- ## configure: WARNING: ## Report this to http://bugzilla.xfce.org/ ## configure: WARNING: ## ---------------------------------------- ## checking for mmintrin.h... yes exo-gdk-pixbuf-extensions.c:47:22: error: mmintrin.h: No such file or directory This is because the header only exists for -arch i386, but not for -arch ppc. Suggestion is to use the same versioning on the header include as on the code ?
Patch looks ok to me, assuming any functions used from that header are also protected with __MMX__. It's an annoying hack, since autoheader can't really handle building for more than one arch at once properly.
Yeah the other _mm_ functions are also protected by __GNUC__ and __MMX__, so it should do not harm, but it doubt it's a good solution. I think we should do a configure test if mmx is supported. Maybe something pixman uses[1]. [1] http://cgit.freedesktop.org/pixman/tree/configure.ac
It's more of a hack than a "solution", it works for the (common) case of building i386+ppc on Intel but would fail for building i386+ppc on PowerPC - since the preprocessor won't find the <mmintrin.h> header there (for the ppc gcc). If switching to a configure-based test, then keep in mind that there is only *one* such configure run for both architectures. So it can't just be coded into "config.h", or I would have to patch it. It's a common annoyance factor.
No, there's no way around this without stupid hacks, unfortunately. autotools (and autoheader in particular) don't support compiling for multiple arches at the same time. The problem is that it has to use the same config.h for both x86 and ppc. Unfortunately a hack like this is necessary for the 3 people who will want to compile on OSX ^_~.
In my case it was easier to patch in those two lines than to make the port use the currently convoluted process of building twice and then merging together with lipo... :-) http://trac.macports.org/ticket/17903
Ah, I didn't realise there was yet another way to do it. In that case, even if it's cumbersome, I think I'd rather you guys work around it in your own way (either by doing the tedious but "correct" thing of building the package twice and merging, or by including your patch in your sources).
No problem. Of course, the whole issue only applies when building +universal anyway. If you do a "native" build, then it doesn't get confused by multiple -arch flags. Just thought I'd report the original error, as given by exo's configure.