Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153428 - gdk error, compiled for big endian, machine is little endian
Summary: gdk error, compiled for big endian, machine is little endian
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-30 04:03 UTC by slavko glamocanin
Modified: 2007-08-02 04:54 UTC (History)
1 user (show)

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


Attachments
xorg 7.1 - modified file (Xarch.h,2.63 KB, text/plain)
2006-10-30 04:05 UTC, slavko glamocanin
Details
the Xarch diff file (Xarch.h.diff,908 bytes, patch)
2006-11-05 11:05 UTC, slavko glamocanin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description slavko glamocanin 2006-10-30 04:03:09 UTC
I have an AMD64 installation (freshly installed gentoo 2006.1), for which i emerged java and azureus. i got the beforementioned endiannes error and found a possible explanation on : http://bugs.scribus.net/view.php?id=1316 . after that i edited /usr/include/X11/Xarch.h and recompiled gtk+ which fixed the error. in Xarch.h i removed some ifdef and would supply it with this bug report if i knew how:)



Portage 2.1.2_rc1-r1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r1 x86_64 AMD Sempron(tm) Processor 3400+
Gentoo Base System version 1.12.5
Last Sync: Sun, 29 Oct 2006 11:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="sl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi aiglx akode amd64 apache2 arts avi berkdb bitmap-fonts cdr cli cracklib dbus dlloader dri dv dvd dvdr dvdread eds elibc_glibc emboss encode extrafilters ffmpeg firefox fortran gd gif gtk gtk2 hal iconv ieee1394 input_devices_evdev input_devices_keyboard input_devices_mouse jack java jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux libg++ linguas_sl lm_sensors lzo mad mikmod mjpeg mmap mp3 mpeg mplayer mpm-prefork mysql network nls nowebdav nptl nptlonly ogg opengl pcre pdf pdflib php png ppds python qt3 qt4 quicktime rdesktop readline reflection samba sdl session spell spl sql ssl subversion tga theora truetype truetype-fonts type1-fonts udev unicode userland_GNU v4l v4l2 video_cards_fglrx video_cards_radeon video_cards_v4l vorbis wxwindows xcomposite xine xinerama xml xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 slavko glamocanin 2006-10-30 04:05:15 UTC
Created attachment 100784 [details]
xorg 7.1 - modified file
Comment 2 Joshua Baergen (RETIRED) gentoo-dev 2006-11-05 09:21:11 UTC
What changes did you make to Xarch.h?  A diff would be a bit more useful.
Comment 3 slavko glamocanin 2006-11-05 11:03:40 UTC
(In reply to comment #2)
> What changes did you make to Xarch.h?  A diff would be a bit more useful.
> 

i removed some architecture stuff not related to mine (which is amd64).

i think that this problem is handled with poor style and somehow some other arch gets precedence over amd64 for endiannes. its really hard to see anything in this coding /ifdef/ style, but ok, i guess its the easiest to handle it this way.

i will also add the diff you requested.
Comment 4 slavko glamocanin 2006-11-05 11:04:16 UTC
(In reply to comment #2)
> What changes did you make to Xarch.h?  A diff would be a bit more useful.
> 

i removed some architecture stuff not related to mine (which is amd64).

i think that this problem is handled with poor style and somehow some other arch gets precedence over amd64 for endiannes. its really hard to see anything in this coding /ifdef/ style, but ok, i guess its the easiest to handle it this way.

i will also add the diff you requested.

im not sure but the problem might be here:

> #if defined(__QNXNTO__)
> #if defined(i386) || defined(__i386__) || defined(__x86__)
> #define BYTE_ORDER LITTLE_ENDIAN
> #else
> #define BYTE_ORDER BIG_ENDIAN
> #endif
> #endif 

as i see it, the 386/x86 checks are for the x86 arch (x86_64 is obviously missing), but i dont think QNXNTO is defined.

Comment 5 slavko glamocanin 2006-11-05 11:05:35 UTC
Created attachment 101287 [details, diff]
the Xarch diff file

this works if you have and x86 linux machine but surely breaks some archs. well it works for me:)
Comment 6 Joshua Baergen (RETIRED) gentoo-dev 2006-11-05 11:52:30 UTC
I have an AMD64 install and I don't see this issue.  Perhaps there was something wacky with your configuration when you compiled gtk+ for the first time?  Can you use the default Xarch.h and see if you can reproduce this?
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-02 04:54:50 UTC
Please reopen when you respond to the above comment.