Date: Mon, 13 Apr 2020 18:22:49 -0300 From: Renato Botelho <garga@FreeBSD.org> To: Guido Falsi <madpilot@FreeBSD.org>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r529260 - in head/net: ndpi ndpi/files ntopng ntopng/files Message-ID: <956b739b-1b1c-1fa1-1a92-3faede902baf@FreeBSD.org> In-Reply-To: <0c55e4aa-4625-2565-08b7-d091d907f732@FreeBSD.org> References: <202003271521.02RFLFM3097811@repo.freebsd.org> <4f0e8f32-d9a8-b7bc-2368-1f4c7392a7c4@FreeBSD.org> <5695ea34-b527-c42e-958c-6f701cb694ff@FreeBSD.org> <d4d3f054-134c-d2cb-c54e-282971b0ed18@FreeBSD.org> <0c55e4aa-4625-2565-08b7-d091d907f732@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------D52582B2E5747E3F70310E42 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 13/04/20 17:22, Guido Falsi wrote: > On 13/04/20 21:48, Renato Botelho wrote: >> On 13/04/20 15:03, Guido Falsi wrote: >>> On 13/04/20 19:46, Renato Botelho wrote: >>>> On 27/03/20 12:21, Guido Falsi wrote: >>>>> Author: madpilot >>>>> Date: Fri Mar 27 15:21:15 2020 >>>>> New Revision: 529260 >>>>> URL: https://svnweb.freebsd.org/changeset/ports/529260 >>>>> >>>>> Log: >>>>> - Update nDPI to 3.2.d20200324 >>>>> - Update ntopng to 4.0.d20200326 >>>>> Reported by: Victor Hooi <victorhooi@yahoo.com> >>>>> >>>>> Deleted: >>>>> head/net/ntopng/files/patch-scripts_lua_examples_sqlite.lua >>>>> Modified: >>>>> head/net/ndpi/Makefile >>>>> head/net/ndpi/distinfo >>>>> head/net/ndpi/files/patch-example_Makefile.in >>>>> head/net/ntopng/Makefile >>>>> head/net/ntopng/distinfo >>>>> head/net/ntopng/files/patch-configure.seed >>>>> head/net/ntopng/pkg-plist >>>> >>>> After this change it's failing to build on 12-armv7, at least on >>>> pfSense >>>> jails, with following error: >>>> >>>> src/ParsedFlow.cpp:130:14: error: invalid operands to binary expression >>>> ('lua_Number' (aka 'double') and 'double') >>>> version = htons(lua_tonumber(L, -1)); >>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~ >>> >>> It's actually right. Maybe on other archs compiler inplicitly casts this >>> to an int. >>> >>> Could you try putting an explicit cast to uint16_t there? >> >> Sure, I will try. Also I got a suggestion to replace lua_tonumber() by >> lua_tointeger(). I can try both and let you know. >> > > I'm not expert about lua, so I did not know there is a lua_tointeger. > That looks like a cleaner fix, and I can try to upstream that. I've already opened an Issue upstream [1]. And I confirmed lua_tointeger() fix the problem, you can find patch attached. [1] https://github.com/ntop/ntopng/issues/3743 -- Renato Botelho --------------D52582B2E5747E3F70310E42 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="patch-src_ParsedFlow.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-src_ParsedFlow.cpp" LS0tIHNyYy9QYXJzZWRGbG93LmNwcC5vcmlnCTIwMjAtMDQtMTMgMjA6MjA6MjkgVVRDCisr KyBzcmMvUGFyc2VkRmxvdy5jcHAKQEAgLTEyNywxNyArMTI3LDE3IEBAIHZvaWQgUGFyc2Vk Rmxvdzo6ZnJvbUx1YShsdWFfU3RhdGUgKkwsIGludCBpbmRleCkgewogCWlmKCFzdHJjbXAo a2V5LCAidmxhbl9pZCIpKQogCSAgdmxhbl9pZCA9IGx1YV90b251bWJlcihMLCAtMSk7CiAJ ZWxzZSBpZighc3RyY21wKGtleSwgInZlcnNpb24iKSkKLQkgIHZlcnNpb24gPSBodG9ucyhs dWFfdG9udW1iZXIoTCwgLTEpKTsKKwkgIHZlcnNpb24gPSBodG9ucyhsdWFfdG9pbnRlZ2Vy KEwsIC0xKSk7CiAJZWxzZSBpZighc3RyY21wKGtleSwgInNyY19wb3J0IikpCi0JICBzcmNf cG9ydCA9IGh0b25zKGx1YV90b251bWJlcihMLCAtMSkpOworCSAgc3JjX3BvcnQgPSBodG9u cyhsdWFfdG9pbnRlZ2VyKEwsIC0xKSk7CiAJZWxzZSBpZighc3RyY21wKGtleSwgImRzdF9w b3J0IikpCi0JICBkc3RfcG9ydCA9IGh0b25zKGx1YV90b251bWJlcihMLCAtMSkpOworCSAg ZHN0X3BvcnQgPSBodG9ucyhsdWFfdG9pbnRlZ2VyKEwsIC0xKSk7CiAJZWxzZSBpZighc3Ry Y21wKGtleSwgImw0X3Byb3RvIikpCiAJICBsNF9wcm90byA9IGx1YV90b251bWJlcihMLCAt MSk7CiAJZWxzZSBpZighc3RyY21wKGtleSwgInRjcF9mbGFncyIpKQotCSAgdGNwLnRjcF9m bGFncyA9IGh0b25zKGx1YV90b251bWJlcihMLCAtMSkpOworCSAgdGNwLnRjcF9mbGFncyA9 IGh0b25zKGx1YV90b2ludGVnZXIoTCwgLTEpKTsKIAllbHNlIGlmKCFzdHJjbXAoa2V5LCAi ZGlyZWN0aW9uIikpCi0JICBkaXJlY3Rpb24gPSBodG9ucyhsdWFfdG9udW1iZXIoTCwgLTEp KTsKKwkgIGRpcmVjdGlvbiA9IGh0b25zKGx1YV90b2ludGVnZXIoTCwgLTEpKTsKIAllbHNl IGlmKCFzdHJjbXAoa2V5LCAiZmlyc3Rfc3dpdGNoZWQiKSkKIAkgIGZpcnN0X3N3aXRjaGVk ID0gbHVhX3RvbnVtYmVyKEwsIC0xKTsKIAllbHNlIGlmKCFzdHJjbXAoa2V5LCAibGFzdF9z d2l0Y2hlZCIpKQo= --------------D52582B2E5747E3F70310E42--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?956b739b-1b1c-1fa1-1a92-3faede902baf>