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 615996 - doesn't detect HAVE_CPU_I386 or HAVE_CPU_X86_64 properly on Solaris
doesn't detect HAVE_CPU_I386 or HAVE_CPU_X86_64 properly on Solaris
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.21
Other Solaris
: Normal blocker
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-16 21:18 UTC by Brian Cameron
Modified: 2010-04-23 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch fixing identification of when to set HAVE_CPU_I386 or HAVE_CPU_X86_64 (1.70 KB, patch)
2010-04-16 21:18 UTC, Brian Cameron
committed Details | Review

Description Brian Cameron 2010-04-16 21:18:00 UTC
Created attachment 158923 [details] [review]
patch fixing identification of when to set HAVE_CPU_I386 or HAVE_CPU_X86_64

On Solaris you can build either 32-bit or 64-bit code on an amd64 bit processor. 
On such a machine "uname -a" returns:

SunOS dhcp-uchi03-250-85 5.11 snv_137 i86pc i386 i86pc

So, it doesn't indicate that it is 64-bit.

A better way to test on Solaris x86 if building in 32 or 64 bit mode is to check the "__i386" or "__amd64" defines when compiling a test program.

The attached patch does this and fixes the problem for Solaris.  Can this go upstream?
Comment 1 Brian Cameron 2010-04-16 21:24:27 UTC
Since this patch fixes a common/m4 file, it probably should go into all the gstreamer modules, but it seems that it only causes problems when building gst-plugins-good due to the MMX code in goom.  Without this patch, the amd64 build of gst-plugins-good fails to build in the goom code since HAVE_CPU_X86_64 isn't set and instead HAVE_CPU_I386 is incorrectly set in this case.
Comment 2 Sebastian Dröge (slomo) 2010-04-17 08:36:59 UTC
Comment on attachment 158923 [details] [review]
patch fixing identification of when to set HAVE_CPU_I386 or HAVE_CPU_X86_64

Looks good... too bad that the host cpu variable on Solaris doesn't make a difference between both architectures.
Comment 3 Tim-Philipp Müller 2010-04-23 13:50:20 UTC
Ok, committed:

commit 4d67bd6f51003ea5c7e7ae75f53ce95acc4c4175
Author: Brian Cameron <brian.cameron@oracle.com>
Date:   Fri Apr 23 14:34:41 2010 +0100

    gst-arch.m4: fix detection on Solaris
    
    stop-gap measure to fix CPU/arch detection on solaris, which
    makes the goom problems work properly on solaris. Probably
    needs more fixes after the release (use target_* etc.).
    
    Fixes #615996.

The way we use this stuff seems a bit dodgy, but we can fix that after the release IMO.