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 503590 - gstreamer-0.10.15 fails tests on ppc64
gstreamer-0.10.15 fails tests on ppc64
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.15
Other All
: Normal minor
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-14 12:50 UTC by Alexis Ballier
Modified: 2008-01-07 09:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
config.log (79.87 KB, text/plain)
2007-12-16 21:52 UTC, Alexis Ballier
  Details
proposed patch (11.41 KB, patch)
2007-12-17 17:56 UTC, Alexis Ballier
committed Details | Review

Description Alexis Ballier 2007-12-14 12:50:55 UTC
Please describe the problem:
After compiling gstreamer 0.10.15 on 64 bits ppc, running make check gives me:

[...]
sizeof(GstRegistry) is 144, expected 72
sizeof(GstRegistryClass) is 288, expected 144
sizeof(GstSegment) is 104, expected 88
sizeof(GstStructure) is 40, expected 20
sizeof(GstSystemClock) is 288, expected 200
sizeof(GstSystemClockClass) is 352, expected 176
sizeof(GstTagSetterIFace) is 16, expected 8
sizeof(GstTask) is 160, expected 80
sizeof(GstTaskClass) is 280, expected 140
sizeof(GstTrace) is 32, expected 20
sizeof(GstAllocTrace) is 24, expected 16
sizeof(GstTypeFind) is 64, expected 32
sizeof(GstTypeFindFactory) is 216, expected 108
sizeof(GstTypeFindFactoryClass) is 304, expected 152
sizeof(GstURIHandlerInterface) is 88, expected 44
sizeof(GstValueTable) is 64, expected 32
sizeof(GstXML) is 128, expected 64
sizeof(GstXMLClass) is 288, expected 144
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:283:F:size check:tf:0: failed ABI check
FAIL: gst/gstabi
Running suite(s): GstBuffer
[...]

tests/check/gst/struct_ppc32.h and tests/check/gst/struct_ppc64.h are almost
the same, but I think on ppc64, at least pointers are bigger.
In fact, copying tests/check/gst/struct_x86_64.h to
tests/check/gst/struct_ppc64.h makes this test pass.

The same applies to tests/check/libs/struct_ppc64.h


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Tim-Philipp Müller 2007-12-16 20:22:50 UTC
This test passes fine for me on my ppc64 linux system (debian stable):

$ uname -a
Linux shiny 2.6.18-5-powerpc64 #1 SMP Mon Dec 3 08:07:44 UTC 2007 ppc64 GNU/Linux
$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

and our ppc64 build bot also doesn't seem to have a problem.


 - Could you provide more details about your setup (distro etc.)?

 - What's the output of $ uname -a

 - What's the output of $ gcc --version

 - What's the output of ~/gstreamer-0.10.15$ grep CPU config.h | grep define

 - What's the output of ~/gstreamer-0.10.15$ grep 'CFLAGS =' Makefile

 - Could you attach your config.log file?
Comment 2 Alexis Ballier 2007-12-16 21:43:37 UTC
(In reply to comment #1)
> This test passes fine for me on my ppc64 linux system (debian stable):
> 
> $ uname -a
> Linux shiny 2.6.18-5-powerpc64 #1 SMP Mon Dec 3 08:07:44 UTC 2007 ppc64
> GNU/Linux

$ uname -a
Linux macac 2.6.24-rc2-g8c086340 #13 SMP PREEMPT Fri Nov 16 12:43:24 CET 2007 ppc64 PPC970, altivec supported PowerMac7,2 GNU/Linux



> $ gcc --version
> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


$ gcc --version
gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
Copyright (C) 2007 Free Software Foundation, Inc.

> and our ppc64 build bot also doesn't seem to have a problem.
> 
> 
>  - Could you provide more details about your setup (distro etc.)?

Gentoo, ppc64, 64 bits userland.

>  - What's the output of ~/gstreamer-0.10.15$ grep CPU config.h | grep define

$ grep CPU config.h | grep define
#define HAVE_CPU_PPC64 1
#define HOST_CPU "powerpc64"


>  - What's the output of ~/gstreamer-0.10.15$ grep 'CFLAGS =' Makefile

$ grep 'CFLAGS =' Makefile
CFLAGS = -O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec
CHECK_CFLAGS = 
DEPRECATED_CFLAGS = -DGST_DISABLE_DEPRECATED
ERROR_CFLAGS = -Wall
GCOV_CFLAGS = 
GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
GLIB_ONLY_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  
GST_ALL_CFLAGS = -I$(top_srcdir)/libs -I$(top_srcdir) -I$(top_builddir) -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2   $(GST_OPTION_CFLAGS)
GST_OBJ_CFLAGS = $(GST_ALL_CFLAGS)
GST_OPTION_CFLAGS = $(ERROR_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(GCOV_CFLAGS) $(OPT_CFLAGS) $(DEPRECATED_CFLAGS)
PROFILE_CFLAGS = 
VALGRIND_CFLAGS = 
XML_CFLAGS = -I/usr/include/libxml2  


>  - Could you attach your config.log file?

will do


Are you sure you're running 64bits userland on your hosts ?
I thought debian was not supporting it (apart from http://debian-ppc64.alioth.debian.org/), I see only the powerpc port with the possibility to install a 64bits libc.

And yes, on a debian sid powerpc chroot the tests pass, but:
$ file gst/.libs/libgstreamer-0.10.so.0.14.0 
gst/.libs/libgstreamer-0.10.so.0.14.0: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped

while I get in 64 bits userland:
$ file gst/.libs/libgstreamer-0.10.so.0.14.0
gst/.libs/libgstreamer-0.10.so.0.14.0: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), not stripped
Comment 3 Alexis Ballier 2007-12-16 21:52:21 UTC
Created attachment 101079 [details]
config.log
Comment 4 Alexis Ballier 2007-12-17 17:56:34 UTC
Created attachment 101133 [details] [review]
proposed patch

This is probably due to the #ifdef depending on the build host and not the abi target used, this patch should fix it and tests are fine on both gentoo ppc64 64bits userland and sid powerpc chroot running 64 bits kernel.

By the way, I didnt check it but I'd bet the tests would fail the same way on a x86_64 using a 32 bits userland.
Comment 5 Tim-Philipp Müller 2008-01-07 09:51:15 UTC
> Are you sure you're running 64bits userland on your hosts ?
> I thought debian was not supporting it (apart from
> http://debian-ppc64.alioth.debian.org/), I see only the powerpc port with the
> possibility to install a 64bits libc.
> 
> And yes, on a debian sid powerpc chroot the tests pass, but:
> $ file gst/.libs/libgstreamer-0.10.so.0.14.0 
> gst/.libs/libgstreamer-0.10.so.0.14.0: ELF 32-bit MSB shared object, PowerPC or
> cisco 4500, version 1 (SYSV), not stripped

You're right, it seems to be a 32-bit environment in my case (and on the build bot).

Committed, thanks:

 2008-01-07  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Alexis Ballier <aballier at gentoo org>

        * tests/check/gst/gstabi.c:
        * tests/check/gst/struct_ppc64.h:
        * tests/check/libs/libsabi.c:
        * tests/check/libs/struct_ppc64.h:
          Decide which header to include based on the userland ABI target
          and not the kernel/cpu. Fix up structure sizes of ppc64 header
          for 64-bit userland (#503590).  Might need something similar for
          x86 too.