Opened 14 years ago

Closed 14 years ago

#2597 closed Bugs (fixed)

Boost fails to build when long doubles not supported

Reported by: smr@… Owned by: John Maddock
Milestone: Boost 1.38.0 Component: math
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

Boost.Math builds a test file to check whether long double math is supported. If it is not, the build fails with an error which is misleading because it is not an error but, rather, a successful build of all parts except the long double version of boost_math_c99 and boost_math_tr1.

This issue causes the builds to fail for Debian; c.f. http://buildd.debian.org/fetch.cgi?&pkg=boost1.37&ver=1.37.0-2&arch=mips&stamp=1229469355&file=log

Because of this, I have to patch Debian to disable building these libraries for certain platforms. The attached patch enables this by adding a --disable-long-double flag to the build process.

There must be a way to do this automatically (?).

Attachments (1)

add-disable-long-double.patch (1.5 KB ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (5)

by anonymous, 14 years ago

comment:1 by John Maddock, 14 years ago

Status: newassigned

Well, this is the way of doing it automatically! Or at least the best we can achieve with current the Boost.Build :-(

An alternative would be to add a <build>no property to the has_long_double.cpp compile test for platforms which are known to have no long double support. Then you wouldn't see the failure, but you would still see a lot of targets skipped - rightly so IMO since part of the library can't be built there should be at least some user warning?

Would this be acceptable, and is there a way to detect the debian version within Boost.Build?

Thanks, John.

in reply to:  1 comment:2 by smr@…, 14 years ago

Replying to johnmaddock:

Well, this is the way of doing it automatically! Or at least the best we can achieve with current the Boost.Build :-(

I've opened a discussion about this on boost-build; c.f. http://lists.boost.org/boost-build/2008/12/20974.php

An alternative would be to add a <build>no property to the has_long_double.cpp compile test for platforms which are known to have no long double support. Then you wouldn't see the failure, but you would still see a lot of targets skipped - rightly so IMO since part of the library can't be built there should be at least some user warning?

I agree that a warning is warranted.

Would this be acceptable, and is there a way to detect the debian version within Boost.Build?

I don't know. I guess if you can run some kind of command for this, maybe try running "cc -c has_long_double_support.cpp" and test for existence of has_long_double_support.o?

comment:3 by anonymous, 14 years ago

I don't know. I guess if you can run some kind of command for this, maybe try running "cc -c has_long_double_support.cpp" and test for existence of has_long_double_support.o?

Unfortunately that wouldn't work: we couldn't be sure that the compiler we are *actually* building with was the one in the path. We might also be building with more than one compiler :-(

We could the output from uname and that's probably about it...

John.

comment:4 by John Maddock, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [50378]) Simplified version of patch in #2597. Fixes #2597.

Note: See TracTickets for help on using tickets.