Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477276 - sys-devel/gdb-7.6 PATCH_VER="2" - In file included from ./common/linux-btrace.c:33:0: ./common/i386-cpuid.h:23:28: fatal error: i386-gcc-cpuid.h: No such file or directory
Summary: sys-devel/gdb-7.6 PATCH_VER="2" - In file included from ./common/linux-btrace...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 08:26 UTC by Another Mortal
Modified: 2013-08-15 18:32 UTC (History)
4 users (show)

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


Attachments
build.log (gdb-7.6_build.log,247.54 KB, text/x-log)
2013-07-19 12:26 UTC, Nikoli
Details
Transition from git diff to standard unified diff (10_all_gdb-7.6-cpuid.patch,110.77 KB, patch)
2013-08-13 21:26 UTC, Sven Eden
Details | Diff
Corrected transition from git diff to standard unified diff (10_all_gdb-7.6-cpuid.patch,21.58 KB, patch)
2013-08-13 21:35 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2013-07-18 08:26:26 UTC
I'm not sure why, but -at least on 2 different machines (both running with hardened/linux/amd64/selinux profile)- the shiny new 10_all_gdb-7.6-cpuid.patch added in gdb-7.6-patches-2.tar.xz does not actually create the gdb/common/i368-gcc-cpuid.h file from gdb/testsuite/gdb.arch/i386-cpuid.h as intended.  The patch is applied to the latter file instead.  No copying takes place..

As a result, the ebuild fails with the following error:
./common/i386-cpuid.h:23:28: fatal error: i386-gcc-cpuid.h: No such file or directory

Adding an explicit copy command in the ebuild after the patch is a simple, but non-elegant fix.   Normally, standard diff should be able to do this.  I wonder if this somehow comes from the 'diff --git' thingy..  -but, here I'm just guessing.

In any case, gdb-7.6 also builds fine with PATCH_VER=1; so, it's unclear to me why this new patch is even necessary, but that's another question.. 

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-18 13:03:29 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Nikoli 2013-07-19 12:25:47 UTC
Same problem here.

Portage 2.1.12.2 (hardened/linux/amd64, gcc-4.6.3, glibc-2.15-r3, 3.9.9-hardened x86_64)
=================================================================
                        System Settings
=================================================================
KiB Mem:    65825728 total,  55111828 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Fri, 19 Jul 2013 06:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7-avx -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi aes-ni alsa amd64 amr audiofile avx bash-completion bzip2 cairo caps cdda cddb cdio cdparanoia cdr celt cli consolekit cracklib crypt css cups cxx dbus djvu dri dts dv dvd dvdr encode exif fat ffmpeg flac fluidsynth fontconfig fortran gd geoip gif gimp gmp gnutls gphoto2 gpm graphviz gsm gstreamer gtk handbook hardened iconv icu id3tag idn ilbc imagemagick imap imlib ios ipod ipv6 jbig jpeg jpeg2k justify kde kipi lame laptop lcms libass libnotify libproxy libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext mng modplug modules mp3 mp4 mpeg mtp mudflap multilib musepack musicbrainz ncurses networkmanager nls nptl nptlonly ntfs ogg openal openexr opengl openmp opus pam pango pax_kernel pcre pdf pg-intdatetime phonon plasma pm-utils png policykit postscript qt3support qt4 quicktime rar raw readline reiserfs replaygain rtmp sasl scanner semantic-desktop session sid smp sndfile socks5 speex spell sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev udisks unicode upnp upower usb v4l v4l2 vcd vorbis vpx wavpack wayland webkit webp wifi wma wmf x264 xattr xcb xcomposite xface xinerama xml xmp xpm xscreensaver xv xvid xz zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="*" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer report-builder" LINGUAS="ru ru_RU en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600 modesetting vesa" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

sys-devel/gdb-7.5.1 was built with the following:
USE="client (multilib) nls python server (test) zlib -expat -multitarget -vanilla" ABI_X86="64"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 3 Nikoli 2013-07-19 12:26:42 UTC
Created attachment 353640 [details]
build.log
Comment 4 Evgeniy Dushistov 2013-07-26 23:02:26 UTC
Also see the same problem.
10_all_gdb-7.6-cpuid.patch contains 
.../i386-cpuid.h => common/i386-gcc-cpuid.h}

git apply can handle this, but patch from diffutils can not.

Can Mike Frysinger be added to "cc" list, because of he is author of 10_all_gdb-7.6-cpuid.patch as can I see?
Comment 5 Sven Eden 2013-08-13 21:26:58 UTC
Created attachment 355900 [details, diff]
Transition from git diff to standard unified diff

The part that should patch the file in results in:

> > patch --verbose --dry-run -p 1 -i ../patch/10_all_gdb-7.6-cpuid.patch
 
> Hmm...  The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |diff --git a/gdb/testsuite/gdb.arch/i386-cpuid.h b/gdb/common/i386-gcc-cpuid.h
> |similarity index 59%
> |rename from gdb/testsuite/gdb.arch/i386-cpuid.h
> |rename to gdb/common/i386-gcc-cpuid.h
> |index 084a083..e045ba8 100644
> |--- a/gdb/testsuite/gdb.arch/i386-cpuid.h
> |+++ b/gdb/common/i386-gcc-cpuid.h
> --------------------------

The only way to aplly this patch is git-apply:

> > git apply -v --stat ../patch/10_all_gdb-7.6-cpuid.patch 

> gdb/Makefile.in                     |    3 +
> gdb/common/i386-cpuid.h             |   63 ++++++++++++++++
> gdb/common/i386-gcc-cpuid.h         |  140 +++++++++++++++++++++++++++--------
> gdb/common/linux-btrace.c           |   41 +++-------
> gdb/testsuite/gdb.arch/i386-avx.c   |    2 -
> gdb/testsuite/gdb.arch/i386-avx.exp |    2 -
> gdb/testsuite/gdb.arch/i386-sse.c   |    5 +
> gdb/testsuite/gdb.arch/i386-sse.exp |    2 -
> 8 files changed, 188 insertions(+), 70 deletions(-)

However, when I try to apply the patch using "git apply --apply ../patch/10_all_gdb-7.6-cpuid.patch" I only get weird errors.

Therefore I have applied the patch, moved the file by hand and made a normal unified diff (attached).

After an
ebuild /usr/portage/sys-devel/gdb/gdb-7.6.ebuild unpack
I copied the unified diff over the offending one in the patch directory, and
ebuild /usr/portage/sys-devel/gdb/gdb-7.6.ebuild merge
worked as expected (patch got applied)
Comment 6 Sven Eden 2013-08-13 21:35:22 UTC
Created attachment 355902 [details, diff]
Corrected transition from git diff to standard unified diff

Sorry, I didn't see the ".orig" files. I daresay they are unneeded and are stripped from this version.
Comment 7 SpanKY gentoo-dev 2013-08-15 17:48:10 UTC
(In reply to Evgeniy Dushistov from comment #4)

newer patch can handle the rename fine.  but that's not something we want to rely on as not everyone uses that.
Comment 8 SpanKY gentoo-dev 2013-08-15 18:31:18 UTC
this version should work for all versions of patch:
http://sources.gentoo.org/gentoo/src/patchsets/gdb/7.6/10_all_gdb-7.6-cpuid.patch?r1=1.1&r2=1.2
Comment 9 SpanKY gentoo-dev 2013-08-15 18:32:45 UTC
should be all set now in the tree; thanks for the report!

Commit message: Redo cpuid patch to work with older versions of patch (and not require up-to-date git format support)
http://sources.gentoo.org/sys-devel/gdb/gdb-7.6.ebuild?r1=1.2&r2=1.3