Bug 113429

Summary: compile error: Both BIG_ENDIAN and LITLLE_ENDIAN defined! in endian.h
Product: [Applications] amarok Reporter: Christoph Mockenhaupt <amarok>
Component: generalAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: flameeyes
Priority: NOR    
Version First Reported In: 1.3.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christoph Mockenhaupt 2005-09-27 12:35:23 UTC
Version:           1.3.2 (using KDE KDE 3.4.2)
Installed from:    Gentoo Packages
Compiler:          gcc-3.4.4 ppc
OS:                Linux

During compiling amarok-1.3.2:

In file included from /usr/include/endian.h:38,
                 from /usr/include/bits/waitstatus.h:65,
                 from /usr/include/stdlib.h:43,
                 from hsphook.cpp:17:
/usr/include/bits/endian.h:27:4: #error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
make[6]: *** [hsphook.lo] Fehler 1
make[6]: *** Warte auf noch nicht beendete Prozesse...
In file included from /usr/include/endian.h:38,
                 from /usr/include/sys/types.h:213,
                 from /usr/include/sys/param.h:42,
                 from ./helix-include/common/include/hxtypes.h:343,
                 from iids.cpp:17:
/usr/include/bits/endian.h:27:4: #error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
make[6]: *** [iids.lo] Fehler 1
In file included from /usr/include/endian.h:38,
                 from /usr/include/sys/types.h:213,
                 from /usr/include/sys/param.h:42,
                 from ./helix-include/common/include/hxtypes.h:343,
                 from ./helix-include/common/include/hxcom.h:17,
                 from ./helix-include/common/include/hxengin.h:17,
                 from ./helix-include/common/include/hxcomm.h:17,
                 from hsperror.cpp:13:
/usr/include/bits/endian.h:27:4: #error Both BIG_ENDIAN and LITTLE_ENDIAN defined!
make[6]: *** [hsperror.lo] Fehler 1
make[5]: *** [all-recursive] Fehler 1
make[5]: Leaving directory `/var/tmp/portage/amarok-1.3.2-r1/work/amarok-1.3.2/amarok/src/engine/helix'
make[4]: *** [all-recursive] Fehler 1
make[4]: Leaving directory `/var/tmp/portage/amarok-1.3.2-r1/work/amarok-1.3.2/amarok/src/engine'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/var/tmp/portage/amarok-1.3.2-r1/work/amarok-1.3.2/amarok/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/var/tmp/portage/amarok-1.3.2-r1/work/amarok-1.3.2/amarok'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/amarok-1.3.2-r1/work/amarok-1.3.2'
make: *** [all] Fehler 2

I have a iBook G3. In include/bits/endian.h:
/* PowerPC can be little or big endian.  Hopefully gcc will know...  */
Obviously gcc does not know :-) This error does not occure with amarok-1.2.4. (is there helix support at all?)

LITTLE_ENDIAN is defined in helixdefines.h without check if BIG_ENDIAN is defined already, so both are defined on my system.
Adding ifndef BIG_ENDIAN before ifndef LITTLE_ENDIAN solves the copile problem.
But Helix could not be initialized as an outputplugin... don't know if this is a different error or belongs to endianes.
I don't need Helix, though, so this solution is just perfect for me.

Strange that nobody else seems to have this problem...
Comment 1 Lars Weiler 2005-10-01 02:20:14 UTC
I looked a little bit deeper into the problem (same failure on my ppc).  There are two faults: 1) the problem with the helix-libs don't understand a bi-endian-machine and 2) amarok's configure script checks for the existance of helix- or real-libs and enable helix-support even when you run it --without-helix.

Best and fastest solution: Fix amarok's configure script.
Comment 2 Lars Weiler 2005-10-13 10:58:00 UTC
amarok-1.3.3 is fixed.  You may close this bug.
Comment 3 Mark Kretschmann 2005-10-13 11:10:31 UTC
*** Bug has been marked as fixed ***.