Bug 203011 - net/xorp: fix build on 9.x or mark broken everywhere
Summary: net/xorp: fix build on 9.x or mark broken everywhere
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-10 13:06 UTC by Dmitry Marakasov
Modified: 2015-09-11 22:55 UTC (History)
0 users

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


Attachments
Patch (2.18 KB, patch)
2015-09-10 13:06 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer freebsd_triage 2015-09-10 13:06:57 UTC
Created attachment 160892 [details]
Patch

I've tried to fix xorg on 9.x:

http://beefy2.nyi.freebsd.org/data/93amd64-default/396547/logs/errors/xorp-1.8.5.log

there's a patch for SConstruct which is pretty much broken, as it tries to pass "-Werror -Wno-unused-function" compiler flag as a single argument. Also localbase patching is broken and in addition -Wno-unused-functions part of the patch is duplicated with REINPLACE_CMD. I've fixed the patch, and now it builds fine on both 9.x and 10.x, however no more on 11.x:

./libxorp/ref_trie.hh:1359:9: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare]
    if (this == NULL) {
        ^~~~    ~~~~

because -Werror flag is not interpreted correctly.

The problem however is not the flag but broken upstream code which causes undefined behavior, this the application may not work properly regardless of whether it compiles. Upstream seems pretty inactive, so now I wonder what should we do: remove -Werror, or mark it BROKEN. We could also fix trie code, but it'll require some work and much testing.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-09-11 22:51:46 UTC
A commit references this bug:

Author: hrs
Date: Fri Sep 11 22:51:12 UTC 2015
New revision: 396720
URL: https://svnweb.freebsd.org/changeset/ports/396720

Log:
  Fix compile error on 9.x and 11.x.

  Spotted by:	amdmi3
  PR:	203011

Changes:
  head/net/xorp/Makefile
  head/net/xorp/files/patch-SConstruct
  head/net/xorp/files/patch-bgp__path_attribute.cc
  head/net/xorp/files/patch-bgp__route_table_policy.cc
  head/net/xorp/files/patch-libxipc-xrl_parser.cc
  head/net/xorp/files/patch-libxorp-ref_trie.hh
  head/net/xorp/files/patch-rip-port.cc
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2015-09-11 22:55:28 UTC
Thank you for your report.  The warnings are due to a bug in the original code, so patches to fix them have been added.

If there is still something wrong, please reopen this PR.