Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20126 - libkarbonpart dies with "xlib_rgb_init: compiled for little endian, but this is a big endian machine"
Summary: libkarbonpart dies with "xlib_rgb_init: compiled for little endian, but this ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High minor (vote)
Assignee: Pieter Van den Abeele (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-28 15:43 UTC by Matt Amos
Modified: 2006-02-04 06:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to the offending code (karbon-0.0.1.patch,802 bytes, patch)
2003-07-15 05:17 UTC, Pieter Van den Abeele (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Amos 2003-04-28 15:43:37 UTC
When running the Karbon KPart the application (KWord, Karbon, etc...) which started it 
crashes and returns to the prompt with the message "xlib_rgb_init: compiled for little 
endian, but this is a big endian machine." 
 
The only file containing this message on this machine is /usr/lib/kde3/libkarbonpart.so 
 
A google shows that this is not a common problem.
Comment 1 Luca Barbato gentoo-dev 2003-06-08 17:25:53 UTC
which kde version? (emerge -p kde)
which koffice version? (emerge -p koffice)
which system ? (emerge info)
Comment 2 Matt Amos 2003-06-09 15:09:19 UTC
versions of software: "qpkg kde -I" 
kde-base/kde-env-3-r2 * 
kde-base/arts-1.1.0-r1 * 
kde-base/kdelibs-3.1-r3 * 
kde-base/kdebase-3.1 * 
kde-base/kdeartwork-3.1 * 
kde-base/kdenetwork-3.1 * 
kde-base/kdepim-3.1 * 
kde-base/kdemultimedia-3.1 * 
kde-base/kdetoys-3.1 * 
kde-base/kdeutils-3.1 * 
kde-base/kdegames-3.1 * 
kde-base/kdegraphics-3.1 * 
kde-base/kdeaddons-3.1 * 
kde-base/kdeadmin-3.1 * 
kde-base/kdeedu-3.1 * 
kde-base/kde-3.1 * 
 
versions of koffice: "qpkg koffice -I" 
app-office/koffice-1.2.1 * 
 
the libkarbonpart file is owned by koffice 
 
"emerge info": 
Portage 2.0.47-r10 (default-ppc-1.4, gcc-3.2.1, glibc-2.3.1-r4) 
================================================================= 
System uname: 2.4.20-ben3 ppc 
GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config 
/etc/make.conf /etc/fstab /etc/group /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config 
/usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="" 
USE="oss xv jpeg nls mitshm gif mozilla png truetype gnome-libs gdbm berkdb slang arts tcltk 
java ruby tcpd libwww ssl esd imlib oggvorbis qt motif readline -gpm X gtk gnome kde alsa cdr 
dvd opengl mikmod pam -pcmcia perl python sdl tetex ppc" 
COMPILER="gcc3" 
CHOST="powerpc-unknown-linux-gnu" 
CFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -fsigned-char" 
CXXFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -fsigned-char" 
ACCEPT_KEYWORDS="ppc" 
MAKEOPTS="" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
FEATURES="ccache" 
 
 
Comment 3 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 03:56:10 UTC
reproduceable with kde3.1.2, qt3.1.2 and karbon14 0.0.1
Comment 4 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 04:32:00 UTC
also reported on mandrake ppc lists and on koffice list. 

the following code in gdk-pixbuf-xlibrgb.c displays the error:

#if G_BYTE_ORDER == G_BIG_ENDIAN 
 if (((char *)byte_order)[0] == 1) { 
   printf ("xlib_rgb_init: compiled for big endian, but this is a little endian machine.\n\n");
   exit(1);
 }
#else 
  if (((char *)byte_order)[0] != 1) {
   printf ("xlib_rgb_init: compiled for little endian, but this is a big endian machine");
   exit(1);
  }
#endif

imho G_BYTE_ORDER should be G_BIG_ENDIAN , but it isn't. G_BYTE_ORDER gets set by glib autoconf (WORDS_BIGENDIAN triggers G_BYTE_ORDER  G_BIG_ENDIAN)

I'm going to have a look at glib - investigate if that is causing the issue.
Comment 5 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 04:55:12 UTC
the offending code is in the karbon/render subdirectory of koffice. I'm looking at koffice betas to see if karbon fixed its endianness todos
Comment 6 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 05:08:53 UTC
k, found the offending code. ENDIANNESS was hard coded to LITTLE and autodetection code was in todo. 

in koffice 1.3_beta, the autodetection code exists. 

If wanted I can ask for karbon from koffice 1.3 to be copied into koffice 1.2.
I'm going to unmask koffice 1.3 unstable on ppc. 

let me know if you would like to have it backported. The offending code is in karbon/render/xrgbrender/gdk-pixbuf-xlib-private.h
patch is attached - but not applied in portage as karbon in koffice 1.3 has not only this changed and I fear further borkage. This is a 0.0.1 release anyway :-)
Comment 7 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 05:17:27 UTC
Created attachment 14505 [details, diff]
Patch to the offending code

Determines ENDIANNESS instead of hardcoding it. Not applied in portage as 1.3
beta already has this code