[mlpack-git] [mlpack] Segmentation fault with armadillo v5 and up (#431)

Ryan Curtin notifications at github.com
Tue Apr 14 17:44:39 EDT 2015


First things first, I disabled the CMake warning for ARMA_64BIT_WORD in fea3f6e.

Can you give me more information on what you've done?

My own investigation uncovered a bug in Armadillo 5.000.0, where the symbol `arma_cxx11_rng_instance` isn't properly being compiled into libarmadillo.so.  I can compile libmlpack.so successfully, but trying to compile anything against libmlpack.so that requires `arma_cxx11_rng_instance` (so, anything that uses random numbers from Armadillo) gives me something of the form

```
/tmp/ccBf4Ouc.o: In function `TLS wrapper function for arma::arma_rng_cxx11_instance':
test.cpp:(.text._ZTWN4arma23arma_rng_cxx11_instanceE[_ZTWN4arma23arma_rng_cxx11_instanceE]+0x5): undefined reference to `TLS init function for arma::arma_rng_cxx11_instance'
test.cpp:(.text._ZTWN4arma23arma_rng_cxx11_instanceE[_ZTWN4arma23arma_rng_cxx11_instanceE]+0x15): undefined reference to `arma::arma_rng_cxx11_instance'
collect2: error: ld returned 1 exit status
```

I reported the problem upstream, and there will probably be a fix in the next day or so (5.000.1 probably?)

I'd expect you to be encountering the same problem too, but the fact that you aren't leads me to suspect that you are compiling against Armadillo 5.000.0 but linking against an older version of libarmadillo.so (which does not have `ARMA_64BIT_WORD` enabled) and thus as soon your code calls something internal to libarmadillo.so, stack mangling and other assorted disasters occur.  But... the backtrace you provide is from boost, not from Armadillo, so... could I get more information?  What OS is this on?

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/431#issuecomment-93076552
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150414/9570ff41/attachment.html>


More information about the mlpack-git mailing list