Opened 8 years ago

Closed 8 years ago

#52214 closed defect (fixed)

net-snmp is not compatible with perl-5.24

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mojca (Mojca Miklavec), dbevans (David B. Evans)
Port: net-snmp

Description

net-snmp is the only port that I have that is still dependent on perl-5.22.

I made a change to the port to get it to support 5.24 optoinally:

Index: Portfile
===================================================================
--- Portfile	(revision 152509)
+++ Portfile	(working copy)
@@ -6,7 +6,7 @@
 
 name                    net-snmp
 version                 5.7.3
-revision                5
+revision                6
 categories              net
 license                 BSD
 platforms               darwin
@@ -27,10 +27,12 @@
 checksums               rmd160  c5cf54d5723ee417e07f1f9fa3936aef505104a2 \
                         sha256  12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0
 
-perl5.branches          5.22
+perl5.require_variant   yes
+perl5.conflict_variants yes
+perl5.branches          5.22 5.24
+perl5.create_variants   ${perl5.branches}
 
 depends_lib             port:bzip2 \
-                        port:perl${perl5.major} \
                         port:zlib
 
 post-extract {

but that fails due to a conflict between net-snmp and perl-5.24. This will need to be resolved before we make 5.24 default.

In file included from snmp_perl.c:9:
In file included from ../include/net-snmp/net-snmp-includes.h:71:
In file included from ../include/net-snmp/utilities.h:42:
../include/net-snmp/library/int64.h:8:30: error: typedef redefinition with different types ('struct counter64' vs 'unsigned long')
    typedef struct counter64 U64;
                             ^
/opt/local/lib/perl5/5.24/darwin-thread-multi-2level/CORE/handy.h:179:17: note: previous definition is here
typedef U64TYPE U64;
                ^
1 error generated.
make[1]: *** [snmp_perl.lo] Error 1

Upstream report: https://sourceforge.net/p/net-snmp/bugs/2712/

Fixed by: https://sourceforge.net/p/net-snmp/code/ci/4e793461e96a2b4fd81142ab312d074d5c8841fa

Attachments (1)

net-snmp-perl-5.24.patch (10.3 KB) - added by jeremyhu (Jeremy Huddleston Sequoia) 8 years ago.
patch to support perl-5.24 in net-snmp port

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: mojca@… devans@… added

comment:2 Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

That SF bug only covers one of the failures. I'm looking into the other still.

Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Attachment: net-snmp-perl-5.24.patch added

patch to support perl-5.24 in net-snmp port

comment:3 Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

FreeBSD has a patch for the other issue. That is mentioned in the upstream report, but they haven't folded it into the upstream git repo yet for some reason.

The attached patch gets net-snmp to install with perl-5.24. I haven't given it much of a beating yet.

comment:4 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Thanks for that patch, Jeremy. Committed in r154090 and r154109 without adding variants.

Note: See TracTickets for help on using tickets.