From owner-svn-ports-branches@freebsd.org Mon May 9 18:44:49 2016 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85DF1B340D0; Mon, 9 May 2016 18:44:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 624891D77; Mon, 9 May 2016 18:44:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u49Iimbv081362; Mon, 9 May 2016 18:44:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u49IimlN081360; Mon, 9 May 2016 18:44:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201605091844.u49IimlN081360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 May 2016 18:44:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r414881 - in branches/2016Q2/chinese/sunpinyin: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2016 18:44:49 -0000 Author: dim (src committer) Date: Mon May 9 18:44:48 2016 New Revision: 414881 URL: https://svnweb.freebsd.org/changeset/ports/414881 Log: MFH: r414787 During the exp-run in bug 208158, it was found that chinese/sunpinyin gives errors with libc++ 3.8.0: gmake[2]: Entering directory '/wrkdirs/usr/ports/chinese/sunpinyin/work' slmpack lm_sc.3gm.arpa dict.utf8 lm_sc.3gm Loading lexicon...done. Loading ARPA slm... Writing out...done! slmthread lm_sc.3gm lm_sc.t3g.orig Loading original slm... first pass... Compressing pr values...65536 float values ==> 65536 values Compressing bow values...16384 float values ==> 16384 values Threading the new model...Assertion failed: (prit != pr_map.end()), function main, file src/slm/thread/slmthread.cpp, line 364. /wrkdirs/usr/ports/chinese/sunpinyin/work/sunpinyin-a8bd811/src/sunpinyin-dictgen.mk:51: recipe for target 'lm_sc.t3g.orig' failed This is because the code mostly uses floats, but in some parts it uses log(), exp(), etc, which return doubles. During the parts where it does lookups in std::map constructs, this leads to it not being able to find the expected entries. Fix this by using logf(), expf() and similar, which explicitly return floats. Approved by: portmgr (junovitch) PR: 209369 Added: branches/2016Q2/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp - copied unchanged from r414787, head/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp Modified: branches/2016Q2/chinese/sunpinyin/Makefile Directory Properties: branches/2016Q2/ (props changed) Modified: branches/2016Q2/chinese/sunpinyin/Makefile ============================================================================== --- branches/2016Q2/chinese/sunpinyin/Makefile Mon May 9 18:41:02 2016 (r414880) +++ branches/2016Q2/chinese/sunpinyin/Makefile Mon May 9 18:44:48 2016 (r414881) @@ -3,6 +3,7 @@ PORTNAME= sunpinyin DISTVERSION= 2.0.4rc3 +PORTREVISION= 1 CATEGORIES= chinese devel MASTER_SITES= GH:1 SF/open-gram:2 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:1 \ Copied: branches/2016Q2/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp (from r414787, head/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp Mon May 9 18:44:48 2016 (r414881, copy of r414787, head/chinese/sunpinyin/files/patch-src_slm_thread_slmthread.cpp) @@ -0,0 +1,17 @@ +--- src/slm/thread/slmthread.cpp.orig 2014-11-14 14:17:48 UTC ++++ src/slm/thread/slmthread.cpp +@@ -250,10 +250,10 @@ main(int argc, char* argv[]) + + bool usingLogPr = slm.isUseLogPr(); + +- #define EffectivePr(a) (float((usingLogPr) ? ((a) / log(2.0)) : (-log2((a))))) +- #define OriginalPr(b) (float((usingLogPr) ? ((b) * log(2.0)) : (exp2(-(b))))) +- #define EffectiveBow(a) (float((usingLogPr) ? (exp(-(a))) : ((a)))) +- #define OriginalBow(b) (float((usingLogPr) ? (-log((b))) : ((b)))) ++ #define EffectivePr(a) (float((usingLogPr) ? ((a) / logf(2.0f)) : (-log2f((a))))) ++ #define OriginalPr(b) (float((usingLogPr) ? ((b) * logf(2.0f)) : (exp2f(-(b))))) ++ #define EffectiveBow(a) (float((usingLogPr) ? (expf(-(a))) : ((a)))) ++ #define OriginalBow(b) (float((usingLogPr) ? (-logf((b))) : ((b)))) + + printf("\nfirst pass..."); fflush(stdout); + for (int lvl = 0; lvl <= slm.getN(); ++lvl) {