Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356617 - media-sound/alsa-driver-9999 fails to compile because of failing patch
Summary: media-sound/alsa-driver-9999 fails to compile because of failing patch
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All 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: PMASKED
Depends on: 350164
Blocks:
  Show dependency tree
 
Reported: 2011-02-26 20:09 UTC by Miroslav Šulc
Modified: 2012-03-18 12:23 UTC (History)
2 users (show)

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


Attachments
Updated patch (soc-core.patch,1.56 KB, patch)
2011-03-02 01:36 UTC, Dmitry
Details | Diff
Ebuild for patchwork (alsa-driver-9999.ebuild,7.04 KB, text/plain)
2011-03-02 01:41 UTC, Dmitry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Šulc gentoo-dev 2011-02-26 20:09:43 UTC
make[2]: Entering directory `/var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/soc'
copying file alsa-kernel/soc/soc-core.c
patching file soc-core.c
Hunk #2 succeeded at 1547 with fuzz 1 (offset 46 lines).
Hunk #3 FAILED at 1973.
1 out of 3 hunks FAILED -- saving rejects to file soc-core.c.rej
make[2]: *** [soc-core.c] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/soc'
make[1]: *** [dep] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver'
make: *** [include/sndversions.h] Error 2
emake failed
 * ERROR: media-sound/alsa-driver-9999 failed (compile phase):
 *   Make Failed
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 4740:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="$(raw-ldflags)" HOSTCC="$(tc-getBUILD_CC)" CC="$(tc-getCC)" || die "Make Failed";


Portage 2.1.9.41 (default/linux/amd64/10.0/desktop, gcc-4.5.2, glibc-2.13-r1, 2.6.37-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.37-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 26 Feb 2011 18:15:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10 AdobeFlash-10.1 dlj-1.1 skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/maven-bin-3.0/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="cs_CZ.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="cs"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/sunrise /var/lib/layman/pro-audio /var/lib/layman/x11 /var/lib/layman/java-overlay /home/fordfrog/src/gentoo/fordfrog-overlay /home/fordfrog/src/gentoo/java-overlay /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 audacious bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cvs cxx dbus device-mapper dhcpcd dia dri dts dvb dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gcj gdbm gdu gif git glade gmplayer gphoto2 gpm gtk hddtemp icecast iconv id3tag inotify jack jackmidi jpeg jpeg2k ladspa lame laptop lash lcms libnotify libv4l libv4l2 lm_sensors mad mercurial midi mikmod mmx mng modules mp3 mp4 mpd mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly nsplugin ogg openal openexr opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session shout slang smp sndfile spell sse sse2 ssl ssse3 startup-notification stream subversion svg sysfs theora tiff truetype udev unicode usb v4l v4l2 vhosts vorbis wavpack webkit wifi wmf x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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 cgi cgid 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs" NETBEANS_MODULES="*" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" XFCE_PLUGINS="brightness logout menu trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-sound/alsa-driver-9999 was built with the following:
USE="(multilib) -debug -oss" ALSA_CARDS="hda-intel -ad1816a -ad1848 -ad1848-lib -ad1889 -adlib -ali5451 -als100 -als300 -als4000 -aoa -aoa-fabric-layout -aoa-onyx -aoa-soundbus -aoa-soundbus-i2s -aoa-tas -aoa-toonie -armaaci -asihpi -at91-soc -at91-soc-eti-b1-wm8731 -atiixp -atiixp-modem -au1x00 -au8810 -au8820 -au8830 -azt2320 -azt3328 -bt87x -ca0106 -cmi8330 -cmipci -cs4231 -cs4232 -cs4236 -cs4281 -cs46xx -cs5535audio -darla20 -darla24 -dt019x -dummy -echo3g -emu10k1 -emu10k1x -ens1370 -ens1371 -es1688 -es18xx -es1938 -es1968 -es968 -fm801 -gina20 -gina24 -gusclassic -gusextreme -gusmax -harmony -hdsp -hdspm -hifier -hpet -hrtimer -ice1712 -ice1724 -indigo -indigodj -indigoio -intel8x0 -intel8x0m -interwave -interwave-stb -korg1212 -layla20 -layla24 -loopback -maestro3 -mia -miro -mixart -ml403-ac97cr -mona -mpu401 -msnd-pinnacle -mtpav -mts64 -nm256 -opl3sa2 -opti92x-ad1848 -opti92x-cs4231 -opti93x -oxygen -pc98-cs4232 -pcsp -pcxhr -pdaudiocf -pdplus -portman2x4 -powermac -pxa2xx-i2sound -pxa2xx-soc -pxa2xx-soc-corgi -pxa2xx-soc-e800 -pxa2xx-soc-poodle -pxa2xx-soc-spitz -pxa2xx-soc-tosa -riptide -rme32 -rme96 -rme9652 -rtctimer -s3c2410 -sa11xx-uda1341 -sb16 -sb8 -sbawe -seq-dummy -serial-u16550 -sgalaxy -sis7019 -soc -sonicvibes -sscape -sun-amd7930 -sun-cs4231 -sun-dbri -trident -usb-audio -usb-us122l -usb-usx2y -via82xx -via82xx-modem -virmidi -virtuoso -vx222 -vxpocket -wavefront -ymfpci"
CFLAGS="-march=native -O2 -pipe -I/usr/src/linux/arch/x86/include"
CXXFLAGS="-march=native -O2 -pipe -I/usr/src/linux/arch/x86/include"
Comment 1 Dmitry 2011-03-02 01:34:19 UTC
(In reply to comment #0)
I've tried to correct the patch (see Attachment). Now the patch applies successfully but the compilation process stops with an error again:

...
make[2]: Entering directory `/var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/soc'
copying file /var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/alsa-kernel/alsa-kernel/soc/soc-core.c
cp: невозможно выполнить stat для «/var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/alsa-kernel/alsa-kernel/soc/soc-core.c»: Нет такого файла или каталога
...

The problem is here ("/alsa-kernel/alsa-kernel/")

The problem seems to be in ${WORKDIR}/alsa-driver/utils/patch-alsa which is used to "copy a file from alsa-kernel tree and apply a patch":

----------------------------------
#!/bin/sh
#
# copy a file from alsa-kernel tree and apply a patch
#

dst="$1"
pat=`echo $dst | sed -e 's/.c$/.patch/'`

case $dst in
/*)
        xtmp=`dirname $dst | sed -e s@/acore@/core@ -e s@alsa-driver/@alsa-driver/alsa-kernel/@`/`basename $dst`
        echo copying file $xtmp
        cp -v $xtmp $dst || exit 1
        patch -p0 $dst $pat || { rm $dst; exit 1; }
        ;;
*)
        curd=`/bin/pwd`
        MODCURDIR=`echo $curd | sed -e s@$SND_TOPDIR/@@`
        xtmp=`echo $MODCURDIR | sed -e 's/^acore/core/'`/$dst
        echo copying file alsa-kernel/$xtmp
        cp $SND_TOPDIR/alsa-kernel/$xtmp $@ || exit 1
        patch -p0 -i $pat || { rm $dst; exit 1; }
        ;;
esac
exit 0
---------------------------

Specifically in this section:
case $dst in
/*)
        xtmp=`dirname $dst | sed -e s@/acore@/core@ -e s@alsa-driver/@alsa-driver/alsa-kernel/@`/`basename $dst`
        echo copying file $xtmp
        cp -v $xtmp $dst || exit 1
        patch -p0 $dst $pat || { rm $dst; exit 1; }
        ;;

I can't understand this solution. $dst contains a full path to "alsa-kernel tree", namely (in this case) /var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/alsa-kernel/soc/soc-core.c. I believe we should just copy in to /var/tmp/portage/media-sound/alsa-driver-9999/work/alsa-driver/soc/soc-core.c and apply patch... Any ideas about this code?! Maybe I'm missing something?
Comment 2 Dmitry 2011-03-02 01:36:27 UTC
Created attachment 264321 [details, diff]
Updated patch
Comment 3 Dmitry 2011-03-02 01:41:11 UTC
Created attachment 264323 [details]
Ebuild for patchwork

Added a few strings to perform patchwork:

--- alsa-driver-9999.ebuild     2011-03-02 04:37:10.000000000 +0300
+++ /usr/portage/media-sound/alsa-driver/alsa-driver-9999.ebuild        2010-06-06 05:01:52.000000000 +0400
@@ -111,9 +111,6 @@
        convert_to_m "${S}/Makefile"
        sed -i -e 's:\(.*depmod\):#\1:' "${S}/Makefile"
 
-       # cp -f "${FILESDIR}/patch-alsa" "${WORKDIR}/alsa-driver/utils/patch-alsa"
-       cp -f "${FILESDIR}/soc-core.patch" "${WORKDIR}/alsa-driver/alsa-kernel/soc/"
-
        cd "${S}"
        emake ALSAKERNELDIR="${S}/alsa-kernel" all-deps
        eaclocal
Comment 4 Miroslav Šulc gentoo-dev 2011-03-08 18:23:17 UTC
just tried to build latest alsa-driver-9999 against sys-kernel/gentoo-sources-2.6.37-r1 and it works fine so the problem is gone, at least for me
Comment 5 Dmitry 2012-02-24 20:04:30 UTC
Indeed, Miroslav. The problem has gone.
Comment 6 Pacho Ramos gentoo-dev 2012-03-18 12:23:42 UTC
dropped