Build fails: undefined: syscall.Sysinfo_t
yurivict opened this issue · 1 comments
yurivict commented
$ make
===> Building for darktile-0.0.10
(cd /disk-samsung/freebsd-ports/x11/darktile/work/github.com/liamg/darktile@v0.0.10; for t in ./cmd/darktile ./cmd/packfont; do out=$(/usr/bin/basename $(echo ${t} | /usr/bin/sed -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/darktile/')); pkg=$(echo ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^darktile$/./'); echo "===> Building ${out} from ${pkg}"; /usr/bin/env XDG_DATA_HOME=/disk-samsung/freebsd-ports/x11/darktile/work XDG_CONFIG_HOME=/disk-samsung/freebsd-ports/x11/darktile/work HOME=/disk-samsung/freebsd-ports/x11/darktile/work PATH=/disk-samsung/freebsd-ports/x11/darktile/work/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOARM= GOPATH="/disk-samsung/freebsd-ports/distfiles/go/x11_darktile" GOBIN="/disk-samsung/freebsd-ports/x11/darktile/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go build -v -buildmode=exe -trimpath -ldflags=-s -mod=vendor -o /disk-samsung/freebsd-ports/x11/darktile/work/bin/${out} ${pkg}; done)
===> Building darktile from ./cmd/darktile
github.com/liamg/darktile/internal/app/darktile/hinters
# github.com/go-gl/glfw/v3.3/glfw
In file included from vendor/github.com/go-gl/glfw/v3.3/glfw/native_linbsd.go:10:
In file included from vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3native.h:114:
In file included from /usr/local/include/GL/glx.h:32:
/usr/local/include/GL/gl.h:56:11: warning: 'GLAPIENTRY' macro redefined [-Wmacro-redefined]
vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/include/GLFW/glfw3.h:5894:10: note: previous definition is here
# github.com/liamg/darktile/internal/app/darktile/hinters
internal/app/darktile/hinters/hint_dmesg_timestamp.go:55:14: undefined: syscall.Sysinfo_t
internal/app/darktile/hinters/hint_dmesg_timestamp.go:56:6: undefined: syscall.Sysinfo
*** Error code 2
Version: 0.0.10
FreeBSD 13
qiu-x commented
Yeah, I also noticed this issue. Until someone makes a proper pull request you can apply this patch on internal/app/darktile/hinters/hint_dmesg_timestamp.go
as a temporary fix:
--- b
+++ a
@@ -4,7 +4,6 @@
"regexp"
"strconv"
"strings"
- "syscall"
"time"
"github.com/liamg/darktile/internal/app/darktile/termutil"
@@ -52,7 +51,5 @@
}
func setSysStartTime() {
- sysInfo := &syscall.Sysinfo_t{}
- _ = syscall.Sysinfo(sysInfo)
- sysStart = time.Now().Local().Add(time.Duration(int(sysInfo.Uptime*-1)) * time.Second)
+ sysStart = time.Now().Local().Add(time.Second)
}