Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails: undefined: syscall.Sysinfo_t #324

Closed
yurivict opened this issue Sep 29, 2021 · 1 comment · Fixed by #326
Closed

Build fails: undefined: syscall.Sysinfo_t #324

yurivict opened this issue Sep 29, 2021 · 1 comment · Fixed by #326

Comments

@yurivict
Copy link

$ 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
Copy link
Contributor

qiu-x commented Nov 4, 2021

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)
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants