Bug 202958 - Fix www/varnish4 build with clang 3.7.0
Summary: Fix www/varnish4 build with clang 3.7.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks: 201377
  Show dependency treegraph
 
Reported: 2015-09-07 21:30 UTC by Dimitry Andric
Modified: 2015-11-06 15:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (feld)


Attachments
Fix left-shifting of negative value in varnish4's copy of libz (1.11 KB, patch)
2015-09-07 21:30 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2015-09-07 21:30:06 UTC
Created attachment 160823 [details]
Fix left-shifting of negative value in varnish4's copy of libz

During the exp-run in bug 201377, it was found that www/varnish4 gives errors with a recent clang 3.7.0 snapshot:

http://package18.nyi.freebsd.org/data/headi386PR201377-default/2015-08-20_15h42m20s/logs/errors/varnish4-4.0.3_7.log

This is because it includes its own copy of libz, which does a left-shift on a negative number, and that is undefined.  I propose a similar fix as went into head very recently:

https://svnweb.freebsd.org/changeset/base/287541
Comment 1 Mark Felder freebsd_committer freebsd_triage 2015-09-15 13:58:38 UTC
This is good, sorry about the delay. Were you just doing an exp run or is clang 3.7.0 going to be default somewhere?

I feel like we should upstream this and let it trickle down if we have time.
Comment 2 Mark Felder freebsd_committer freebsd_triage 2015-09-15 14:07:46 UTC
I have created a pull request

https://github.com/varnish/Varnish-Cache/pull/64
Comment 3 Mark Felder freebsd_committer freebsd_triage 2015-09-21 19:59:21 UTC
Varnish took it upstream. I'm not sure when their next release is but 4.1.0 is coming soon-ish

https://github.com/varnish/Varnish-Cache/commit/c440f0e69325429a58fa648d07232f637573e4f6
Comment 4 Ed Maste freebsd_committer freebsd_triage 2015-10-15 20:46:41 UTC
> is clang 3.7.0 going to be default somewhere

For the benefit of anyone else finding this PR, Clang 3.7.0 is now in FreeBSD-HEAD.
Comment 5 Mark Felder freebsd_committer freebsd_triage 2015-10-16 19:59:25 UTC
I'm about to bring Varnish 4.1.0 into ports which will solve this PR
Comment 6 Mark Felder freebsd_committer freebsd_triage 2015-11-06 15:19:56 UTC
(In reply to Mark Felder from comment #5)

Varnish 4.1.0 was committed at revision r399688 which resolved this issue.