Bug 204385 - devel/pure-stldict: Fails to build with GCC 4.9 (error: '::max_align_t' has not been declared)
Summary: devel/pure-stldict: Fails to build with GCC 4.9 (error: '::max_align_t' has n...
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: Vanilla I. Shu
URL:
Keywords: patch
Depends on:
Blocks: 196712
  Show dependency treegraph
 
Reported: 2015-11-09 09:10 UTC by Gerald Pfeifer
Modified: 2016-01-22 16:00 UTC (History)
6 users (show)

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


Attachments
diff-devel_pure-stldict (1.66 KB, patch)
2016-01-21 06:22 UTC, w.schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer 2015-11-09 09:10:02 UTC
We are working to move the default version of GCC in ports (lang/gcc)
from GCC 4.8 to GCC 4.9.

Sadly this port is one of a few that blocks this update, cf.

http://package22.nyi.freebsd.org/data/101amd64-default-PR196712/2015-10-25_21h38m31s/logs/errors/pure-stldict-0.5_4.log
Comment 1 Vanilla I. Shu freebsd_committer 2016-01-21 03:13:41 UTC
According the error log and defines of llvm+clang,

I think it's the define issue of gcc49, not lang/pure

--
more /usr/include/c++/v1/cstddef
--
#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
// Re-use the compiler's <stddef.h> max_align_t where possible.
using ::max_align_t;
#else
typedef long double max_align_t;
#endif
Comment 2 lichray 2016-01-21 03:17:05 UTC
(In reply to Vanilla I. Shu from comment #1)

It's FreeBSD libc's issue, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193594
Comment 3 w.schwarzenfeld 2016-01-21 03:53:54 UTC
https://gcc.gnu.org/gcc-4.9/porting_to.html

A workaround until libraries get updated is to include <cstddef> or <stddef.h> before any headers from that library.
Comment 4 w.schwarzenfeld 2016-01-21 06:22:56 UTC
Created attachment 165897 [details]
diff-devel_pure-stldict

This should it be, worked for me.
Comment 5 w.schwarzenfeld 2016-01-21 06:25:30 UTC
Forgot: I have made make makepatch, maybe you has delete the lines 1-11.
Comment 6 commit-hook freebsd_committer 2016-01-21 06:43:30 UTC
A commit references this bug:

Author: vanilla
Date: Thu Jan 21 06:43:09 UTC 2016
New revision: 406827
URL: https://svnweb.freebsd.org/changeset/ports/406827

Log:
  Fix build with gcc4.9.

  PR:		204385
  Submitted by:	gerald@, w.schwarzenfeld@aon.at
  Approved by: 	maintainer via twitter.

Changes:
  head/devel/pure-stldict/files/patch-Makefile
  head/devel/pure-stldict/files/patch-hashdict.cc
  head/devel/pure-stldict/files/patch-orddict.cc
Comment 7 Vanilla I. Shu freebsd_committer 2016-01-21 06:44:47 UTC
Hi:

I make another patch base on origin one, and it works on my testing.

thanks.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-21 06:46:29 UTC
@Vanilla, please assign issue to yourself prior to commit, or at least on close.

Also, re-opening this for MFH
Comment 9 commit-hook freebsd_committer 2016-01-22 15:57:12 UTC
A commit references this bug:

Author: vanilla
Date: Fri Jan 22 15:56:27 UTC 2016
New revision: 406935
URL: https://svnweb.freebsd.org/changeset/ports/406935

Log:
  MFH: r406819 r406827 r406927

  1: Upgrade to 0.8.
  2: remove USE_GCC, it's compilable with clang.
  3: Fix broken MASTER_SITES.
  4: Fix build with gcc4.9.

  PR:		204385
  Submitted by:	gerald@, w.schwarzenfeld@aon.at
  Approved by: 	portmgr@ (antoine)

Changes:
_U  branches/2016Q1/
  branches/2016Q1/devel/pure-ffi/Makefile
  branches/2016Q1/devel/pure-stldict/Makefile
  branches/2016Q1/devel/pure-stldict/distinfo
  branches/2016Q1/devel/pure-stldict/files/patch-Makefile
  branches/2016Q1/devel/pure-stldict/files/patch-hashdict.cc
  branches/2016Q1/devel/pure-stldict/files/patch-orddict.cc