Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483318 - net-libs/zeromq-3.2.3 fails to build (-Werror)
Summary: net-libs/zeromq-3.2.3 fails to build (-Werror)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-02 02:28 UTC by Patrick Lauer
Modified: 2013-09-14 05:03 UTC (History)
2 users (show)

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


Attachments
zeromq-3.2.3-r1.ebuild (zeromq-3.2.3-r1.ebuild,1.68 KB, text/plain)
2013-09-12 15:29 UTC, Joerg Neikes
Details
zeromq-3.2.3-unused-variable.patch (zeromq-3.2.3-unused-variable.patch,1.20 KB, patch)
2013-09-12 15:32 UTC, Joerg Neikes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-09-02 02:28:57 UTC
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE  -DZMQ_FORCE_EPOLL  -march=native -O2 -pipe -ggdb -c -o test_router_mandatory.o test_router_mandatory.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE  -DZMQ_FORCE_EPOLL  -march=native -O2 -pipe -ggdb -c -o test_disconnect_inproc.o test_disconnect_inproc.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE  -DZMQ_FORCE_EPOLL  -march=native -O2 -pipe -ggdb -c -o test_shutdown_stress.o test_shutdown_stress.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE  -DZMQ_FORCE_EPOLL  -march=native -O2 -pipe -ggdb -c -o test_pair_ipc.o test_pair_ipc.cpp
test_disconnect_inproc.cpp: In function ‘int main(int, char**)’:
test_disconnect_inproc.cpp:43:21: error: unused variable ‘msgSize’ [-Werror=unused-variable]
                 int msgSize = zmq_msg_size(&msg);
                     ^
test_disconnect_inproc.cpp:67:21: error: unused variable ‘msgSize’ [-Werror=unused-variable]
                 int msgSize = zmq_msg_size(&msg);
                     ^
test_disconnect_inproc.cpp:68:23: error: unused variable ‘buffer’ [-Werror=unused-variable]
                 char* buffer = (char*)zmq_msg_data(&msg);
                       ^
cc1plus: all warnings being treated as errors
make[1]: *** [test_disconnect_inproc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/chroot/build/portage/net-libs/zeromq-3.2.3/work/zeromq-3.2.3/tests'
make: *** [all-recursive] Error 1
 * ERROR: net-libs/zeromq-3.2.3::gentoo failed (compile phase):


Portage 2.2.0 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.1, glibc-2.17, 3.10.6-gentoo x86_64)
=================================================================
System uname: Linux-3.10.6-gentoo-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
KiB Mem:     7920972 total,   2102996 free
KiB Swap:   25165812 total,  25165812 free
Timestamp of tree: Unknown
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r1, 3.2.5-r1, 3.3.2-r1
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.10 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo laurentb x11 kde
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
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 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -ggdb"
DISTDIR="/chroot/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.sohu.com/gentoo/ http://gentoo.mirrors.hoobly.com/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/chroot/build"
PORTDIR="/home/pl/code/gentoo-x86"
PORTDIR_OVERLAY="/var/lib/layman/laurentb /var/lib/layman/x11 /home/pl/code/kde"
USE="X a52 aac acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli compat consolekit crypt cups curl cxx dbus declarative dri dts dvd dvdr dvdread emboss encode exif expat fam ffmpeg firefox flac foomaticdb fortran ftp gcj gd gdbm gif gmp gnutls gpm gtk iconv icq idn imagemagick imap imlib innodb ipod ipv6 jabber javascript jingle jpeg jpeg2k kde kdehiddenvisibility kipi lame lcms libnotify lzo mad matroska md5sum midi mmap mmx mng modules mp3 mp4 mpeg mplayer msn mudflap multilib musepack musicbrainz mysql ncurses nls nptl nsplugin offensive ogg openal openexr opengl openmp openvg oscar pam pango pcre pdf perl php plasma png policykit ppds python qt3support qt4 quicktime raw rdesktop readline rss samba sdl semantic-desktop session speex spell sqlite sqlite3 sse sse2 sse3 ssl ssse3 startup-notification subversion svg syslog taglib tcpd threads tidy tiff tk truetype udev udisks unicode upower usb vdpau vlc vorbis wifi wmf wxwindows x264 xattr xcb xcomposite xine xinerama xml xmlrpc xpm xscreensaver xulrunner xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="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" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 alpha arm cris i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel or32 ppc ppc64 ppcemb s390x sh4 sh4eb sparc sparc64 unicore32 xtensa xtensaeb" QEMU_USER_TARGETS="alpha arm armeb cris i386 m68k microblaze microblazeel mips mipsel or32 ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64 unicore32 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Stefan de Konink 2013-09-05 06:35:26 UTC
I would like to add;

libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -pedantic -Werror -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -DZMQ_FORCE_EPOLL -fvisibility=hidden -O2 -march=native -pipe -c decoder.cpp  -fPIC -DPIC -o .libs/libzmq_la-decoder.o
In file included from decoder.cpp:32:
./i_msg_sink.hpp:32:5: error: 'i_msg_sink' defined as a struct here but
      previously declared as a class [-Werror,-Wmismatched-tags]
    struct i_msg_sink
    ^
./decoder.hpp:38:5: note: did you mean struct here?
    class i_msg_sink;
    ^~~~~
    struct
./i_decoder.hpp:29:5: note: did you mean struct here?
    class i_msg_sink;
    ^~~~~
    struct
1 error generated.
Comment 3 Joerg Neikes 2013-09-12 15:29:55 UTC
Created attachment 358544 [details]
zeromq-3.2.3-r1.ebuild

added inherit eutils
and path to patch

epatch "${FILESDIR}/${PN}-3.2.3-unused-variable.patch"
Comment 4 Joerg Neikes 2013-09-12 15:32:32 UTC
Created attachment 358546 [details, diff]
zeromq-3.2.3-unused-variable.patch

Please create folder for files
mkdir /usr/portage/net-libs/zeromq/files
cp zeromq-3.2.3-unused-variable.patch /usr/portage/net-libs/zeromq/files

ebuild /usr/portage/net-libs/zeromq/zeromq-3.2.3-r1.ebuild digest
Comment 5 Alexander Vershilov (RETIRED) gentoo-dev 2013-09-14 05:03:01 UTC
Sorry for a long delay. Fixed. Patch was taken from upstream repo.

To Jeorg, thanks for a tips :)

minor issue:
 epatch "${FILESDIR}/${PN}-3.2.3-unused-variable.patch"

should be:
 epatch "${FILESDIR}"/${PN}-3.2.3-unused-variable.patch

or:
 epatch "${FILESDIR}"/${P}-unused-variable.patch

And in case when upstream solved an issue it's better to use full commit, it reduce possibility of adding a error or submitting incorrect patch.

Thanks.