A couple of things...
I believe cmake places an 'rpath' on the libraries when they are built.
This is removed when you run 'make install' and the libraries are copied
to their installed location.
The .so and .so.1 files are soft links to the .so.1.0.0 file. Depending
on how you copy them, they may act in unexpected ways.
You may need to set the environment variable LD_LIBRARY_PATH to your
local directory so the loader can find the library file if it's not in a
standard install location.
I hope this helps,
-Ted
On 01/22/2013 06:02 PM, Eagy, Taylor wrote:
Ted,
This is a follow up of our earlier discussion. After building Proton using
cmake as described, I copied and placed those four files into another directory:
~/myproject/proton/proton.py
~/myproject/proton/cproton.py
~/myproject/proton/_cproton.so
~/myproject/proton/libqpid-proton.so.1.0.0
~/myproject/proton/libqpid-proton.so.1
I found that I also needed a link libqpid-proton.so.1 to point to
libqpid-proton.so.1.0.0. However, after I removed the qpid-proton-c-0.2/build
directory, when I try to import proton.py, it spits out:
import proton
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "proton.py", line 33, in <module>
from cproton import *
File "cproton.py", line 26, in <module>
_cproton = swig_import_helper()
File "cproton.py", line 22, in swig_import_helper
_mod = imp.load_module('_cproton', fp, pathname, description)
ImportError: libqpid-proton.so.1: cannot open shared object file: No such file
or directory
Is there something in cmake that is adding absolute paths to the library files?
When I built again, importing proton worked fine. Is there a cmake variable
that I need to turn off to remove any references to the build directory? The
reason I need to do this is because when I copy it over to a clean install of
the same Linux version, it spits out that import error.
Thanks,
Taylor
________________________________
From: Eagy, Taylor [[email protected]]
Sent: Wednesday, January 16, 2013 12:13 PM
To: [email protected]
Subject: RE: Is Proton a lightweight alternative to Qpid?
Rafael and Ted,
Thanks for your help on this. I'm excited to see that proton is getting a
Windows port since I wasn't able to build it in VS2012 successfully.
Thanks,
Taylor
________________________________
From: Rafael Schloming [[email protected]]
Sent: Tuesday, January 15, 2013 8:13 PM
To: [email protected]
Subject: Re: Is Proton a lightweight alternative to Qpid?
If you run cmake this way you can build the minimal code needed for just
the proton library and its python bindings:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_PYTHON=ON -DBUILD_PHP=OFF
-DBUILD_PERL=OFF -DBUILD_RUBY=OFF <path_to_src_tree>
A quick test on my system shows that a make install based on the above
build works out to about 1.4MB. Stripping out header files and some package
config stuff would get you down to about 1.2MB if you want to go super
barebones.
--Rafael
On Tue, Jan 15, 2013 at 5:38 PM, Ted Ross <[email protected]> wrote:
Taylor,
You need the following files:
proton.py (from proton-c/bindings/python)
cproton.py (from $BUILD/bindings/python)
_cproton.so (from $BUILD/bindings/python)
libqpid-proton.so (from $BUILD)
-Ted
On 01/15/2013 03:35 PM, Eagy, Taylor wrote:
Ted,
Proton is more lightweight and the systems that it runs on won't have
Java installed. While I would prefer a more Pythonic portable solution, as
long as Proton-c builds within 5MB, then it should work. However, I'm
getting a bunch of undefined reference messages from pythonPYTHON_wrap.c
when trying to make install it. So if I just want to use the p2p messaging
between Python processes, what are the minimum amount of files that I need
to create a Python queue server to handle the queues between processes?
(i.e. proton.py, cproton.py, etc)
Thanks,
Taylor