Bug 243310 - graphics/silgraphite: Fails to build on 13.0-CURRENT: /usr/include/c++/v1/type_traits:3699:9: error: no mathing constructor for initialization of 'gr3:ooo::Segment'
Summary: graphics/silgraphite: Fails to build on 13.0-CURRENT: /usr/include/c++/v1/typ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-13 09:32 UTC by Lorenzo Salvadore
Modified: 2020-02-01 12:55 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)
koobs: merge-quarterly?


Attachments
silgraphite error log (4.65 KB, text/plain)
2020-01-13 09:32 UTC, Lorenzo Salvadore
no flags Details
silgraphite - fix Segment.cpp (848 bytes, patch)
2020-01-30 11:10 UTC, Lorenzo Salvadore
salvadore: maintainer-approval? (sunpoet)
Details | Diff
Fix for 13-CURRENT (2.86 KB, patch)
2020-01-31 14:39 UTC, Po-Chuan Hsieh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2020-01-13 09:32:46 UTC
Created attachment 210682 [details]
silgraphite error log

The port fails to build on 13.0-CURRENT with the attached message.

The error does not depend on anything I have in my /etc/make.conf: I set __MAKE_CONF=/dev/null to be sure of it.

I am on amd64.

Ports tree revision: 522170 (head)
Src tree revision: 356358
Comment 1 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2020-01-30 02:28:08 UTC
With a recent upgrade of FreeBSD-12/stable, I get the same problem.

Here is a fix/workaround.  Unfortunately the way patches are written in files makes it quite hard for me to figure out how to properly incorporate this.  But somehow you want to make the port use this patch:

--- engine/src/segment/Segment.cpp-old   2020-01-29 20:10:08.829253000 -0600
+++ engine/src/segment/Segment.cpp       2008-08-21 09:24:32.000000000 -0500

@@ -577,10 +575,7 @@
        int crefThis = m_cref;
        int crefOther = pgrseg->m_cref;
 
-       std::swap(*this, *pgrseg);
+       //std::swap(*this, *pgrseg);
+       Segment tmp = *this;
+       *this = *pgrseg;
+       *pgrseg = tmp;
 
        m_cref = crefThis;
        pgrseg->m_cref = crefOther;

Overall it seems to me like a compiler bug, because I think that std:swap should simply work.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2020-01-30 11:10:31 UTC
Created attachment 211187 [details]
silgraphite - fix Segment.cpp

Here is the patch proposed by Stephen in svn diff format.
I tested it and it fixed the problem for me.

Thank you very much Stephen.
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-01-31 14:39:13 UTC
Created attachment 211220 [details]
Fix for 13-CURRENT

(In reply to Stephen Montgomery-Smith from comment #1)
(In reply to Lorenzo Salvadore from comment #2)

Could you please try this one [1]?
I just tested it on a -head poudriere jail and it works.

[1] Also available at https://people.FreeBSD.org/~sunpoet/patch/graphics-silgraphite.txt
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2020-01-31 15:33:31 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #3)

I tested successfully your patch.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-01-31 16:03:28 UTC
A commit references this bug:

Author: sunpoet
Date: Fri Jan 31 16:03:17 UTC 2020
New revision: 524720
URL: https://svnweb.freebsd.org/changeset/ports/524720

Log:
  Fix build on 13-CURRENT

  PR:		243310
  Reported by:	salvadore, stephen
  Tested by:	salvadore

Changes:
  head/graphics/silgraphite/Makefile
  head/graphics/silgraphite/files/patch-engine-include-graphite-Segment.h
  head/graphics/silgraphite/files/patch-engine-src-segment-Segment.cpp
Comment 6 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-02-01 12:55:10 UTC
(In reply to Stephen Montgomery-Smith from comment #1)

> Overall it seems to me like a compiler bug, because I think that std:swap should simply work.

IIRC, C++ only allows assigning temporary objects to const reference. That's why the copy constructor does not work.
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-02-01 12:55:27 UTC
Committed. Thanks!