Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82243 - [[ 2.6.10 headers ]] DirectFB fails to build on ppc
Summary: [[ 2.6.10 headers ]] DirectFB fails to build on ppc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
: 105465 115913 (view as bug list)
Depends on: 100703
Blocks:
  Show dependency tree
 
Reported: 2005-02-16 05:47 UTC by SpanKY
Modified: 2005-12-20 14:14 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2005-02-16 05:47:14 UTC
root@spyro 0 keyboard # pwd
/var/tmp/portage/DirectFB-0.9.21/work/DirectFB-0.9.21/inputdrivers/keyboard
root@spyro 0 keyboard # make
/bin/sh ../../libtool --mode=compile powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include-I../../lib              -I../../lib             -I../../src             -I../../systems  -D_REENTRANT  -I/usr/include/libmpeg3  -Wall -O3 -ffast-math -pipe -O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE  -Werror-implicit-function-declaration -c keyboard.c
 powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../lib -I../../lib -I../../src -I../../systems -D_REENTRANT -I/usr/include/libmpeg3 -Wall -O3 -ffast-math -pipe -O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -Werror-implicit-function-declaration -c keyboard.c  -fPIC -DPIC -o .libs/keyboard.o
In file included from /usr/include/linux/keyboard.h:4,
                 from keyboard.c:42:
/usr/include/linux/wait.h: In function `wait_on_bit':
/usr/include/linux/wait.h:376: error: implicit declaration of function `test_bit'
/usr/include/linux/wait.h: In function `wait_on_bit_lock':
/usr/include/linux/wait.h:400: error: implicit declaration of function `test_and_set_bit'
make: *** [keyboard.lo] Error 1

Portage 2.0.51.16 (default-linux/ppc/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.8.1 ppc)
=================================================================
System uname: 2.6.8.1 ppc 7455, altivec supported
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 15 2005, 00:10:55)]
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.9.4, 1.8.5-r3, 1.4_p6, 1.6.3, 1.7.9-r1
sys-devel/binutils:  2.15.90.0.3-r4
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.10
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks noauto noinfo sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X alsa altivec apm bitmap-fonts cdr crypt cups curl dedicated dga directfb dvd encode esd etheral f77 fam fbcon flac flash font-server fortran gd gd-external gdbm gif gps gtk gtk2 guile imagemagick imap imlib ipv6 joystick jpeg mad maildir mikmod mpeg mysql ncurses nls oggvorbis opengl pcmcia perl png pnp ppc python readline samba sdl snmp socks5 spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb xml xml2 xmms xosd xv zlib video_cards_radeon"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2005-02-16 12:34:26 UTC
Ok, if you pull out the two functions (test_bit, test_and_set_bit) from /usr/include/asm/bitops.h outside of the __KERNEL__ in that file do things work?
Comment 2 SpanKY gentoo-dev 2005-02-16 20:55:55 UTC
not quite ... test_bit() is safe to rip out and put outside of the __KERNEL__ #ifdef, but
test_and_set_bit() isnt ...

it utilizes SMP_MB and SMP_WMB which is defined near the top of bitops.h, so that
small chunk needs to be moved out too (which means the linux/config.h include has
to be moved out too) ...

that just leaves the PPC405_ERR77 define which is down in some other asm header file
and trying to get that to work is just ugly i think ...
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-02-17 03:43:05 UTC
For the PPC405_ERR77 thing try doing:

#define PPC405_ERR77(ra,rb)   dcbt    ra, rb;
Comment 4 SpanKY gentoo-dev 2005-02-17 19:51:35 UTC
if i use
#define PPC405_ERR77(ra,rb)   "dcbt    ra, rb;\n"

it works
Comment 5 Marcin Kurek 2005-05-26 02:18:35 UTC
Same problems with current 2.6.11 kernel header files. I was able to compile the 
DirectFB by commenting this two functions temporary but a normal fix would be 
nice :)
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-07-18 13:19:34 UTC
Fixed in 2.6.11-r2; patches_v = 4.
Comment 7 SpanKY gentoo-dev 2005-09-11 16:20:26 UTC
the 2.6.11-appCompat.patch patch in gentoo-headers-2.6.11-5 doesnt address this
issue ... it allows ffs() to be defined, but not the test bit funcs
Comment 8 SpanKY gentoo-dev 2005-09-11 16:20:32 UTC
*** Bug 105465 has been marked as a duplicate of this bug. ***
Comment 9 Santiago Gala 2005-10-31 04:57:38 UTC
Happens again since DirectFB 0.9.24 was promoted to ~ppc. I'm seeing exactly the
same error reported here.

My linux-headers (current, AFAICT) is 2.6.11-r2:

make[3]: Entering directory
`/var/tmp/portage/DirectFB-0.9.24/work/DirectFB-0.9.24/inputdrivers/keyboard'
/bin/sh ../../libtool --mode=compile powerpc-unknown-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I. -I../.. -I../../include              -I../../lib       
     -I../../lib             -I../../src             -I../../systems 
-D_REENTRANT  -I/usr/include/libmpeg3  -Wall -O3 -ffast-math -pipe -O2
-mcpu=7450 -maltivec -mabi=altivec -pipe -D_GNU_SOURCE 
-Werror-implicit-function-declaration -c keyboard.c
mkdir .libs
 powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I../../lib -I../../lib -I../../src -I../../systems -D_REENTRANT
-I/usr/include/libmpeg3 -Wall -O3 -ffast-math -pipe -O2 -mcpu=7450 -maltivec
-mabi=altivec -pipe -D_GNU_SOURCE -Werror-implicit-function-declaration -c
keyboard.c  -fPIC -DPIC -o .libs/keyboard.o
In file included from /usr/include/linux/keyboard.h:14,
                 from keyboard.c:42:
/usr/include/linux/wait.h: In function `wait_on_bit':
/usr/include/linux/wait.h:376: error: implicit declaration of function `test_bit'
/usr/include/linux/wait.h: In function `wait_on_bit_lock':
/usr/include/linux/wait.h:400: error: implicit declaration of function
`test_and_set_bit'
make[3]: *** [keyboard.lo] Error 1
make[3]: Leaving directory
`/var/tmp/portage/DirectFB-0.9.24/work/DirectFB-0.9.24/inputdrivers/keyboard'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/DirectFB-0.9.24/work/DirectFB-0.9.24/inputdrivers'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/DirectFB-0.9.24/work/DirectFB-0.9.24'
make: *** [all-recursive-am] Error 2

!!! ERROR: dev-libs/DirectFB-0.9.24 failed.
!!! Function src_compile, Line 94, Exitcode 2
...
Comment 10 Santiago Gala 2005-11-14 12:19:25 UTC
FYI, Emulating the current (2.6.13 or 14) kernel headers for this file (i.e.,
wrapping most of wait.h in #ifdef __kernel__) gets rid of the problem without
secondary effects here.
Comment 11 Tim Yamin (RETIRED) gentoo-dev 2005-11-18 15:46:59 UTC
Should be fixed in 2.6.11-r3, thanks!
Comment 12 SpanKY gentoo-dev 2005-12-18 12:19:53 UTC
*** Bug 115913 has been marked as a duplicate of this bug. ***
Comment 13 Radoslaw Dlugosz 2005-12-18 15:26:29 UTC
This is what happens after emerging linux-headers-2.6.11-r3 and trying to emerge DirectFB (I use Polish locale so Błąd=ERROR):
powerpc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-I../../lib -I../../lib -I../../src -I../../systems -D_REENTRANT
-I/usr/include/libmpeg3 -Wall -O3 -ffast-math -pipe -O2 -mcpu=750
-fno-strict-aliasing -pipe -D_GNU_SOURCE -Werror-implicit-function-declaration
-MT keyboard.lo -MD -MP -MF .deps/keyboard.Tpo -c keyboard.c  -fPIC -DPIC -o
.libs/keyboard.o
In file included from /usr/include/asm/byteorder.h:74,
                 from /usr/include/asm/bitops.h:10,
                 from /usr/include/linux/bitops.h:77,
                 from /usr/include/linux/thread_info.h:20,
                 from /usr/include/linux/spinlock.h:12,
                 from /usr/include/linux/wait.h:23,
                 from /usr/include/linux/keyboard.h:20,
                 from keyboard.c:42:
/usr/include/linux/byteorder/big_endian.h:44: error: parse error before
"__cpu_to_le64p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_le64p':
/usr/include/linux/byteorder/big_endian.h:46: error: `__le64' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h:46: error: (Each undeclared
identifier is reported only once
/usr/include/linux/byteorder/big_endian.h:46: error: for each function it
appears in.)
/usr/include/linux/byteorder/big_endian.h:46: error: parse error before
"__swab64p"
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:48: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__le64_to_cpup':
/usr/include/linux/byteorder/big_endian.h:50: error: `p' undeclared (first use
in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:53: error: parse error before
"__cpu_to_le32p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_le32p':
/usr/include/linux/byteorder/big_endian.h:55: error: `__le32' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h:55: error: parse error before
"__swab32p"
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:57: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__le32_to_cpup':
/usr/include/linux/byteorder/big_endian.h:59: error: `p' undeclared (first use
in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:61: error: parse error before
"__cpu_to_le16p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_le16p':
/usr/include/linux/byteorder/big_endian.h:63: error: `__le16' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h:63: error: parse error before
"__swab16p"
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:65: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__le16_to_cpup':
/usr/include/linux/byteorder/big_endian.h:67: error: `p' undeclared (first use
in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:70: error: parse error before
"__cpu_to_be64p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_be64p':
/usr/include/linux/byteorder/big_endian.h:72: error: `__be64' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:74: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__be64_to_cpup':
/usr/include/linux/byteorder/big_endian.h:76: error: `p' undeclared (first use
in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:79: error: parse error before
"__cpu_to_be32p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_be32p':
/usr/include/linux/byteorder/big_endian.h:81: error: `__be32' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:83: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__be32_to_cpup':
/usr/include/linux/byteorder/big_endian.h:85: error: `p' undeclared (first use
in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:87: error: parse error before
"__cpu_to_be16p"
/usr/include/linux/byteorder/big_endian.h: In function `__cpu_to_be16p':
/usr/include/linux/byteorder/big_endian.h:89: error: `__be16' undeclared (first
use in this function)
/usr/include/linux/byteorder/big_endian.h: At top level:
/usr/include/linux/byteorder/big_endian.h:91: error: parse error before '*'
token
/usr/include/linux/byteorder/big_endian.h: In function `__be16_to_cpup':
/usr/include/linux/byteorder/big_endian.h:93: error: `p' undeclared (first use
in this function)
make[3]: *** [keyboard.lo] Błąd 1
make[3]: Leaving directory
`/var/tmp/portage/DirectFB-0.9.22/work/DirectFB-0.9.22/inputdrivers/keyboard'
make[2]: *** [all-recursive] Błąd 1
make[2]: Leaving directory
`/var/tmp/portage/DirectFB-0.9.22/work/DirectFB-0.9.22/inputdrivers'
make[1]: *** [all-recursive] Błąd 1
make[1]: Leaving directory
`/var/tmp/portage/DirectFB-0.9.22/work/DirectFB-0.9.22'
make: *** [all] Błąd 2
Comment 14 SpanKY gentoo-dev 2005-12-19 12:04:31 UTC
upgrade your glibc ... you're using an outdated 2.3.4.xxxx version
Comment 15 Radoslaw Dlugosz 2005-12-20 14:14:17 UTC
(In reply to comment #14)
> upgrade your glibc ... you're using an outdated 2.3.4.xxxx version
> 
Because 2.3.5 doesn't support both nptl and linuxthread ;)
Anyway, thanks for your help. If I could use nptlonly I'd have a solution by now.