In file included from /usr/local/include/verlihub/tcache.h:26:0, from /usr/local/include/verlihub/cpenaltylist.h:29, from /usr/local/include/verlihub/cuser.h:30, from /usr/local/include/verlihub/cconndc.h:24, from cfloodprotect.cpp:13: /usr/local/include/verlihub/thasharray.h: In instantiation of 'DataType nUtils::tHashArray<DataType>::GetByHash(const tHashType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': cfloodprotect.cpp:228:48: required from here /usr/local/include/verlihub/thasharray.h:338:29: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] if (Items == NULL) return (DataType)NULL; ^ /usr/local/include/verlihub/thasharray.h: In instantiation of 'bool nUtils::tHashArray<DataType>::ContainsHash(const tHashType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': cfloodprotect.cpp:236:46: required from here /usr/local/include/verlihub/thasharray.h:331:11: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] return ((DataType)NULL != Items->Find(Hash)); ^ /usr/local/include/verlihub/thasharray.h: In instantiation of 'bool nUtils::tHashArray<DataType>::AddWithHash(DataType, const tHashType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': cfloodprotect.cpp:240:53: required from here /usr/local/include/verlihub/thasharray.h:267:15: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] if (Data == (DataType)NULL) return false; ^ /usr/local/include/verlihub/thasharray.h:283:8: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] if ( (DataType)NULL == Items->AddData(Data, Hash)) ^ /usr/local/include/verlihub/thasharray.h: In instantiation of 'bool nUtils::tHashArray<DataType>::RemoveByHash(const tHashType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': cfloodprotect.cpp:248:51: required from here /usr/local/include/verlihub/thasharray.h:314:8: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] if ( (DataType)NULL != Data ) ^ In file included from /usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd11.0/6.3.0/include-fixed/wchar.h:73:0, from /usr/local/lib/gcc6/include/c++/cwchar:44, from /usr/local/lib/gcc6/include/c++/bits/postypes.h:40, from /usr/local/lib/gcc6/include/c++/bits/char_traits.h:40, from /usr/local/lib/gcc6/include/c++/string:40, from /usr/local/include/verlihub/ckick.h:26, from cfloodprotect.cpp:11: /usr/local/include/verlihub/thasharray.h: In instantiation of 'DataType nUtils::tHashArray<DataType>::sItem::Set(nUtils::tHashArray<DataType>::tHashType, const DataType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': /usr/local/include/verlihub/thasharray.h:347:32: required from 'bool nUtils::tHashArray<DataType>::SetByHash(const tHashType&, const DataType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]' cfloodprotect.cpp:241:44: required from here /usr/local/include/verlihub/thasharray.h:174:23: error: cannot convert 'std::nullptr_t' to 'short int' in initialization DataType _result = NULL; ^ In file included from /usr/local/include/verlihub/tcache.h:26:0, from /usr/local/include/verlihub/cpenaltylist.h:29, from /usr/local/include/verlihub/cuser.h:30, from /usr/local/include/verlihub/cconndc.h:24, from cfloodprotect.cpp:13: /usr/local/include/verlihub/thasharray.h: In instantiation of 'DataType nUtils::tHashArray<DataType>::sItem::DeleteHash(nUtils::tHashArray<DataType>::tHashType, nUtils::tHashArray<DataType>::sItem*&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]': /usr/local/include/verlihub/thasharray.h:306:47: required from 'bool nUtils::tHashArray<DataType>::RemoveByHash(const tHashType&) [with DataType = short int; nUtils::tHashArray<DataType>::tHashType = long unsigned int]' cfloodprotect.cpp:248:51: required from here /usr/local/include/verlihub/thasharray.h:214:20: error: cast from 'std::nullptr_t' to 'short int' loses precision [-fpermissive] DataType Data = (DataType)NULL; ^ build log: http://sprunge.us/jTUV
Actually all Verlihub plugins are outdated and have to be deprecated. Most recent Verlihub version doesn't support these plugins and include all working ones inside itself. I already have working port of it and will submit PR soon after some testing. Main Verlihub port update implies delete all verlihub-plugin ports.
(In reply to Mikle Davidkin from comment #1) > I already have working port of it and will submit PR > soon after some testing. Any progress since then?
Created attachment 184801 [details] Proposed patch The attached patch makes the port build with an older C++ standard (the one GCC used before GCC 6) to avoid C++11/14 errors. It worked fine on Poudriere (HEAD-amd64).
Comment on attachment 184801 [details] Proposed patch Approved by: portmgr (blanket)
A commit references this bug: Author: rakuco Date: Tue Aug 1 09:04:35 UTC 2017 New revision: 447015 URL: https://svnweb.freebsd.org/changeset/ports/447015 Log: Explicitly build with -std=gnu++03. This fixes the build with GCC 6, which defaults to -std=gnu++14. The project seems to be incompatible with C++11 and later. PR: 219281 Approved by: portmgr (blanket approval) Changes: head/net-p2p/verlihub-plugins-floodprotect/Makefile
Setting merge-quarterly-. The rationale from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219484#c23 also applies to this bug.