Created attachment 203541 [details] patch This port needs USES=compiler:c++11-lang. It also needs to not overwrite CXX, CXXFLAGS and LDFLAGS - this breaks build on GCC architectures. When trying to build with GCC8: the following error happens: mytreeview.cc:50:1: sorry, unimplemented: non-trivial designated initializers not supported That's why we need to initialize variables the old way. Tested on powerpc64 and amd64.
Thank you for your patch, I am waiting a commit to 1.0 bug #236866, anyway I have a core dump after the patch /usr/ports/deskutils/sysctlview/# make install % sysctlview Segmentation fault (core dumped) % uname -a FreeBSD fbsd 13.0-CURRENT FreeBSD 13.0-CURRENT r345315 GENERIC amd64 % c++ --version FreeBSD clang version 8.0.0 (branches/release_80 356034) (based on LLVM 8.0.0) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin Please, could you confirm sysctlview is runnable? I used g++8, too. Thanks, Alfonso
Later, I will investigate: ++static const char *ctl_typename[CTLTYPE+1] = { "node", "integer", "string", "int64_t", "opaque", "unsigned integer", "long integer", "unsigned long", "uint64_t", "int8_t", "int16_t", "int32_t", "uint32_t" }; in sys/sysctl.h CTLTYPE_NODE is 1 not 0, I'll check the index of "node" Regards, Alfonso
Fixed, some 'type' was missing and added "ZEROUNUSED" static const char *ctl_typename[CTLTYPE+1] = { "ZEROUNUSED", "node", "integer", "string", "int64_t", "opaque", "unsigned integer", "long integer", "unsigned long", "uint64_t", "uint8_t", "uint16_t", "int8_t","int16_t", "int32_t", "uint32_t" }; Please could you re-patch and re-test? Thanks, Alfonso
Created attachment 203649 [details] v2 Is that ok?
(In reply to Piotr Kubaj from comment #4) It seems OK (maybe "PORTREVISION= 1" before to commit). ( upstream fix for the next version https://gitlab.com/alfix/sysctlview/commit/94b7016aabb605d1d19c291910dc4d3f64d96a0e ) Alfonso
A commit references this bug: Author: fernape Date: Mon Apr 15 16:20:23 UTC 2019 New revision: 499030 URL: https://svnweb.freebsd.org/changeset/ports/499030 Log: deskutils/sysctlview: fix build with GCC-based architectures PR: 237159 Submitted by: pkubaj@anongoth.pl Approved by: alfix86@gmail.com (maintainer) Changes: head/deskutils/sysctlview/Makefile head/deskutils/sysctlview/files/ head/deskutils/sysctlview/files/patch-mytreeview.cc
Committed, Thanks!