Summary: | app-misc/screen-4.0.3 with sys-libs/uclibc-0.9.28.1 - In file included from screen.h:42, from screen.c:82: sched.h:26: error: redefinition of 'struct event' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Clemmitt M. Sigler <cmsigler> |
Component: | Current packages | Assignee: | Sven Wegener <swegener> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cristi.magherusan, danny, gentoobugs, napalmllama, pacho, shell-tools, tl, vapier |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
patch to fix screen fixed ebuild sorry I attached the wrong patch before Just fix file paths... Wrapping all local headers sched.h patch saved to files/screen-4.0.3-sched.patch |
Description
Clemmitt M. Sigler
2007-02-25 02:22:52 UTC
same here with uClibc-0.9.28.1 - not tested with sys-libs/0.9.28-r2 Portage 2.1.2.2 (uclibc/x86, gcc-4.1.1, uclibc-0.9.28.1-r0, 2.6.18-gentoo-r6 i686) ================================================================= System uname: 2.6.18-gentoo-r6 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ Gentoo Base System release 1.12.9 Timestamp of tree: Fri, 16 Mar 2007 19:50:01 +0000 ccache version 2.4 [enabled] dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.61 sys-devel/automake: 1.6.3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-march=i686 -Os -pipe" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=i686 -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-z,relro" MAKEOPTS="-j2" PKGDIR="/packages/uclibc" 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 --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/mesa-cvs" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa bitmap-fonts cli cracklib dri fbcon jpeg midi minimal mmx mp3 ncurses pcre png readline reflection sdl session spl sse truetype-fonts type1-fonts uclibc x86 xine xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga i810" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Created attachment 113534 [details]
build.log
A friend of mine, just fixed the bug, I've attached the patch and the fixed ebuild. Created attachment 113797 [details, diff]
patch to fix screen
Created attachment 113798 [details]
fixed ebuild
Created attachment 113800 [details, diff]
sorry I attached the wrong patch before
I attached the wrong patch before, this one works
not a bug in uClibc ... slightly different header behavior from uClibc triggers this bug in screen itself, but with one tweak to glibc, i can make it bomb there the basic problem is that screen does not wrap any of its local headers in '#ifdef FOO...' logic to prevent problems where the same header is included more than once the reason it fails on uClibc is because screen has a local file called 'sched.h' and it compiles with -I. ... uClibc happens to include pthread.h at one point which has an '#include <sched.h>' ... because of the -I., the local sched.h is used instead of the system one then when screen.c pulls in screen.h which pulls in sched.h, we get the redefine error solution here i think is to add proper ifdef protection to all of screen's local headers ... so in sched.h: #ifndef _SCREEN_SCHED_H_ #define _SCREEN_SCHED_H_ ... #endif Created attachment 135740 [details, diff]
Just fix file paths...
Wrong file paths in diff header, so patch can't find them...
Fixed.
I am seeing exactly the same issue compiling against uclibc 0.9.28.3 on a PPC device. The build.log is identical in respect to where it fails - same struct, same error. Created attachment 146294 [details, diff]
Wrapping all local headers
As SpanKY mentioned no one local header in screen was not wrapped by defined "_SCREEN_*"... But now it will, I hope.
And thanks to Jens for pointing at 'sys/types.h' header.
It's still broken as of August 18'th. Is there any chance for inclusion of the fix in the tree? screen compiles and works fine on my NSLU2 with screen-4.0.3-wrap-local-headers.patch. Would be quite meaningful to at least include the patch for armeb-softfloat-linux-uclibc. This is broken for my as well on my NSLU2 with uclibc. I'm trying the patch now. Created attachment 178365 [details, diff]
sched.h patch saved to files/screen-4.0.3-sched.patch
together with an ebuild change @screen-4.0.3.ebuild +66:
# uclibc patch
epatch "${FILESDIR}"/screen-4.0.3-sched.patch
and then do:
ebuild screen-4.0.3.ebuild manifest
Still valid with 4.0.3-r7? This version of screen is no more available in Portage. Please try again with the latest version available (4.3.1) and feel free to reopen this bug if you still experience it. the build is still broken, but not exactly in this way. filed bug 562752. |