verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
witness has joined #mlpack
cheng_ has joined #mlpack
< cheng_> hey guys anyone knows where i can get a statical lib of mlpack???
cheng__ has joined #mlpack
witness has quit [Read error: Connection reset by peer]
witness has joined #mlpack
witness has quit [Client Quit]
< naywhayare> cheng_: cheng__: you mean statically compiled?
< naywhayare> I could probably build you one quickly for Linux (if you let me know more about the target) but we don't have any precompiled builds for Windows
< cheng__> Oh. I'm trying to use it on Linux. If it's not too much can someone point me to the settings in CMake to build the statically libraries?
< cheng__> I might have to reproduce this process on other distros.
< cheng__> I work with a lot of statisticians, and I usually just distribute statically linked compiled binaries as many of them don't know how to work a compiler...
< cheng__> which is fine.
< cheng__> My dev system is ubuntu 15.04
< cheng__> the cluster this is gonna run on is RHEL 6 i belive??
< naywhayare> ah, okay
< naywhayare> I'm looking into what one needs to tell CMake to link statically now
< naywhayare> it may be as simple as changing the line "add_library(mlpack SHARED ${MLPACK_SRCS})" to "add_library(mlpack ${MLPACK_SRCS})", in src/mlpack/CMakeLists.txt
< naywhayare> I am currently testing to check...
cheng__ has quit [Ping timeout: 264 seconds]
cheng_ has quit [Ping timeout: 250 seconds]
travis-ci has joined #mlpack
< travis-ci> mlpack/mlpack#168 (master - 7b0b67d : Ryan Curtin): The build passed.
travis-ci has left #mlpack []
cheng_ has joined #mlpack
cheng__ has joined #mlpack
< naywhayare> cheng_: cheng__: I was able to make a static libmlpack.a by changing "add_library(mlpack SHARED ${MLPACK_SRCS})" to "add_library(mlpack ${MLPACK_SRCS})", in src/mlpack/CMakeLists.txt
< naywhayare> however, to link the programs that are built against libmlpack.a requires all of the link targets to be static (at least according to my minor knowledge of static linking with gcc/clang)
< naywhayare> so you would need to modify the CMake scripts to find only static versions of the boost libraries, and you'd need to modify the Armadillo CMake configuration in the same way as mlpack to build a statically-linked Armadillo
< naywhayare> I think those are the only changes you'd need to make... not 100% certain though
< cheng__> that sounds about right! thanks guys!!!
< cheng__> i'll try out your method naywhayare.
< cheng__> :]
< cheng__> so much appreciation.
< naywhayare> yeah, let me know if you have any issues; I'm happy to help out
< naywhayare> if it's statically linked, I don't think there will be any issues moving the code built on Ubuntu 15.04 to RHEL6
< naywhayare> the only issue would be if the architecture of the systems are different
< cheng__> Yea, that's all I need.
< cheng__> I'm using openMP so it's a pain to migrate to MacOS as well...
< cheng__> so I'm not doing it any time soon...
< cheng__> i cannot believe clang does not support openMP natively...
< cheng__> ugh.
< naywhayare> yeah, it's kind of frustrating that I can't test the OpenMP parts of mlpack with clang; I seem to remember reading that they are working on clang support for it, but I don't know when it'll be stable
< naywhayare> fortunately, even if OpenMP isn't available, the #pragmas are just ignored, so it should at least still compile and run, although serially :)
< cheng__> Yea. That's true. I've just given up on that though. The stuff I write would be insanely slow to run with single thread. I usually use 32 threads to run it.
< cheng__> on a cluster I use.
< cheng__> I was planning to implement parallelization with openMPI but got scared by how much more complicated it is than openMP lol
< cheng__> to think i took the distributed computing course and already understand the basics lol
< cheng__> utterly uselesss....
< naywhayare> yeah, I've been using boost.mpi and it's quite complex
< cheng__> openMP has been implemented with clang. but you need to recompile clang... which is not something i'm willing to do, considering it would be less stable than the version shipped with apple.
< cheng__> shipped with the os i mean.
< naywhayare> ah, okay
< cheng__> i'm eating an apple.
< naywhayare> yeah, recompiling clang, a bit too much overhead...
< naywhayare> hmmm, I should get an apple too... sounds good :)
< cheng__> thanks for the help btw, i'm trying it out now :]
< naywhayare> sure, hopefully it will work. the only part that I know works is compiling libmlpack.a statically, but I only have guesses for what needs to be done after that
< cheng__> oh, u mean link my program against the libmlpack.a??
< cheng__> hopefully that wont' turn out to be too painful.
< naywhayare> well, CMake should link against libmlpack.a automatically
< naywhayare> unless you're just building something on top of mlpack
< naywhayare> in which case yeah, just link against libmlpack.a; shouldn't be too terrible, I think you just need to pass -static to gcc (or some argument like that)
< cheng__> yea. that's straightforward.
< naywhayare> hopefully it's as straightforward as that :)
< naywhayare> I think that -static to gcc does require that all of the other things you need to link against are static too (if you're building against mlpack, that will probably mean you also need to link against armadillo and a few boost libraries)
< cheng__> ah... ideally i need to put the -static option after the gcc command to compile the mlpack
< cheng__> as well.
< cheng__> um... let me see how this goes. :]
< cheng__> will report back soon.
< cheng__> Linking CXX static library ../../lib/libmlpack.a
< cheng__> so that worked.
< cheng__> now let me see if i can actually link to that library statically lol
< naywhayare> great
< cheng__> yea i need static armadillo libraries as well.
< cheng__> the ubuntu package only comes with shared libs.
< cheng__> to add insult to injury, sourceforge is down and i cannot download armadillo right now... yay~~~~
< zoq> cheng__: you can still download armadillo from sourceforge: http://sourceforge.net/projects/arma/files/
< cheng__> wow.
< cheng__> amazing.
< cheng__> u guys are miracle workers.
< cheng__> :]
< cheng__> how did u find out about this???
< cheng__> every time i googled it, it just says links not available lol
< cheng__> um...
< cheng__> /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o: In function `_start':
< cheng__> this is what it's saying when i tried to build the static library of mlpack...
< cheng__> anyonen knows what crt1.o is???
< cheng__> what's weird is that this only happens when i tried statically linking them.
< cheng__> but this does not affect the libraries though, so maybe i can just move the headers and the libraries without using the executables???
< naywhayare> crap, I didn't see these messages, and I have to step out for a little while... I'll respond when I get back (15/20 minutes), sorry
< naywhayare> cheng__: sorry for the delay
< naywhayare> what are the rest of the errors below the crt1.o error?
< cheng__> oh no problem at all lol
< cheng__> i'm about to give up lol
< cheng__> maybe i'll switch to some other libraries that can do logistic regression
< cheng__> or i'll just implement it myself. this is not worth the time.
< naywhayare> :(
< naywhayare> sorry to hear that
< naywhayare> unfortunately static linking is not all that common of a use case
< cheng__> yea and i'm fairly certain
< cheng__> about that.
< cheng__> :]
< cheng__> i remember i couldn't get armadillo to work on another piece of software before
< cheng__> and i just gave up using it as well, cuz it just does not want to be compiled on my cluster.
< cheng__> :[d
< naywhayare> yeah, unfortunately Armadillo uses a lot of new C++11 functionality
< naywhayare> and I think that the RHEL6 default compiler does not support a lot of what Armadillo needs
< cheng__> so ugh... a day wasted. :[
< naywhayare> :(
< cheng__> i'll look into some other libraries easily compilable.
< naywhayare> good luck; maybe scikit might be useful? I have no idea what the python landscape looks like for static compilation
< cheng__> i have some c/c++ knowhow, i can't imagine what the mathematicians in my dept would do if they had to go through what i'm going through lol
< cheng__> i can't use scikit.
< cheng__> i mean i'm capable of using it but in my case my boss wants a c/c++ implementation.
< naywhayare> the only other reasonably maintained C++ library I know of is shogun; I don't know how easy compiling it statically will be
< naywhayare> there's also vowpal wabbit but I don't think the documentation is very good so I don't know if it'll be worth the time to figure it out
< cheng__> i means general in japanese lol
cheng_ has quit [Remote host closed the connection]
cheng__ has quit [Remote host closed the connection]
cheng_ has joined #mlpack
zoq has quit [Ping timeout: 244 seconds]
zoq has joined #mlpack
cheng_ has quit [Ping timeout: 256 seconds]
cheng_ has joined #mlpack
cheng_ has quit [Ping timeout: 240 seconds]