Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235599 - dev-libs/libx86-0.99 Fails when building
Summary: dev-libs/libx86-0.99 Fails when building
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 236933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-24 11:25 UTC by Dave N
Modified: 2008-09-08 19:07 UTC (History)
8 users (show)

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


Attachments
emerge -uDNavt world - Where its being pulled in and USE flags (x,1.07 KB, text/plain)
2008-08-24 11:27 UTC, Dave N
Details
patch for linux headers 2.6.26 (lrmi-linux-headers-2.6.26.patch,430 bytes, patch)
2008-08-27 10:07 UTC, Daniel C
Details | Diff
Patch for libx86-0.99 (libx86-0.99-ifmask.patch,584 bytes, patch)
2008-09-06 10:40 UTC, Junki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave N 2008-08-24 11:25:37 UTC
dev-libs/libx86-0.99 fails when compiling

Reproducible: Always

Steps to Reproduce:
1. emerge dev-libs/libx86
2. Wait..
3. Fail.

Actual Results:  
>>> Emerging (1 of 5) dev-libs/libx86-0.99
 * libx86-0.99.tar.gz RMD160 SHA1 SHA256 size ;-) ...                    [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
>>> Unpacking libx86-0.99.tar.gz to /var/tmp/portage/dev-libs/libx86-0.99/work
 * Applying libx86-0.99-build.patch ...                                   [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/dev-libs/libx86-0.99/work/libx86-0.99 ...
make LIBRARY=static static
make[1]: Entering directory `/var/tmp/portage/dev-libs/libx86-0.99/work/libx86-0.99'
cc -march=prescott -O2 -pipe -fomit-frame-pointer   -c -o x86-common.o x86-common.c
cc -march=prescott -O2 -pipe -fomit-frame-pointer   -c -o lrmi.o lrmi.c
lrmi.c: In function 'set_regs':
lrmi.c:191: error: 'IF_MASK' undeclared (first use in this function)
lrmi.c:191: error: (Each undeclared identifier is reported only once
lrmi.c:191: error: for each function it appears in.)
lrmi.c:191: error: 'IOPL_MASK' undeclared (first use in this function)
lrmi.c: In function 'run_vm86':
lrmi.c:613: error: 'VIF_MASK' undeclared (first use in this function)
lrmi.c:613: error: 'TF_MASK' undeclared (first use in this function)
lrmi.c: In function 'LRMI_int':
lrmi.c:840: error: 'IF_MASK' undeclared (first use in this function)
lrmi.c:840: error: 'IOPL_MASK' undeclared (first use in this function)
make[1]: *** [lrmi.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libx86-0.99/work/libx86-0.99'
make: *** [default] Error 2
 * 
 * ERROR: dev-libs/libx86-0.99 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2045:  Called die
 * The specific snippet of code:
 *       emake ${ARGS} || die
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/libx86-0.99/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libx86-0.99/temp/environment'.
 * 

 * Messages for package dev-libs/libx86-0.99:

 * 
 * ERROR: dev-libs/libx86-0.99 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2045:  Called die
 * The specific snippet of code:
 *       emake ${ARGS} || die
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/libx86-0.99/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libx86-0.99/temp/environment'.
 * 


Expected Results:  
Merged correctly

sophie dave # emerge --info 
Portage 2.2_rc8 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.26-gentoo-r1-i686-Intel-R-_Core-TM-2_Duo_CPU_T5250_@_1.50GHz-with-glibc2.0
Timestamp of tree: Sun, 24 Aug 2008 01:16:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo "
LANG="C"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa avahi bash-completion berkdb binary-drivers branding bzip2 cairo cdaudio cdda cdr cdrom cli cpudetection cracklib crypt cups dbus directfb divx dri dvb dvbplayer dvbsetup dvd dvdr dvdread eds emboss encode evo fam fat fbcon fbcondecor fbdev fbsplash ffmpeg firefox fortran ftp gdbm gdm gif gmail gnome gnome-keyring gnome-print gphoto2 gpm grub gstreamer gtk hal iconv ipod ipw4965 isdnlog jpeg kerberos lame laptop ldap libnotify mad md5sum midi mikmod mp2 mp3 mp4 mpeg mpeg2 mplayer msn mudflap nautilus ncurses nls nptl nptlonly ntfs offensive ogg openal opengl openmp pam pcre pdf perl png podcast ppds pppd python quicktime readline reflection rss samba sdl session spell spl sqlite sqlite3 sse ssl ssse3 startup-notification svg sysfs tcpd tiff truetype twolame unicode upnp usb v4l v4l2 vnc vorbis webkit wifi win32codecs x11vnc x86 xinerama xml xorg xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard synaptics mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Dave N 2008-08-24 11:27:07 UTC
Created attachment 163700 [details]
emerge -uDNavt world - Where its being pulled in and USE flags
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-25 00:49:11 UTC
Looks like bug #235495 (but isn't quite).
Comment 3 Daniel C 2008-08-27 10:07:32 UTC
Created attachment 163877 [details, diff]
patch for linux headers 2.6.26

this patch fixes the definition of flags needed for compiling lrmi.c
Comment 4 Byron Hood 2008-09-01 23:18:29 UTC
(In reply to comment #3)
> Created an attachment (id=163877) [edit]
> patch for linux headers 2.6.26
> 
> this patch fixes the definition of flags needed for compiling lrmi.c
> 
How/where do I insert this patch?

Thank you!
Comment 5 Denis Pesotsky 2008-09-03 15:22:37 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=163877) [edit]
> > patch for linux headers 2.6.26
> > 
> > this patch fixes the definition of flags needed for compiling lrmi.c
> > 
> How/where do I insert this patch?
> 
> Thank you!
> 

1) Create local overlay.
echo PORTDIR_OVERLAY="/usr/local/portage/my" >> /etc/make.conf

2) Create local overlay folder, copy there linux-headers from portage.
mkdir -p /usr/local/portage/my/sys-kernel
cp -rfp /usr/portage/sys-kernel/linux-headers/ /usr/local/portage/my

3) Download patch.
whet 'http://bugs.gentoo.org/attachment.cgi?id=163877' -i /usr/local/portage/my/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch"

4) Modify last ebuild there.
nano /usr/local/portage/my/sys-kernel/linux-headers/linux-headers-2.6.26.ebuild
Add following into "src_unpack()" block (after line "[[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}")
epatch "${FILESDIR}"/lrmi-linux-headers-2.6.26.patch"

5) Generate manifes
ebuild /usr/local/portage/my/sys-kernel/linux-headers/linux-headers-2.6.26.ebuild digest

6) emerge -au linux-headers
Comment 6 Byron Hood 2008-09-03 15:43:46 UTC
I appreciate the help, but unfortunately this fails at the patching stage of the emerge process.

My linux-headers-2.6.26.ebuild file:
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/linux-headers-2.6.26.ebuild,v 1.1 2008/08/20 02:57:03 vapier Exp $

ETYPE="headers"
H_SUPPORTEDARCH="alpha amd64 arm cris hppa m68k mips ia64 ppc ppc64 s390 sh sparc x86"
inherit kernel-2
detect_version

PATCH_VER="1"
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.lzma"
[[ -n ${PATCH_VER} ]] && SRC_URI="${SRC_URI} mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.lzma"

KEYWORDS="-* ~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"

DEPEND="app-arch/lzma-utils"
RDEPEND=""

S=${WORKDIR}/gentoo-headers-base-${PV}

src_unpack() {
	unpack ${A}
	cd "${S}"
	[[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
	epatch "${FILESDIR}/lrmi-linux-headers-2.6.26.patch"
}

src_install() {
	kernel-2_src_install
	cd "${D}"
	egrep -r \
		-e '[[:space:]](asm|volatile|inline)[[:space:](]' \
		-e '\<([us](8|16|32|64))\>' \
		.
	headers___fix $(find -type f)
}

src_test() {
	emake -j1 ARCH=$(tc-arch-kernel) headers_check || die
}


The failure log:
***** lrmi-linux-headers-2.6.26.patch *****

===========================================

PATCH COMMAND:	 patch -p0 -g0 -E --no-backup-if-mismatch < /usr/local/portage/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch

===========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- old/lrmi.c	2006-10-30 21:10:16.000000000 +0100
|+++ new/lrmi.c	2008-08-27 11:32:40.000000000 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:	 patch -p1 -g0 -E --no-backup-if-mismatch < /usr/local/portage/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch

===========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- old/lrmi.c	2006-10-30 21:10:16.000000000 +0100
|+++ new/lrmi.c	2008-08-27 11:32:40.000000000 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:	 patch -p2 -g0 -E --no-backup-if-mismatch < /usr/local/portage/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch

===========================================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- old/lrmi.c	2006-10-30 21:10:16.000000000 +0100
|+++ new/lrmi.c	2008-08-27 11:32:40.000000000 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:	 patch -p3 -g0 -E --no-backup-if-mismatch < /usr/local/portage/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch

===========================================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- old/lrmi.c	2006-10-30 21:10:16.000000000 +0100
|+++ new/lrmi.c	2008-08-27 11:32:40.000000000 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:	 patch -p4 -g0 -E --no-backup-if-mismatch < /usr/local/portage/sys-kernel/linux-headers/files/lrmi-linux-headers-2.6.26.patch

===========================================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- old/lrmi.c	2006-10-30 21:10:16.000000000 +0100
|+++ new/lrmi.c	2008-08-27 11:32:40.000000000 +0200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Comment 7 Keith Harrison 2008-09-03 15:55:29 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=163877) [edit]
> > patch for linux headers 2.6.26
> > 
> > this patch fixes the definition of flags needed for compiling lrmi.c
> > 
> How/where do I insert this patch?
> 
> Thank you!
> 

I just downgraded to the latest 2.6.25 linux headers then libx86 compiled and installed fine.  It seemed easier than patching and/or doing an overlay.
Comment 8 Denis Pesotsky 2008-09-03 18:14:13 UTC
oh, my bad, remove the lien that y've added
Looks like that
[[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch
"${WORKDIR}"/${PV}
applies all patches that ar in Files dir and have postfix with same version typed.
Comment 9 Byron Hood 2008-09-04 01:31:26 UTC
The new linux-headers installed properly but libx86 still did not compile. I gave up and found a way around the problem by installing a lower version of a different package that doesn't depend on this libx86.

Thank you for your help, though!
Comment 10 Junki 2008-09-06 10:40:32 UTC
Created attachment 164703 [details, diff]
Patch for libx86-0.99
Comment 11 Junki 2008-09-06 10:42:24 UTC
Comment on attachment 164703 [details, diff]
Patch for libx86-0.99

I've added a new patch, based on previous one. But this time you need to patch libx86 and not linux-headers. Tested and seems to work.
Comment 12 Junki 2008-09-06 10:46:55 UTC
Sorry for the triple-reply, but I've found that there is a new version of the package (libx86-1.1), which resolve Makefile's bug. The ebuild is the same, apart remove old patch and add new one for IF_MASK issue. vbetool compiles fine also with this new package.
Comment 13 Denis Pesotsky 2008-09-06 14:34:20 UTC
Patch works like a charm with libx86-1.1, thanks!
Comment 14 Olivier Huber 2008-09-06 17:39:06 UTC
darkside: The patch provided by Junki seems ok (I have tested it w/ 0.99 and 1.1), can you please commit it. Thanks
Comment 15 Ulrich Müller gentoo-dev 2008-09-06 20:46:41 UTC
> Created an attachment (id=164703) [edit]
> Patch for libx86-0.99

This looks good; applied to 0.99 and 1.1.
Thank you for providing the patch.
Comment 16 Ulrich Müller gentoo-dev 2008-09-07 09:05:26 UTC
*** Bug 236933 has been marked as a duplicate of this bug. ***
Comment 17 Byron Hood 2008-09-08 17:34:55 UTC
libx86 compiles for me now too. THANK YOU people who fixed this!!