After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636134 - deinterlace plugin does not build universal on Mac OS
deinterlace plugin does not build universal on Mac OS
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-30 14:41 UTC by Jeremy Huddleston
Modified: 2013-09-30 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tvtime-universal.patch (2.08 KB, patch)
2010-11-30 14:42 UTC, Jeremy Huddleston
none Details | Review
universal.patch (14.93 KB, patch)
2010-11-30 15:25 UTC, Jeremy Huddleston
none Details | Review

Description Jeremy Huddleston 2010-11-30 14:41:42 UTC
The problem is that you're using configure-time checks for architecture rather than compile-time checks.

In addition to the attached patch, you should probably move checks for SIMD out of configure as well using __MMX__ , __SSE__, __SSE2__, __SSE3__, etc

---

make -C deinterlace
make  all-am
  CC     libgstdeinterlace_la-tomsmocomp.lo
/bin/sh ../../libtool --silent --tag=CC --tag=disable-static  --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../..   -I/opt/local/include -D_REENTRANT -I/opt/local/include/gstreamer-0.10 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2   -D_REENTRANT -I/opt/local/include/gstreamer-0.10 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2   -I../../gst-libs -D_REENTRANT -I/opt/local/include/gstreamer-0.10 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2    -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -Wall -Wdeclaration-after-statement -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs   -g    -I/opt/local/include/orc-0.4   -O2 -arch x86_64 -arch i386 -c -o libgstdeinterlace_la-tomsmocomp.lo `test -f 'tvtime/tomsmocomp.c' || echo './'`tvtime/tomsmocomp.c
/var/tmp//ccdRgmRy.s:11200:bad register name `%rbx'
/var/tmp//ccdRgmRy.s:11201:bad register name `%rbx'
/var/tmp//ccdRgmRy.s:11202:bad register name `%rcx'
/var/tmp//ccdRgmRy.s:11203:bad register name `%rbx)'
/var/tmp//ccdRgmRy.s:11204:bad register name `%rbx, %rcx)'
/var/tmp//ccdRgmRy.s:11205:bad register name `%rdi'
/var/tmp//ccdRgmRy.s:11206:bad register name `%rdi)'
/var/tmp//ccdRgmRy.s:11207:bad register name `%rdx'
/var/tmp//ccdRgmRy.s:11208:bad register name `%rbx, %rdx)'
/var/tmp//ccdRgmRy.s:11209:bad register name `%rsi)'
/var/tmp//ccdRgmRy.s:11210:bad register name `%rsi, %rcx)'
/var/tmp//ccdRgmRy.s:11211:bad register name `%rdi,%rdx)'
/var/tmp//ccdRgmRy.s:11212:bad register name `%rsi'
/var/tmp//ccdRgmRy.s:11213:bad register name `%rdi'
/var/tmp//ccdRgmRy.s:11214:bad register name `%rdx'
Comment 1 Jeremy Huddleston 2010-11-30 14:42:21 UTC
Created attachment 175535 [details] [review]
tvtime-universal.patch
Comment 2 Jeremy Huddleston 2010-11-30 14:53:34 UTC
Comment on attachment 175535 [details] [review]
tvtime-universal.patch

please ignore, this is not the correct diff.
Comment 3 Jeremy Huddleston 2010-11-30 15:25:57 UTC
Created attachment 175538 [details] [review]
universal.patch

This patch fixes cpu (and some SIMD) detection.  Endian checks should be removed from configure.ac as well.
Comment 4 Sebastian Dröge (slomo) 2010-12-11 16:05:52 UTC
Erm, no. There are configure time checks for these things for the simple reason that the preprocessor defines are in no way standardized and that you need different checks for different architectures.

Instead of removing the configure checks it would be better to improve them to correctly work everywhere.


What exactly do you mean by "build universal" btw?
Comment 5 Tim-Philipp Müller 2010-12-11 16:21:48 UTC
Well, if I'm not mistaken our configure stuff is quite broken in many respects - e.g. for some things we check we assume host system == target or assume if kernel is 64bit user space is 64 bit etc.
Comment 6 David Schleef 2010-12-11 18:21:19 UTC
"Universal build" means compiling the code for multiple architectures into a single .dylib file.  It's a hack that OS/X does to compile for, say, x86_64 and x86, or previously, x86 and powerpc.

It's really not possible to do this generically on something as big and complex as GStreamer.  Notably, it fails on assembly code.  It also fails for things like glibconfig.h, which is a different header on different architectures.

Since it is fairly straightforward to combine the .dylib/.so files created by two separate builds (there's a tool on OS/X specifically for this), I have never considered it a reasonable goal to support universal building at the compiler level.
Comment 7 Jeremy Huddleston 2010-12-12 01:05:36 UTC
Well your configure time checks are *WRONG* then because they only check one architecture.
Comment 8 Jeremy Huddleston 2010-12-12 01:06:55 UTC
Those types of checks should be done at built time rather than configure time.  Plenty of other autoconf based projects (pixman, cairo, X.org, ...) do these at build time rather than configure time.
Comment 9 Jeremy Huddleston 2010-12-12 01:08:00 UTC
And it doesn't fail on assembly code.  You just need to properly #ifdef your code.  Closing a bug and ignoring it does not make the problem go away.
Comment 10 Dan Kegel 2013-09-30 20:10:53 UTC
True, but it really isn't that hard to do two builds and use lipo.
There are lots of examples, e.g.
http://adium.im/pipermail/commits_adium.im/2009-August/000835.html
gstreamer-sdk does it this way, too.