Hello Ken,

Based on your reply, I did some investigation. I modified cproton.i to detect 
what version of python is used and I confirmed it is using Python < 3


cproton.i

-----------------

#if PY_VERSION_HEX >= 0x03000000
#else
#error Unsupported choice setting
#endif



I hit the error "Unsupported choice setting" when compiling.


I also ran truss because strace was not working correctly and it is loading the 
correct _cproton.so using python 2.7.9.


So init_cproton is generated correctly in the code and is present.


Do you have some other advice? Could there be an #ifdef related to linux (if 
defined(__GNUC__)) which is not defined for Solaris or something else?


Regards,

Adel

________________________________
From: Ken Giusti <[email protected]>
Sent: Monday, January 16, 2017 7:38:46 PM
To: [email protected]
Subject: Re: [Proton 0.16.0] Compiling Proton Python bindings on Solaris is 
failing in the python tests

Adel -

I've hit this error before and it was due to a mix up with my library paths.

When I got that error my 2.7 python env was trying to load the .so built using 
the python3 library.

Can you run strace on the test to see exactly which _cproton.so is being loaded?

-K


----- Original Message -----
> From: "Adel Boutros" <[email protected]>
> To: [email protected]
> Sent: Monday, January 16, 2017 1:28:36 PM
> Subject: Re: [Proton 0.16.0] Compiling Proton Python bindings on Solaris is 
> failing in the python tests
>
> I just compiled SWIG 1.3.40 on Solaris and tried but still got the same error
> :(
>
> ________________________________
> From: Adel Boutros <[email protected]>
> Sent: Monday, January 16, 2017 7:00:41 PM
> To: [email protected]
> Subject: [Proton 0.16.0] Compiling Proton Python bindings on Solaris is
> failing in the python tests
>
> Hello,
>
>
> I am actually trying to activate the python bindings in Proton so I can
> compile Dispatch Router on Solaris. However, the python unit tests of Proton
> are failing.
>
> Cmake Configuration
>
> ----------------------------
>
> Found PythonInterp: ..../bin/python (found version "2.7.9")
> Found SWIG: ..../bin/swig (found version "2.0.9")
> Found CyrusSASL: ..../lib/64/libsasl2.so
> Found PythonLibs: ..../libpython2.7.so (found suitable exact version "2.7.9")
> Could NOT find Ruby (missing:  RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
>
>
> Error (tests/python/proton-test)
>
> ---------------------
>
> 1:   File "..../build-dir/proton/proton-c/bindings/python/cproton.py", line
> 22, in swig_import_helper
> 1:     _mod = imp.load_module('_cproton', fp, pathname, description)
> 1: ImportError: dynamic module does not define init function (init_cproton)
>
>
> Analysis
>
> --------------------
>
> Listing symbols in _cproton.so shows the above function is available
>
> nm _cproton.so  | grep init_cproton
> [62]    |        340924|        5677|FUNC |LOCL |2    |13     |init_cproton
>
>
> I suspect SWIG version (2.0.9) to be the culprit however I am not pretty sure
> if it related. On Linux, I am using SWIG version 1.3.40 and it is working.
>
> I am actually out of ideas. So any help is highly appreciated!
>
>
> PS: I am compiling in 64-bit mode in case it helps.
>
>
> Regards,
>
> Adel
>

--
-K

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to