Bug 209692 - math/octave: Fix build with libc++ 3.8.0
Summary: math/octave: Fix build with libc++ 3.8.0
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: Maho Nakata
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-05-22 09:37 UTC by Dimitry Andric
Modified: 2016-06-05 16:49 UTC (History)
0 users

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

Disable custom max_align_t definition for math/octave (533 bytes, patch)
2016-05-22 09:37 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

  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)