Bug 240256 - devel/arachne-pnr: fix build with GCC-based architectures
Summary: devel/arachne-pnr: fix build with GCC-based architectures
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: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-01 20:26 UTC by Piotr Kubaj
Modified: 2019-09-16 11:23 UTC (History)
1 user (show)

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


Attachments
patch (392 bytes, patch)
2019-09-01 20:26 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (jsorocil)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-09-01 20:26:59 UTC
Created attachment 207075 [details]
patch

Building with GCC9 fails with:
src/util.hh: In instantiation of ‘std::set<typename M::key_type> keys(const M&) [with M = std::map<CBit, bool>; typename M::key_type = CBit]’:
src/chipdb.cc:73:23:   required from here
src/util.hh:191:24: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
  191 |   return std::move(keys);
      |                        ^
src/util.hh:191:24: note: remove ‘std::move’ call

As reported at https://github.com/YosysHQ/arachne-pnr/issues/134

Add -Wno-error=pessimizing-move to CFLAGS for GCC build.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-01 22:59:34 UTC
Reporter is committer, assign accordingly

@Piotr Could you do this (assign yourself) for issues you report where MAINTAINER != committer please? Thanks!

Feel free also do to so (assign yourself) in cases where MAINTAINER == committer and maintainer timeout (14+ days)

Note also:

* Build fixes don't require maintainer approval, as they are implicitly:

Approved by: portmgr (blanket: build fix)
Approved by: ports-secteam (blanket: build fix) - For MFH's

* -Werror removal also doesn't require maintainer approval, as it is implicitly:

Approved by: portmgr (blanket: ports/framework compliance)
Approved by: ports-secteam (blanket: ports/framework compliance) - For MFH's
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2019-09-01 23:21:51 UTC
(In reply to Kubilay Kocak from comment #1)

> * Build fixes don't require maintainer approval, as they are implicitly:
>
> Approved by: portmgr (blanket: build fix)
> Approved by: ports-secteam (blanket: build fix) - For MFH's

Uh ... no?

These are fixes that *only* affect GCC-based installations.  Several maintainers have objected to the way we have been trying to do these.

> * -Werror removal also doesn't require maintainer approval, as it is implicitly:
>
> Approved by: portmgr (blanket: ports/framework compliance)
> Approved by: ports-secteam (blanket: ports/framework compliance) - For MFH's

Uh ... where does it say that?
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2019-09-04 00:04:51 UTC
Mentor approval (once maintainer acts).  It builds for me on a clang-based system.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-09-16 11:23:42 UTC
A commit references this bug:

Author: pkubaj
Date: Mon Sep 16 11:22:54 UTC 2019
New revision: 512167
URL: https://svnweb.freebsd.org/changeset/ports/512167

Log:
  devel/arachne-pnr: fix build with GCC-based architectures

  Building with GCC9 fails with:
  src/util.hh: In instantiation of ?std::set<typename M::key_type> keys(const M&) [with M = std::map<CBit, bool>; typename M::key_type = CBit]?:
  src/chipdb.cc:73:23:   required from here
  src/util.hh:191:24: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
    191 |   return std::move(keys);
        |                        ^
  src/util.hh:191:24: note: remove ?std::move? call

  As reported at https://github.com/YosysHQ/arachne-pnr/issues/134

  Add -Wno-error=pessimizing-move to CFLAGS for GCC build.

  PR:		240256
  Approved by:	linimon (mentor), jsorocil@gmail.com (maintainer timeout)

Changes:
  head/devel/arachne-pnr/Makefile