Opened 13 years ago

Closed 12 years ago

#3892 closed Bugs (fixed)

boost/numeric/interval.hpp breaks on darwin/macports

Reported by: Spundun Bhatt <spundun@…> Owned by: Boris Gubenko
Milestone: Boost 1.43.0 Component: interval
Version: Boost 1.41.0 Severity: Showstopper
Keywords: Cc: nox@…

Description

host:build $ cat tmp.cc #include <boost/numeric/interval.hpp>

host:build $ gcc -I/opt/local/include tmp.cc -c In file included from /opt/local/include/boost/numeric/interval.hpp:18,

from tmp.cc:1:

/opt/local/include/boost/numeric/interval/hw_rounding.hpp:40:4: error: #error Boost.Numeric.Interval: Please specify rounding control mechanism.

Attachments (1)

tmp.i (58.9 KB ) - added by Spundun Bhatt <spundun@…> 13 years ago.
output of gcc -I/opt/local/include tmp.cc -dM -E > tmp.i

Download all attachments as: .zip

Change History (6)

by Spundun Bhatt <spundun@…>, 13 years ago

Attachment: tmp.i added

output of gcc -I/opt/local/include tmp.cc -dM -E > tmp.i

comment:1 by Spundun Bhatt <spundun@…>, 13 years ago

Basically on my Mac/darwin system, boost numeric intervals doesn't understand what rounding mechanism to use or something like that.

It's deciding based on the built-in macros set by gcc. I've attached a file containing all the macros that gcc sets. It's not setting i386 macro. boost needs a way around this.

comment:2 by nox <nox@…>, 13 years ago

Cc: nox@… added

Hi there, I'm the maintainer of the boost port on MacPorts and I can confirm this. It seems gcc does not set __USE_ISOC99 on Snow Leopard, I don't know about earlier versions of Mac OS X. The good thing is that it does define _GLIBCXX_USE_C99 so I think we should use this instead.

comment:3 by Spundun Bhatt <spundun@…>, 13 years ago

I checked and _GLIBCXX_USE_C99 is available on both OSX and Fedora 9. Replacing this macro sounds like a reasonable thing to do.

comment:4 by Vicente Botet <vicente.botet@…>, 12 years ago

Could some of you provide a tested patch?

comment:5 by Marshall Clow, 12 years ago

Resolution: fixed
Status: newclosed

Just tried this on my mac with the both the trunk and release branch - I get no errors.

It does happen with Boost 1.42.0 and 1.43.0 - but not on 1.44.0 or 1.45.0

I'm marking this bug as fixed - if it persists on your systems, please reopen.

Note: See TracTickets for help on using tickets.