Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2017 21:17:31 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456948 - in head/textproc/randlm: . files
Message-ID:  <201712212117.vBLLHVoN046224@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim (src committer)
Date: Thu Dec 21 21:17:31 2017
New Revision: 456948
URL: https://svnweb.freebsd.org/changeset/ports/456948

Log:
  Fix build of textproc/randlm with recent versions of clang.
  
  Approved by:	portmgr blanket
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  PR:		216056
  MFH:		2017Q4

Added:
  head/textproc/randlm/files/patch-BitArray.cpp   (contents, props changed)
  head/textproc/randlm/files/patch-BloomMap.cpp   (contents, props changed)
  head/textproc/randlm/files/patch-LogFreqBloomFilter.cpp   (contents, props changed)
  head/textproc/randlm/files/patch-RandLM.cpp   (contents, props changed)
  head/textproc/randlm/files/patch-TableChunkLocator.h   (contents, props changed)
Modified:
  head/textproc/randlm/Makefile

Modified: head/textproc/randlm/Makefile
==============================================================================
--- head/textproc/randlm/Makefile	Thu Dec 21 21:01:37 2017	(r456947)
+++ head/textproc/randlm/Makefile	Thu Dec 21 21:17:31 2017	(r456948)
@@ -3,7 +3,7 @@
 
 PORTNAME=	randlm
 PORTVERSION=	0.2.5
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	textproc
 MASTER_SITES=	SF/${PORTNAME}
 
@@ -16,7 +16,6 @@ RUN_DEPENDS=	${LOCALBASE}/include/google/sparse_hash_m
 
 BROKEN_aarch64=		fails to compile: invalid output constraint =a in assembler
 BROKEN_armv6=		fails to compile: invalid output constraint =a in assembler
-BROKEN_armv7=		fails to compile: BloomMap.cpp:275:58: error: ordered comparison between pointer and zero ('int *' and 'int')
 BROKEN_powerpc64=	fails to compile: 'itr' does not name a type
 
 GNU_CONFIGURE=	yes

Added: head/textproc/randlm/files/patch-BitArray.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/randlm/files/patch-BitArray.cpp	Thu Dec 21 21:17:31 2017	(r456948)
@@ -0,0 +1,11 @@
+--- src/LDHT/BitArray.cpp.orig	2017-03-07 01:14:52 UTC
++++ src/LDHT/BitArray.cpp
+@@ -115,7 +115,7 @@ uint64_t BitArray::getLength() {
+ }
+ 
+ bool BitArray::validArrayIndex(uint64_t index) {
+-    if (index >= 0 && index <= getLength())
++    if (index >= 1 && index <= getLength())
+         return true;
+     else
+         return false;

Added: head/textproc/randlm/files/patch-BloomMap.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/randlm/files/patch-BloomMap.cpp	Thu Dec 21 21:17:31 2017	(r456948)
@@ -0,0 +1,11 @@
+--- src/RandLM/BloomMap.cpp.orig	2017-03-07 00:13:58 UTC
++++ src/RandLM/BloomMap.cpp
+@@ -272,7 +272,7 @@ namespace randlm {
+   
+   bool BloomMap::computePaths() {
+     // determine the path lengths based on distribution for codes of each type
+-    assert(stats_counters_ && root_ == NULL && max_code_ > 0);
++    assert(stats_counters_ && root_ == NULL && max_code_  != NULL);
+     code_to_leaf_ = new uint64_t*[num_events_];
+     code_to_path_len_ = new int*[num_events_];
+     code_to_bound_ = new int*[num_events_];

Added: head/textproc/randlm/files/patch-LogFreqBloomFilter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/randlm/files/patch-LogFreqBloomFilter.cpp	Thu Dec 21 21:17:31 2017	(r456948)
@@ -0,0 +1,11 @@
+--- src/RandLM/LogFreqBloomFilter.cpp.orig	2017-03-07 00:13:45 UTC
++++ src/RandLM/LogFreqBloomFilter.cpp
+@@ -207,7 +207,7 @@ namespace randlm {
+ 
+   int LogFreqBloomFilter::getMaxHashes(int event_idx) {
+     // simple for unary encoding
+-    assert(max_alpha_ > 0 && max_k_ > 0 && max_code_ > 0);
++	assert(max_alpha_ > 0 && max_k_ > 0 && max_code_ != NULL);
+     return max_alpha_ + (max_k_ * max_code_[event_idx]);
+   }
+ 

Added: head/textproc/randlm/files/patch-RandLM.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/randlm/files/patch-RandLM.cpp	Thu Dec 21 21:17:31 2017	(r456948)
@@ -0,0 +1,11 @@
+--- src/RandLM/RandLM.cpp.orig	2017-03-07 02:01:18 UTC
++++ src/RandLM/RandLM.cpp
+@@ -66,7 +66,7 @@ namespace randlm {
+       smoothing_name = kStupidBackoffSmoothing;
+       break;
+     case kWittenBellSmoothingCode:
+-      smoothing_name == kWittenBellSmoothing;
++      smoothing_name = kWittenBellSmoothing;
+       break;
+     case  kBackoffSmoothingCode:
+       smoothing_name = kBackoffSmoothing;

Added: head/textproc/randlm/files/patch-TableChunkLocator.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/randlm/files/patch-TableChunkLocator.h	Thu Dec 21 21:17:31 2017	(r456948)
@@ -0,0 +1,11 @@
+--- src/LDHT/TableChunkLocator.h.orig	2017-03-07 01:06:04 UTC
++++ src/LDHT/TableChunkLocator.h
+@@ -21,7 +21,7 @@ public:
+                          int num_cells,
+                          int num_chunks) = 0;
+     virtual int locateTableChunkForKey(uint64_t key) = 0;
+-
++	virtual ~TableChunkLocator(){};
+ };
+ 
+ }  // namespace LDHT.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712212117.vBLLHVoN046224>