Created attachment 217103 [details]
updates DataDog's zstd golang wrapper to v1.4.5
In case archivers/zstd is installed, www/caddy port build process detects that fact, and tries to build stale version of Golang wrapper (v1.4.1) around libzstd, which uses incompatible obsolete zstd API. This breaks the build.
Noticed on trying to upgrade Caddy to 2.1.1 (bug #246623)
Switching to latest zstd wrapper release (v1.4.5) fixes the build.
Created attachment 217116 [details]
additional improvements on top of submitter's patch
Thanks for the report and the PR.
I can confirm the problem:
In file included from vendor/github.com/DataDog/zstd/zstd_stream.go:7:
/usr/local/include/zbuff.h:31:10: error: '../zstd.h' file not found, did you mean 'zstd.h'?
#include "../zstd.h" /* ZSTD_CStream, ZSTD_DStream, ZSTDLIB_API */
1 error generated.
And the patch fixes it in 12.1 amd64. Build tests for other versions/platforms didn't finish yet.
Clearing merge-quaterly since the version in 2020Q3 does not use DataDog:zstd at all.
As a note, please ensure the patch is in "Unix" text format as opposed as "ASCII text, with CRLF line terminators" :-)
I'll wait for the maintainer to provide feedback.
Thanks for your review. My pleasure to help.
As for CRLF line terminators, I suspect they had been inserted by the browser, and Bugzilla had just passed them on untouched.
I had provided my patch by pasting it into Bugzilla's textarea field, not via file upload.
HTML5 standard mandates compliant web browsers to submit form values containing line endings, forced normalized as CRLF. Looks like Bugzilla needs a small tweak to keep up with the times :)
Until that is sorted, if ever, I'll be using file upload from now on to provide patches via FreeBSD's Bugzilla.
Thanks for your note.
I could reproduce this issue on my own and this patch indeed solves it.
I'll check upstream if they can use the newer zstd so that we don't need to patch the coming releases.
A commit references this bug:
Date: Mon Aug 10 16:36:26 UTC 2020
New revision: 544626
www/caddy: fix build when archivers/zstd is installed
www/caddy ships with an obsoleted go wrapper for zstd. We need a newer one or
the build will fail if archivers/zstd is installed.
Submitted by: email@example.com
Reviewed by: firstname.lastname@example.org (maintainer)
Thanks to all!