Xen automatically enables Go bindings for xenlight when it finds a Go compiler, but it fails to find the some libraries installed in /usr/local/lib. # xenbits.xenproject.org/git-http/xen.git/tools/golang/xenlight ld: error: unable to find library -lyajl clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[7]: *** [Makefile:30: build] Error 2 gmake[7]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/golang/xenlight' gmake[6]: *** [/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/golang/../../tools/Rules.mk:161: subdir-install-xenlight] Error 2 gmake[6]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/golang' gmake[5]: *** [/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/golang/../../tools/Rules.mk:156: subdirs-install] Error 2 gmake[5]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/golang' gmake[4]: *** [/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/../tools/Rules.mk:161: subdir-install-golang] Error 2 gmake[4]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools' gmake[3]: *** [/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools/../tools/Rules.mk:156: subdirs-install] Error 2 gmake[3]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools' gmake[2]: *** [Makefile:66: install] Error 2 gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0/tools' gmake[1]: *** [Makefile:140: install-tools] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.15.0' *** Error code 2 Stop. make: stopped in /usr/ports/sysutils/xen-tools
Created attachment 226220 [details] xen-tools-4.15.0_1 build log
Created attachment 226270 [details] Proposed fix Can you please check if the attached patch fixes the issue? Thanks, Roger.
(In reply to Roger Pau Monné from comment #2) Yes, it fixes the problem, but building Go bindings is probably not very useful if we don't install them.
Comment on attachment 226270 [details] Proposed fix >+From fc345ccc1effcf89239aaf452071a8cf35b43934 Mon Sep 17 00:00:00 2001 >+From: Roger Pau Monne <roger.pau@citrix.com> >+Date: Tue, 6 Jul 2021 16:03:24 +0200 >+Subject: [PATCH] tools/go: honor append build flags >+MIME-Version: 1.0 >+Content-Type: text/plain; charset=UTF-8 >+Content-Transfer-Encoding: 8bit >+ >+Make the go build use APPEND_{C/LD}FLAGS when necessary, just like >+other parts od the build. 'od' looks like a typo of 'of'.
(In reply to Ting-Wei Lan from comment #3) Sorry, I'm not really a ports guy myself. Aren't they installed by `make install-tools` if the system has the go compiler present? Or what's not in pkg-plist is simply not installed? I don't think there's any user of that library ATM. I think it makes more sense to package the go module separately from xen-tools, so the right fix would be to disable building the go bindings in the configure step. I will prepare a patch. I will also submit the go build fix upstream, do you mind if I also add your tested-by to the patch? Thanks, Roger.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=53c01d65985faea7bd864702cefb2f9e6ef4d3a8 commit 53c01d65985faea7bd864702cefb2f9e6ef4d3a8 Author: Roger Pau Monné <royger@FreeBSD.org> AuthorDate: 2021-07-06 14:05:55 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> CommitDate: 2021-07-07 07:22:29 +0000 sysutils/xen-tools: fix build with go installed Unconditionally disable building the Go bindings. Such bindings should be packaged in a separate port. PR: 256978 Reported by: Ting-Wei Lan <lantw44@gmail.com> Approved by: bapt (implicit) sysutils/xen-tools/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Should be fixed
(In reply to Roger Pau Monné from comment #6) They are installed into the stage directory, but files not listed in pkg-plist won't be packaged or installed into the system. If you run 'make check-plist', it will report these uninstalled files as pkg-plist issues. It is OK to add tested-by to the patch.