-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named AlljoynRouter #1
Comments
You may want to try
https://github.com/glennpierce/core-alljoyn
I remember trying to get it to build with the rest of the AllJoyn source
code.
I attempted to build the AlljoynRouter.so with scons.
The command
scons OS=linux WS=off OE_BASE=/usr BR=on BINDINGS=c,cpp,python
works for me. You also need your cross compile stuff obviously.
I could never work out how to place the
generated alljoyn_python/AllJoynPy/AllJoynPythonRouter.so
in the correct lib directory. No one on the mailing list ever replied to me
about that.
I may have ended up copying it to the Python path.
The AllJoyn build system seems like it could be made easier.
I got a little disillusioned having to have AllJoynPythonRouter.so. It only
exists to have the built in router ie two functions
because for some reason those functions weren't in the dynamic alljoyn
library. I basically had to compile a huge static lib just for those.
You may want to edit alljoyn_python/AllJoynPy/__init__.py
and remove
import AllJoynPythonRouter
and change
def RouterInit(self):
AllJoynPythonRouter.RouterInit()
def RouterShutdown(self):
AllJoynPythonRouter.RouterShutdown()
to
def RouterInit(self):
pass
def RouterShutdown(self):
pass
If you are using the alljoyn -router binary you shouldn't need those
functions.
I probably should have just givin up having support for a built in router.
It was too much hassle.
Unfortunately I don't work on these bindings anymore as my Allplay
speakers (Alljoyn based) all decided to fail so I ended up creating
my own music sync system with cheap components and gstreamer.
Good luck
…On 9 January 2017 at 00:41, mclarkk ***@***.***> wrote:
Hi there! I'm trying to install these Python AllJoyn bindings on a
Raspberry Pi. I have AllJoyn installed and the alljoyn-daemon running
successfully on it. I installed this module with the following command (I
added the option build_ext -n -I/home/pi/alljoyn-16.04a-src/
alljoyn_core/inc because the original build couldn't find my AllJoyn
Init.h when trying to build the router):
$> sudo python setup.py install build_ext -n -I/home/pi/alljoyn-16.04a-src/alljoyn_core/inc
running install
running build
running build_py
running build_ext
building 'AlljoynRouter' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DQCC_OS_GROUP_POSIX=1 -I/home/pi/alljoyn-16.04a-src/alljoyn_core/inc -I/usr/include/python2.7 -c AllJoynPy/Router.c -o build/temp.linux-armv7l-2.7/AllJoynPy/Router.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-armv7l-2.7/AllJoynPy/Router.o -lalljoyn -lajrouter -o build/lib.linux-armv7l-2.7/AlljoynRouter.so
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/AllJoynPy-1.0.egg-info
Writing /usr/local/lib/python2.7/dist-packages/AllJoynPy-1.0.egg-info
So it looks like installation was successful, including the build of the
AlljoynRouter. However, when I go to run BasicService.py (with
alljoyn-daemon running) I get the following:
Traceback (most recent call last):
File "BasicService.py", line 3, in <module>
from AllJoynPy import AllJoyn, AboutListener, MsgArg, AboutData, \
File "/usr/local/lib/python2.7/dist-packages/AllJoynPy/__init__.py", line 22, in <module>
import AlljoynRouter
ImportError: No module named AlljoynRouter
I don't see AlljoynRouter.so under build/lib.linux-armv7l-2.7, nor do I
see Router.o under build/temp.linux-armv7l-2.7/AllJoyn, so perhaps the
extension is not getting installed? Do you have any idea about what might
be causing that?
Thank you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAqOR9SiBHMkltEHve4JDdrrDA711TxWks5rQYIvgaJpZM4Ld297>
.
|
Thanks for the reply! Yeah, the whole distributed D-Bus idea behind AllJoyn seems like a good idea, but the codebase is a mess with regards to usability. I'll give it another shot this weekend, but I'm thinking it might actually be less hassle to whip up my own lightweight bus that captures the good ideas of AllJoyn without all the enterprise-y baggage (none of the devices I have support AllJoyn and would need to have adapters written anyway). Thanks again! |
Yes I do wondered if all the extra complication of these IPC mechanisms are
worth it. Unless the is some particular need it is often easier using
restful xml or json interfaces.
Good luck
…On 11 January 2017 at 19:58, mclarkk ***@***.***> wrote:
Thanks for the reply! Yeah, the whole distributed D-Bus idea behind
AllJoyn seems like a good idea, but the codebase is a mess with regards to
usability. I'll give it another shot this weekend, but I'm thinking it
might actually be less hassle to whip up my own lightweight thing that
captures the good ideas there without all the enterprise-y baggage (none of
the devices I have support AllJoyn and would need to have adapters written
anyway). Thanks again!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAqORznZBQYZx5HSugS4voxYceWwc1Mmks5rRTRQgaJpZM4Ld297>
.
|
Hi there! I'm trying to install these Python AllJoyn bindings on a Raspberry Pi. I have AllJoyn installed and the alljoyn-daemon running successfully on it. I installed this module with the following command (I added the option
build_ext -n -I/home/pi/alljoyn-16.04a-src/alljoyn_core/inc
because the original build couldn't find my AllJoyn Init.h when trying to build the router):So it looks like installation was successful, including the build of the AlljoynRouter. However, when I go to run BasicService.py (with alljoyn-daemon running) I get the following:
I don't see
AlljoynRouter.so
underbuild/lib.linux-armv7l-2.7
, nor do I seeRouter.o
underbuild/temp.linux-armv7l-2.7/AllJoyn
, so perhaps the extension is not getting installed? Do you have any idea about what might be causing that?Thank you!
The text was updated successfully, but these errors were encountered: