! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo doesn't build universal


Description Anders F Björklund 2009-01-28 07:46:45 CET
Created attachment 2127 

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 ?
Comment 1 Brian J. Tarricone (not reading bugmail) 2009-01-28 23:14:59 CET
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.
Comment 2 Nick Schermer editbugs 2009-01-29 07:38:40 CET
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
Comment 3 Anders F Björklund 2009-01-29 08:13:29 CET
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.
Comment 4 Brian J. Tarricone (not reading bugmail) 2009-01-29 08:48:53 CET
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 ^_~.
Comment 5 Anders F Björklund 2009-01-29 08:53:00 CET
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... :-)

Comment 6 Brian J. Tarricone (not reading bugmail) 2009-01-29 09:02:42 CET
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).
Comment 7 Anders F Björklund 2009-01-29 12:24:27 CET
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.

Bug #4868

Reported by:
Anders F Björklund
Reported on: 2009-01-28
Last modified on: 2009-10-09


Nick Schermer
CC List:
3 users




exo-mmintrin.diff (376 bytes, patch)
2009-01-28 07:46 CET , Anders F Björklund
no flags

Additional information