You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by Phil Harvey <ph...@philharveyonline.com> on 2012/11/29 17:13:40 UTC

Problems building and running proton-c on Linux RHEL 5

I'm having problems building and running proton-c on my machine.  I'm
hitting two problems so far:

- I get an "Unable to find 'php.swg' " error.  A web search suggests that
this relates to the version of swig I have installed (it's v1.3.29).  My
current workaround is to comment out the php Swig stuff in the make file.

- When I try to run the Python tests, Python errors with the message "No
module named uuid".  Again, I believe this is a versioning problem.  I'm
running Python 2.4, and I believe the uuid module was included in later
versions of Python.

Unfortunately my rights to upgrade the packages on my machine are quite
limited.

I'm interested to know if others have seen this problem and whether they
believe any changes need to be made to the make files, or is my environment
simply too old to be supported by Proton?

Also, although dependencies such as Python and Swig are mentioned in
proton-c/README, the required *versions* of them are not.  Is this stuff
written down anywhere? If not, does anyone know what the required versions
of the dependencies actually are?

Thanks
Phil

Re: Problems building and running proton-c on Linux RHEL 5

Posted by Rafael Schloming <rh...@alum.mit.edu>.
On Thu, Nov 29, 2012 at 11:13 AM, Phil Harvey <ph...@philharveyonline.com>wrote:

> I'm having problems building and running proton-c on my machine.  I'm
> hitting two problems so far:
>
> - I get an "Unable to find 'php.swg' " error.  A web search suggests that
> this relates to the version of swig I have installed (it's v1.3.29).  My
> current workaround is to comment out the php Swig stuff in the make file.
>
> - When I try to run the Python tests, Python errors with the message "No
> module named uuid".  Again, I believe this is a versioning problem.  I'm
> running Python 2.4, and I believe the uuid module was included in later
> versions of Python.
>
> Unfortunately my rights to upgrade the packages on my machine are quite
> limited.
>
> I'm interested to know if others have seen this problem and whether they
> believe any changes need to be made to the make files, or is my environment
> simply too old to be supported by Proton?
>
> Also, although dependencies such as Python and Swig are mentioned in
> proton-c/README, the required *versions* of them are not.  Is this stuff
> written down anywhere? If not, does anyone know what the required versions
> of the dependencies actually are?
>

This is a good question. I don't think we do know what versions are
actually required, just the versions we happen to use in development. We
should probably list those at least, but I would expect the code to work in
a much wider variety of environments than just that. (FWIW, I use python
2.7.3.)

--Rafael

Re: Problems building and running proton-c on Linux RHEL 5

Posted by Andrew Stitcher <as...@redhat.com>.
On Tue, 2012-12-04 at 17:46 +0000, Phil Harvey wrote:
> ...
> Linking C shared module _cproton.so
> /usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o):
> relocation R_X86_64_32 against `a local symbol' can not be used when making
> a shared object; recompile with -fPIC
> /usr/local/lib/python2.6/config/libpython2.6.a: could not read symbols: Bad
> value
> collect2: ld returned 1 exit status
> make[2]: *** [bindings/python/_cproton.so] Error 1
> make[1]: *** [bindings/python/CMakeFiles/_cproton.dir/all] Error 2
> make: *** [all] Error 2
> 

It looks to me like you need to build the local version of python2.6
with a shared library rather than a static one. The basic complaint
above is the linker saying: "You told me to build position independent
code, but the library you gave me to resolve this symbol isn't compiled
position independently". The library name "libpython2.6.a" is the
give-away that it's trying to link against a static library instead of a
dynamic shared lib.

> This looks like it could be an environmental problem rather than an issue
> with Proton itself, but any suggestions about how to work around it would
> be gratefully received.  I don't build a lot of C code so am not the best
> at diagnosing this kind of error.

You can't work around it as far as I know, you'll have to build python
2.6 correctly.

Andrew


Re: Problems building and running proton-c on Linux RHEL 5

Posted by Phil Harvey <ph...@philharveyonline.com>.
Thanks for the reply Ted.

In an attempt to avoid the uuid module problem I've managed to upgrade to a
later version of Python (2.6), and am now hitting a different error -- now
at build time.

When I run "make all" I get the following error:

$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make all
...
...
Scanning dependencies of target _cproton
[ 86%] Swig source
/home/phil/dev/proton/proton-
c/include/proton/engine.h:67: Warning(451): Setting a const char * variable
may leak memory.
[ 91%] Building C object bindings/python
/CMakeFiles/_cproton.dir/pythonPYTHON_wrap.c.o
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:
In function ‘SWIG_Python_ConvertFunctionPtr’:
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:2035:
warning: initialization discards qualifiers from pointer target type
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:
In function ‘SWIG_AsCharPtrAndSize’:
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:2548:
warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible
pointer type
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:
In function ‘SWIG_Python_FixMethods’:
/home/phil/dev/proton/proton-c/build/bindings/python/pythonPYTHON_wrap.c:19222:
warning: initialization discards qualifiers from pointer target type
Linking C shared module _cproton.so
/usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be used when making
a shared object; recompile with -fPIC
/usr/local/lib/python2.6/config/libpython2.6.a: could not read symbols: Bad
value
collect2: ld returned 1 exit status
make[2]: *** [bindings/python/_cproton.so] Error 1
make[1]: *** [bindings/python/CMakeFiles/_cproton.dir/all] Error 2
make: *** [all] Error 2

This looks like it could be an environmental problem rather than an issue
with Proton itself, but any suggestions about how to work around it would
be gratefully received.  I don't build a lot of C code so am not the best
at diagnosing this kind of error.

Thanks,
Phil



On 29 November 2012 19:44, Ted Ross <tr...@redhat.com> wrote:

> Phil,
>
> With regard to the python uuid issue, this was handled in qpid (see
> qpid/python/build/lib/qpid/**datatypes.py).  Perhaps proton needs to use
> a similar approach.
>
> -Ted
>
>
> On 11/29/2012 11:13 AM, Phil Harvey wrote:
>
>> I'm having problems building and running proton-c on my machine.  I'm
>> hitting two problems so far:
>>
>> - I get an "Unable to find 'php.swg' " error.  A web search suggests that
>> this relates to the version of swig I have installed (it's v1.3.29).  My
>> current workaround is to comment out the php Swig stuff in the make file.
>>
>> - When I try to run the Python tests, Python errors with the message "No
>> module named uuid".  Again, I believe this is a versioning problem.  I'm
>> running Python 2.4, and I believe the uuid module was included in later
>> versions of Python.
>>
>> Unfortunately my rights to upgrade the packages on my machine are quite
>> limited.
>>
>> I'm interested to know if others have seen this problem and whether they
>> believe any changes need to be made to the make files, or is my
>> environment
>> simply too old to be supported by Proton?
>>
>> Also, although dependencies such as Python and Swig are mentioned in
>> proton-c/README, the required *versions* of them are not.  Is this stuff
>> written down anywhere? If not, does anyone know what the required versions
>> of the dependencies actually are?
>>
>> Thanks
>> Phil
>>
>>
>

Re: Problems building and running proton-c on Linux RHEL 5

Posted by Ted Ross <tr...@redhat.com>.
Phil,

With regard to the python uuid issue, this was handled in qpid (see 
qpid/python/build/lib/qpid/datatypes.py).  Perhaps proton needs to use a 
similar approach.

-Ted

On 11/29/2012 11:13 AM, Phil Harvey wrote:
> I'm having problems building and running proton-c on my machine.  I'm
> hitting two problems so far:
>
> - I get an "Unable to find 'php.swg' " error.  A web search suggests that
> this relates to the version of swig I have installed (it's v1.3.29).  My
> current workaround is to comment out the php Swig stuff in the make file.
>
> - When I try to run the Python tests, Python errors with the message "No
> module named uuid".  Again, I believe this is a versioning problem.  I'm
> running Python 2.4, and I believe the uuid module was included in later
> versions of Python.
>
> Unfortunately my rights to upgrade the packages on my machine are quite
> limited.
>
> I'm interested to know if others have seen this problem and whether they
> believe any changes need to be made to the make files, or is my environment
> simply too old to be supported by Proton?
>
> Also, although dependencies such as Python and Swig are mentioned in
> proton-c/README, the required *versions* of them are not.  Is this stuff
> written down anywhere? If not, does anyone know what the required versions
> of the dependencies actually are?
>
> Thanks
> Phil
>