graphics/libheif failes to build for me. (amd64 FreeBSD-11 stable) I suppose, it is after lang/go-devel upgrade. The error is: --- heif-test-go --- heif-test.go:39:2: cannot find package "github.com/strukturag/libheif/go/heif" in any of: /usr/local/go/src/github.com/strukturag/libheif/go/heif (from $GOROOT) /usr/ports/graphics/libheif/work/go/src/github.com/strukturag/libheif/go/heif (from $GOPATH) *** [heif-test-go] Error code 1 make[6]: stopped in /usr/ports/graphics/libheif/work/libheif-1.6.0/examples
(Unsuccessful try from libheif-1.3.2_5 to 1.6.0)
Created attachment 209256 [details] libheif-1.6.0_1.patch (In reply to gja822 from comment #0) Hi, First of all, please don't use lang/go-devel for building Go ports - it's too early in release cycle for it to be cleared for ports building. If you need current development Go version, just build it out-of-tree from the source checkout as described in [1] Regarding the build issue, graphics/libheif seems to require go for building examples but doesn't declare it as a build dependency. With EXAMPLES=on it also needs USES=gmake due to gnuisms in examples's Makefile.am (${CURDIR}). Attached patch fixes both issues, making the build pass with both lang/go and lang/go-devel. [1] https://golang.org/doc/install/source
(In reply to Dmitri Goutnik from comment #2) > don't use lang/go-devel for building Go ports graphics/libheif failes to build with lang/go and lang/go14 installed too.
Hi, I've built this using my poudriere setup in a 12.1-RELEASE jail and had no issue with the patch. From my perspective it's fine to accept this. Never the less I did not see any problem before with my setup and without the "USES = gmake go:no_targets". Can you share a build log from your system documenting the compilation failure?
Comment on attachment 209256 [details] libheif-1.6.0_1.patch Approved
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/97111046
(In reply to Sebastian Steinmetz from comment #4) Hi Sebastian, You won't see a failure in poudriere unless you add a build dependency on go. This is because libheif detects go presence during configure stage and wraps building go examples in "if HAVE_GO ... endif". This port needs either a build dependency on go when EXAMPLES knob is checked or go examples disabled with --disable-go. The error I was getting in poudriere was mkdir: /src: Permission denied and it was caused by ${CURDIR} resolving to an empty string because CURDIR is not defined in bmake. The OP was getting a different error but I bet it's because they're building as root outside of poudriere and if they look at their /, they'll find /src/github.com/strukturag created by the port build.
Created attachment 209259 [details] libheif-1.6.0.log
(In reply to Dmitri Goutnik from comment #2) So, you recommend not to install lang/go-devel from ports' tree at all, don't you? Actually, I do not use go widely in any way. But it was used as a dependency. (And concerning go-devel, somehow it now uses bundled bootstrap, even if go14 is installed (and previous go-devel could be used also).)
Created attachment 209292 [details] libheif-1.6.0_1.patch suppress go example build After staring a little bit more on the code and how the package builds, I think this dependency on go is nonsense. Yes, there is an example go program in the package, but libheifs make script does not consider it worth installing (rather than the executables it installs to the stage dir in usr/local/bin). So this is really an example go code for go developers to study how to use the library. My idea would be to suppress the go build all together (via configure option --disable-go). What is your opinion on this?
(In reply to gja822 from comment #9) I'm saying that using lang/go-devel instead of lang/go for regular port building is not recommended. Port maintainers probably do not test with it, some upstreams may not yet support it. Things may break in confusing ways, YMMV etc. As to why it now uses prebuilt bootstrap and not lang/go14, see https://svnweb.freebsd.org/ports?view=revision&revision=517703 (In reply to Sebastian Steinmetz from comment #10) If this question was for me - I agree that bringing in Go and gmake just to build a few examples that aren't even installed is probably a bit excessive and adding --disable-go would be a better option.
(In reply to Dmitri Goutnik from comment #11) And what about not to bootstrap, if I already have go-devel, but use already installed one? Is it possible at all?
(In reply to Dmitri Goutnik from comment #11) thank you for your opinion. Given that feedback I would favour the other patch with --disable-go. Do you mind having a look if it works for your setup as well? Thank you!
Created attachment 209332 [details] Disable build examples for go Something like this?
A commit references this bug: Author: dmgk Date: Fri Nov 22 16:59:39 UTC 2019 New revision: 518153 URL: https://svnweb.freebsd.org/changeset/ports/518153 Log: graphics/libheif: Disable building of Go example Disable building of Go example code to avoid adding build dependency on go and gmake. PR: 242083 Submitted by: Sebastian Steinmetz <freebsd@sebastiansteinmetz.ch> (maintainer) Reported by: gja822@narod.ru Changes: head/graphics/libheif/Makefile
Committed maintainer approved patch, thanks everyone.