Bug 209692

Summary: math/octave: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Maho Nakata <maho>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (maho)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Disable custom max_align_t definition for math/octave none

Description Dimitry Andric freebsd_committer 2016-05-22 09:37:57 UTC
Created attachment 170540 [details]
Disable custom max_align_t definition for math/octave

During the exp-run in bug 208158, it was found that math/octave gives errors with libc++ 3.8.0 [1]:

In file included from array/Array-b.cc:29:
In file included from ./array/Array.h:32:
In file included from /usr/include/c++/v1/algorithm:626:
In file included from /usr/include/c++/v1/cstring:61:
In file included from ../libgnu/string.h:33:
../libgnu/stddef.h:93:3: error: typedef redefinition with different types ('union max_align_t' vs 'long double')
} max_align_t;
  ^
/usr/include/c++/v1/stddef.h:57:21: note: previous definition is here
typedef long double max_align_t;
                    ^

This is because octave contains a libgnu/stddef.h, which tries to fix possible omissions in the standard stddef.h header.  Unfortunately, this clashes in C++ mode with the stddef.h from libc++.  Fix this similarly to bug 208175, by telling the configure script that the system already has max_align_t, through setting ac_cv_type_max_align_t=yes.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/octave-4.0.0_2.log
Comment 1 commit-hook freebsd_committer 2016-06-05 16:48:02 UTC
A commit references this bug:

Author: antoine
Date: Sun Jun  5 16:47:09 UTC 2016
New revision: 416401
URL: https://svnweb.freebsd.org/changeset/ports/416401

Log:
  Fix build with libc++ 3.8.0, by disabling custom max_align_t definition

  PR:		209692
  Submitted by:	dim@
  Approved by:	maintainer timeout (2 weeks)

Changes:
  head/math/octave/Makefile