Skip to content
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

socket.AF_UNIX is not supported #163

Closed
muromec opened this issue Oct 16, 2013 · 5 comments
Closed

socket.AF_UNIX is not supported #163

muromec opened this issue Oct 16, 2013 · 5 comments

Comments

@muromec
Copy link

muromec commented Oct 16, 2013

Hi!

I have tried to use local sockets in kivy app and noticed, that local sockets are disabled at compile time.

Python configure script fails to check "sys/un.h" header (which is sort of broken on android) and disables HAVE_SYS_UN_H flag:

    configure:6133: checking sys/un.h usability
    configure:6133: ccache arm-linux-androideabi-gcc -DANDROID -mandroid  -fomit-frame-pointer --sysroot /home/kivy/android/android-ndk-r8c/platforms/android-14/arch-arm -c -DANDROID -mandroid  -fomit-frame-pointer --sysroot /home/kivy/android/android-ndk-r8c/platforms/android-14/arch-arm  conftest.c >&5

In file included from /home/kivy/android/android-ndk-r8c/platforms/android-14/arch-arm/usr/include/sys/un.h:32,
from conftest.c:84:
/home/kivy/android/android-ndk-r8c/platforms/android-14/arch-arm/usr/include/linux/un.h:18: error: expected specifier-qualifier-list before 'sa_family_t'

related android issue: https://code.google.com/p/android/issues/detail?id=53711

Possible solution is to either add workaround to configure script or force-enable HAVE_SYS_UN_H in pyconfig.h.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@joehunt588
Copy link

Hello muromec,how the progress? Did u manage solve it?i have counter same error ,i change it to AF_INET it working as charm,please reply if u have other methods,although it have been 3 years sorry for been late ^-^

@inclement
Copy link
Member

Closing as probably fixed or different after all the many NDK changes over the years.

@Davincible
Copy link

I have tried this too, and while it did compile, I got an error while trying to bind to a local Unix socket address. Error: "OSError: [Errno 22] Invalid argument".

For me it would be really usefull to get unix sockets to work to communicate with android services, since using AF_INET sockets works nice on first run, but if the app crashes and doesn't unbind properly the socket cannot be bound again until device restart because it's occupied.

@AndreMiras
Copy link
Member

@Davincible I'm doing inter-process communication via kivy/oscpy and it works pretty well

@inclement
Copy link
Member

@Davincible I'm going to leave this closed as not an active issue, since it's unlikely anyone will be actively looking into it. However, a PR to improve it would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants