Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598030 - sys-cluster/keepalived-1.2.19[snmp] with net-analyzer/net-snmp-5.7.3-r5 - emake failed: check_snmp.c:213:9: error: unknown type name ‘U64’
Summary: sys-cluster/keepalived-1.2.19[snmp] with net-analyzer/net-snmp-5.7.3-r5 - ema...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-10-25 05:44 UTC by Xiami
Modified: 2016-12-05 20:27 UTC (History)
0 users

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


Attachments
/var/tmp/portage/sys-cluster/keepalived-1.2.19/temp/build.log (build.log,18.26 KB, application/octet-stream)
2016-10-25 05:46 UTC, Xiami
Details
keepalived-1.2.19-src.patch (keepalived-1.2.19-src.patch,1.68 KB, patch)
2016-10-25 05:46 UTC, Xiami
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiami 2016-10-25 05:44:36 UTC
=sys-cluster/keepalived-1.2.19 emerge failed w/ emake failed

the output of `emerge -pqv '=sys-cluster/keepalived-1.2.19::gentoo'`
[ebuild  N    ] sys-cluster/keepalived-1.2.19  USE="ipv6 snmp -debug"

full build.log is uploaded as an attachment.
I got the reason so emerge --info and environment is not uploaded.


Core of the problem is:
check_snmp.c: In function ‘check_snmp_virtualserver’:
check_snmp.c:213:9: error: unknown type name ‘U64’
  static U64 counter64_ret;


Here's my investgation:
1. USE="snmp" enable compliation of check_snmp.c, or compliation will succeed.
2. Compliation based on =net-analyzer/net-snmp-5.7.3-r3 is successful
3. Differences between net-snmp-5.7.3-r{3,5} show net-snmp-5.7.3-r5 epatch 2 more files:

@@ -48,7 +50,7 @@
        lm_sensors? ( sys-apps/lm_sensors )
        netlink? ( dev-libs/libnl:3 )
        mysql? ( virtual/mysql )
-       perl? ( <dev-lang/perl-5.24.0:= )
+       perl? ( dev-lang/perl:= )
 "
 DEPEND="
        ${COMMON_DEPEND}
@@ -78,6 +80,9 @@
        # snmpconf generates config files with proper selinux context
        use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
 
+       epatch "${WORKDIR}"/${P}-perl524.patch
+       epatch "${WORKDIR}"/${P}-perl524-2.patch
+
        epatch "${WORKDIR}"/patches/*.patch
 
        epatch_user

4. net-snmp-5.7.3-perl524.patch exactly explains what happened:
    It contains one commit and this commit remove U64 typedef. Commit msg:
        The U64 typedef conflicts with a typedef in a Perl header file. Hence
        remove the U64 typedef from the Net-SNMP header files. This patch does
        not modify the Net-SNMP ABI.

    Say with codes, it removes "typedef struct counter64 U64;" from include/net-snmp/library/int64.h

5. Finally, keepalived compliation with USE="snmp" cries.


Post investigations:
1. CONFLICT definitions lay in /usr/lib64/perl5/5.22.2/x86_64-linux/CORE/handy.h:179:
    typedef U64TYPE U64;

My patch to keepalived which replaces all "U64" to "struct counter64" also uploaded. Hope you like it.

Reproducible: Always
Comment 1 Xiami 2016-10-25 05:46:08 UTC
Created attachment 451376 [details]
/var/tmp/portage/sys-cluster/keepalived-1.2.19/temp/build.log
Comment 2 Xiami 2016-10-25 05:46:45 UTC
Created attachment 451378 [details, diff]
keepalived-1.2.19-src.patch
Comment 3 Coacher 2016-11-05 19:15:21 UTC
Related commit:
commit bbb99092d27c92491db9f84b3ea34933a5bff2f1
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat May 21 03:14:59 2016 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat May 21 03:14:59 2016 +0200

    net-analyzer/net-snmp: Add revbump with fixes for Perl 5.24, bug 582368

    Package-Manager: portage-2.3.0_rc1
Comment 4 Xiami 2016-11-09 06:19:15 UTC
By watching the corresponding line in check_snmp.c version by version,
I found upstream fixed this compilation bug since v1.2.22 .

Since both 1.2.22 and 1.2.23 are in the portage tree, consider stablize one of them?

P.S. newest version of keepalived is 1.2.24 released on Sep 11th, 2016.
Comment 5 Pacho Ramos gentoo-dev 2016-12-05 20:27:14 UTC
stabilization of newer version at bug 596008