[mlpack-git] [mlpack] Add mlpack::backtrace utility. (#535)

Ryan Curtin notifications at github.com
Thu Mar 3 15:06:23 EST 2016


I tested this on Linux, it works great when I make the necessary change to CMakeLists.txt.  I tried to compile on OS X and I get this:

```
[2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/backtrace.cpp.o
clang: warning: argument unused during compilation: '-rdynamic'
In file included from /Users/ryan_curtin/src/mlpack-kirizaki/src/mlpack/core/util/backtrace.cpp:22:
/opt/local/include/bfd.h:35:2: error: config.h must be included before this header
#error config.h must be included before this header
 ^
1 error generated.
```

I think that this has been tested on OS X and is known to not work, so maybe we disable HAS_BFD_DL in the CMake configuration if we are on OS X?  Either way we should be sure that compilation works out-of-the-box on OS X.

Also there is the warning from clang that -rdynamic is unsupported; maybe different handling is necessary there?
http://stackoverflow.com/questions/21279036/what-is-clangs-equivalent-to-rdynamic-gcc-flag/21279573#21279573
That one will be a little bit weird because apparently the flag is different on OS X!

I haven't been able to actually test with clang because of a Debian bug that affects the system I was testing on:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917

It would also be cool to test this on FreeBSD but my FreeBSD box is not running right now... :(

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/535#issuecomment-191940409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160303/3b8cf67e/attachment.html>


More information about the mlpack-git mailing list