Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545398 - net-misc/usbip-3.19 fails due to use of -Wall -Werror -Wextra with harmless warning
Summary: net-misc/usbip-3.19 fails due to use of -Wall -Werror -Wextra with harmless w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Chí-Thanh Christopher Nguyễn
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2015-04-03 12:20 UTC by Stuart Shelton
Modified: 2015-04-08 10:09 UTC (History)
0 users

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


Attachments
build.log (build.log.gz,7.13 KB, application/x-gzip)
2015-04-03 12:20 UTC, Stuart Shelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2015-04-03 12:20:29 UTC
Created attachment 400476 [details]
build.log

Making install in src
make[1]: Entering directory '/var/tmp/portage/net-misc/usbip-3.19/work/linux-3.19/tools/usb/usbip/src'
...
x86_64-pc-linux-gnux32-gcc -DHAVE_CONFIG_H -I. -I..  -I../libsrc -DUSBIDS_FILE='"/usr/share/misc/usb.ids"'  -Wall -Werror -Wextra -std=gnu99 -march=native -fomit-frame-pointer -Os -pipe -c usbip_bind.c
usbip_network.c: In function ‘usbip_net_tcp_connect’:
usbip_network.c:264:6: error: ‘sockfd’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  int sockfd;
      ^
cc1: all warnings being treated as errors
Makefile:412: recipe for target 'usbip_network.o' failed
make[1]: *** [usbip_network.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/net-misc/usbip-3.19/work/linux-3.19/tools/usb/usbip/src'
Makefile:485: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
 * ERROR: net-misc/usbip-3.19::gentoo failed (install phase):
 *   emake failed
 * 

$  emerge --info '=net-misc/usbip-3.19::gentoo'
Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/x32, gcc-4.8.4, glibc-2.20-r2, 3.18.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.0-gentoo-x86_64-AMD_G-T40E_Processor-with-gentoo-2.2
KiB Mem:     2023832 total,    824292 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Fri, 03 Apr 2015 05:30:02 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 x86_64-pc-linux-gnux32 [disabled]
app-shells/bash:          4.2_p53
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.6
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r2

ABI="x32"
ABI_X86="x32 64"
ACCEPT_KEYWORDS="amd64"
ARCH="amd64"
CBUILD="x86_64-pc-linux-gnux32"
CFLAGS="-march=native -fomit-frame-pointer -Os -pipe"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnux32"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 ssse3 sse4a"
CXXFLAGS="-march=native -fomit-frame-pointer -Os -pipe"
DEFAULT_ABI="x32"
EPREFIX=""
EROOT="/"
FEATURES="assume-digests binpkg-logs buildpkg clean-logs collision-protect compress-build-logs config-protect-if-modified distlocks ebuild-locks fail-clean fakeroot fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
IUSE_IMPLICIT="abi_x86_x32 prefix prefix-guest"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"

$  emerge -pqv '=net-misc/usbip-3.19::gentoo'
[ebuild  N    ] net-misc/usbip-3.19  USE="tcpd -build -static-libs -symlink"
Comment 1 Stuart Shelton 2015-04-03 13:09:09 UTC
There's probably a cleaner approach, but this fixes it for me:

--- /usr/portage/net-misc/usbip/usbip-3.19.ebuild       2015-03-17 15:49:16.000000000 +0000
+++ usbip-3.19.ebuild   2015-04-03 13:55:38.949184353 +0100
@@ -30,6 +30,11 @@
 S=${WORKDIR}/linux-${PV}/tools/usb/${PN}
 
 src_prepare() {
+       # AC_SUBST([EXTRA_CFLAGS], ["-Wall -Werror -Wextra -std=gnu99"])
+       sed -i \
+               -e '/EXTRA_CFLAGS/s|\["-Wall -Werror -Wextra -std=gnu99"\]|["-std=gnu99"]|' \
+               configure.ac || die "sed failed"
+
        eautoreconf
 }
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-04-08 10:09:42 UTC
-Werror has been removed in usbip-3.19 without a revbump. -Wall -Wextra don't have any ill effects so they can stay.