Page MenuHomeFreeBSD

net/zerotier: require json.hpp v3.2.0
ClosedPublic

Authored by dch on Aug 24 2018, 8:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 14, 5:35 PM
Unknown Object (File)
Feb 26 2024, 11:39 PM
Unknown Object (File)
Feb 17 2024, 11:17 PM
Unknown Object (File)
Feb 17 2024, 11:16 PM
Unknown Object (File)
Feb 17 2024, 11:16 PM
Unknown Object (File)
Feb 17 2024, 11:16 PM
Unknown Object (File)
Feb 17 2024, 11:16 PM
Unknown Object (File)
Feb 17 2024, 11:16 PM
Subscribers
None

Details

Summary
  • fixes PR#230629 reported by jbeich@ for libc++ 7
  • correct combined LICENSEs to match source code
Test Plan
  • poudriere bulk -t OK across 10.4, 11.1, 11.2 amd64+i386, 12.0-a1 amd64
  • FAILs for 10.4 i386 with following stack trace

clang++ -O2 -pipe -flax-vector-conversions -fstack-protector -fno-strict-aliasing -O2 -pipe -flax-vector-conversions -fstack-protector -fno-strict-aliasing -Wall -fPIE -fvisibility=hidden -fstack-protector -pthread -DNDEBUG -DZT_BUILD_PLATFORM=7 -DZT_BUILD_ARCHITECTURE=1 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -fno-rtti -std=c++11 -O2 -pipe -flax-vector-conversions -fstack-protector -fno-strict-aliasing -Wall -fPIE -fvisibility=hidden -fstack-protector -pthread -DNDEBUG -DZT_BUILD_PLATFORM=7 -DZT_BUILD_ARCHITECTURE=1 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -Wall -Werror -g -pthread -DZT_TRACE -DZT_BUILD_PLATFORM=7 -DZT_BUILD_ARCHITECTURE=1 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -fno-rtti -std=c++11 -c -o one.o one.cpp
Stack dump:
0. Program arguments: /usr/bin/clang++ -cc1 -triple i386-unknown-freebsd10.4 -emit-obj -disable-free -disable-llvm-verifier -main-file-name OSUtils.cpp -mrelocation-model pic -pic-level 2 -pie-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu i486 -gdwarf-2 -coverage-file /tmp/usr/ports/net/zerotier/work/ZeroTierOne-1.2.10/osdep/OSUtils.o -resource-dir /usr/bin/../lib/clang/3.4.1 -D NDEBUG -D ZT_BUILD_PLATFORM=7 -D ZT_BUILD_ARCHITECTURE=1 -D ZT_SOFTWARE_UPDATE_DEFAULT="disable" -D NDEBUG -D ZT_BUILD_PLATFORM=7 -D ZT_BUILD_ARCHITECTURE=1 -D ZT_SOFTWARE_UPDATE_DEFAULT="disable" -D ZT_TRACE -D ZT_BUILD_PLATFORM=7 -D ZT_BUILD_ARCHITECTURE=1 -D ZT_SOFTWARE_UPDATE_DEFAULT="disable" -internal-isystem /usr/include/c++/v1 -O2 -Wall -Wall -Wall -Werror -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /tmp/usr/ports/net/zerotier/work/ZeroTierOne-1.2.10 -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -pthread -stack-protector 1 -mstackrealign -fno-rtti -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o osdep/OSUtils.o -x c++ osdep/OSUtils.cpp

  1. osdep/../ext/json/json.hpp:18807:52: current parser token 'value'
  2. osdep/../ext/json/json.hpp:18798:1: parsing namespace 'std'

clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: i386-unknown-freebsd10.4
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:

I'll report this issue upstream in zt project and update this as required

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Mark it broken for 10.4 i386?

mark BROKEN on 10_i386 only
In D16880#359836, @jrm wrote:

Mark it broken for 10.4 i386?

Macro mom_says_do_it:

This revision is now accepted and ready to land.Aug 24 2018, 6:58 PM
This revision was automatically updated to reflect the committed changes.

I don't like how FreeBSD 10.4 issue was handled. Clang 3.4 crashes (on amd64 here) but this port hardcodes CXX, so USES=compiler:c++14-lang cannot switch to devel/llvm60. This is a regression since rP436712.

head/net/zerotier/Makefile
11

FYI, GPLv3 can be changed to GPLv3+ as both LICENSE.txt and license headers in files have or (at your option) any later version. clause.

13

Change to LICENSE_FILE_GPLv3 or (since rP451432) the file will be used for every value in LICENSE. Maybe assign LICENSE_FILE_MIT and LICENSE_FILE_BSD3CLAUSE as there's no copy under /usr/ports/Templates/Licenses/ due to many styles.

15

Add -meabi=5 to CFLAGS when building that specific file. If you only have amd64 hardware poudriere can cross-compile e.g.,

$ pkg install qemu-user-static
$ poudriere jail -cj 112armv6 -x -a arm.armv6 -v releng/11.2 -m svn+https
$ poudriere bulk -tj 112armv6 net/zerotier
16

See above but use head branch for testing as armv7 appeared in FreeBSD 12.0 (or since rS324340).

17

Not a powerpc64-specific issue: Clang is missing because in-base GCC is too old to build it. GCC platforms also include mips* (of various ABIs), 32bit powerpc and sparc64. make targets -C/usr/src also shows riscv64 but there's almost (rP473324) no support in ports.

follow up with jbeich's comments

dch marked 2 inline comments as done.Aug 24 2018, 9:25 PM

this port hardcodes CXX, so USES=compiler:c++14-lang cannot switch to devel/llvm60. This is a regression since rP436712.

Thanks Jan!

I am pretty sure upstream will take a patch for addressing this in https://github.com/zerotier/ZeroTierOne/blob/dev/Makefile#L13-L17 and I'll retry this with USES= gmake compiler:c++14-lang.

incorporate feedback from jbeich@

  • handle LICENSE files correctly
  • remove upstream's hardcoded compiler dependency
  • ease port compiler dependencies to allow building on more platforms
  • unbreak 10.4 i386

I incorporated most of the feedback, ppc/arm/qemu-flavoured poudriere will need to wait til I'm back in the office. thanks for the suggestions!

net/zerotier/Makefile
12 ↗(On Diff #47264)

Looking at build log/glue, BSD3CLAUSE and APACHE20 can be dropped as source files covered by those licenses (ext/libnatpmp/*, ext/miniupnpc/*, ext/tap-mac/*, ext/librethinkdbxx/*) are not built in this port.

14 ↗(On Diff #47264)

Better keep LICENSE.GPL-3. It doesn't make sense to use file that describes multiple licenses (but not their conditions) only for one license. And for MIT there's ready to use license file under WRKSRC i.e., ext/json/LICENSE.MIT.

net/zerotier/files/patch-Makefile
8 ↗(On Diff #47264)

If you expect patch churn it maybe easier to just override those e.g., MAKE_ARGS= CC="${CC}" CXX="${CXX}" in port's Makefile.

dch marked 3 inline comments as done.Sep 13 2018, 10:01 AM

@jbeich thanks for your compiler changes, as I'm not a C programmer I'm not really following the consequences of this. If you can suggest a web page or docs I can read up to understand better that would really be helpful for me.

The builds, at least, seem to work across 10.x and 11.x with these changes, I will hopefully have an armv6 and v7 jail cross-compiled tomorrow to check those out. The eabi change you suggested has been incorporated in a slightly different fashion via PR to upstream but it seems reasonable to me at least.

10_4_x64-default 2018-09-13_09h48m37s 2 2 0 0 0 0 stopped:done:
10_4_x86-default 2018-09-13_09h48m37s 2 2 0 0 0 0 stopped:done:
11_1_x64-default 2018-09-13_09h48m37s 2 2 0 0 0 0 stopped:done:
11_1_x86-default 2018-09-13_09h48m37s 2 2 0 0 0 0 stopped:done:
11_2_x64-default 2018-09-13_09h48m52s 2 2 0 0 0 0 stopped:done:
11_2_x86-default 2018-09-13_09h48m52s 2 2 0 0 0 0 stopped:done:
12a4_x64-default 2018-09-13_09h48m52s 2 2 0 0 0 0 stopped:done:

net/zerotier/Makefile
12 ↗(On Diff #47264)

Is that allowed? Just because we're not compiling it doesn't release the license conditions, it's on the source code, not only the build artefacts. IANAL.

net/zerotier/files/patch-Makefile
8 ↗(On Diff #47264)

upstream's very helpful in getting these merged, so long as these work across all our platforms I'll submit it upstream for the next official release.

dch marked 4 inline comments as done.

fix compiler nits & add arm support from PR#231335

BTW not clear for me, if after these changes, it would now compile on powerpc *shrug*

This revision is now accepted and ready to land.Sep 13 2018, 11:01 AM
This revision was automatically updated to reflect the committed changes.