Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost.Math is a header-only library now #217

Closed
rcurtin opened this issue Dec 29, 2014 · 1 comment
Closed

Boost.Math is a header-only library now #217

rcurtin opened this issue Dec 29, 2014 · 1 comment
Assignees
Milestone

Comments

@rcurtin
Copy link
Member

rcurtin commented Dec 29, 2014

Reported by rcurtin on 9 Apr 42282472 10:33 UTC
As of Boost 1.37 or so (a long time ago), Boost.Math became a header-only library. Most distributions still provide a libboost-math-c99.so, but some (RHEL5 and RHEL6 base packages -- not ATrpms or other third-party repositories) do not, because it's header-only. Some investigation needs to happen here to figure out how to handle this:

  1. Why do most repositories still provide a shared library for Boost.Math if it is header-only? What's in it?
  2. CMake should look for the shared library; if it does not find it, it should search for the Boost.Math headers. If those aren't found, the configuration should fail; otherwise, it should be successful.

Currently, a build on RHEL5 or RHEL6 without third-party repositories fails because there is no shared library for Boost.Math.

@rcurtin rcurtin self-assigned this Dec 29, 2014
@rcurtin rcurtin added this to the mlpack 1.0.2 milestone Dec 29, 2014
@rcurtin rcurtin closed this as completed Dec 29, 2014
@rcurtin
Copy link
Member Author

rcurtin commented Dec 30, 2014

Commented by rcurtin on 17 Oct 42605838 03:45 UTC

  1. Newer versions of math_c99.so still have things in them. For example, 1.48 has
:[ ryan @ greenstreet ]: $ readelf -Ws /usr/lib/libboost_math_c99.so | grep math
   119: 0000000000010f50    28 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr18isfiniteIdEEbT_
   131: 0000000000010f00    68 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr110fpclassifyIdEEiT_
   133: 0000000000010fa0    41 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr18isnormalIdEEbT_
   134: 0000000000010f70    24 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr15isinfIdEEbT_
   135: 0000000000010f90     8 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr15isnanIdEEbT_
   142: 0000000000010ef0     8 FUNC    GLOBAL DEFAULT   12 _ZN5boost4math3tr17signbitIdEEbT_

and older versions have more, but it seems as though this stuff is not needed for MLPACK; that is, when I remove -lboost_math_c99, there are no problems.

  1. Given that we don't need to link against it, we can just drop math_c99 from the Boost dependencies. This change was committed with r13371.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant