Created
June 14, 2012 14:42
-
-
Save robinsmidsrod/2930760 to your computer and use it in GitHub Desktop.
Problems dealing with installing ZeroMQ on various platforms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo aptitude install python-software-properties | |
sudo add-apt-repository ppa:chris-lea/libpgm | |
sudo add-apt-repository ppa:chris-lea/zeromq | |
sudo aptitude update | |
sudo aptitude install uuid-dev libzmq-dev uuid libzmq1 | |
cpan ZeroMQ | |
I then cloned the zguide git repo to try out some examples | |
git clone git://github.com/imatix/zguide.git | |
cd zguide/examples/Perl | |
chmod +x *.pl | |
perl -pi s'{/usr/bin/perl}{/usr/bin/env perl}' | |
I tried out the durasub.pl example, because I was curious about the pub/sub feature. | |
I bumped into a segfault with ZMQ_PUSH documented here, | |
https://github.com/lestrrat/ZeroMQ-Perl/issues/10, so I tried building from git. | |
git clone git://github.com/lestrrat/ZeroMQ-Perl.git | |
cpan Module::Install::AuthorTests \ | |
Module::Install::CheckLib \ | |
Module::Install::ReadmeFromPod \ | |
Module::Install::TestTarget \ | |
Module::Install::XSUtil \ | |
Test::Fatal \ | |
Test::Requires \ | |
Test::TCP \ | |
Devel::CheckLib | |
perl Makefile.PL | |
make | |
make test | |
make install | |
Unfortunately this didn't help with the problem, so I decided to comment on the aforementioned | |
issue, in hope of getting it solved. A got feedback that I should try to produce a gdb backtrace. | |
This gave me a problem that resulted in me unable to get a backtrace because of some threading issues. | |
After googling some I found this link, http://forums.opensuse.org/forums/english/other-forums/development/programming-scripting/412939-gdb-unable-debug-application.html?s=3640cede1a28dfa34d36e903900a82b3#post1975288 | |
that suggested I LD_PRELOAD the pthread library. | |
And actually, running LD_PRELOAD=/lib/libpthread.so.0 ./durasub.pl allows it to run without segmentation fault. | |
After a lot of debugging I tried to upgrade my perlbrew and install perl 5.14.2 with ithreads enabled, and it worked flawlessly. | |
No segmentation fault there. | |
Another perl ZeroMQ user, Al Tobey (http://tobert.org/), told me that I can use the D_REENTRANT flag | |
to the perl build to ensure pthread is linked in. I decided that if I was actually going to bother | |
to build a new perl binary, I might as well ensure I have threading enabled, so that I can | |
try out all the fancy threading-related features of ZeroMQ as well. | |
So, moral of the story is. If you've got segmentation faults, ensure your perl binary is compiled | |
with the necessary flags. | |
salt install (mostly from source) | |
aptitude install python-software-properties | |
add-apt-repository ppa:chris-lea/libpgm | |
add-apt-repository ppa:chris-lea/zeromq | |
aptitude update | |
aptitude install uuid-dev libzmq-dev uuid libzmq1 python-pip python-dev swig python-m2crypto python-crypto python-yaml | |
pip install pyzmq | |
pip install jinja2 | |
pip install msgpack-python | |
pip install https://github.com/saltstack/salt/tarball/develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment