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

WEBRTC_ARCH_*, PPC and environment variable? #78

Open
th0ma7 opened this issue Dec 19, 2021 · 5 comments
Open

WEBRTC_ARCH_*, PPC and environment variable? #78

th0ma7 opened this issue Dec 19, 2021 · 5 comments

Comments

@th0ma7
Copy link

th0ma7 commented Dec 19, 2021

Context

Using SynoCommunity spksrc framework and looking into migrating to newer python.
The framework automatically build for multiple-archs.
Part of my current PR I'm trying to reduce the usage local patches.
PR: SynoCommunity/spksrc#4998
Checks: https://github.com/SynoCommunity/spksrc/runs/4576241935?check_suite_focus=true

Specific

It happens that we currently patch the code to define WEBRTC_ARCH_LITTLE_ENDIAN
Another method would be #41 but that isn't possible as we are batch processing all cross-compiled requirements with a generic pip call.

Ask

Would it be possible to provide the ability to use exported environment variable like some others projects do?

export WEBRTC_ARCH_LITTLE_ENDIAN=TRUE
or
export WEBRTC_ARCH=LITTLE_ENDIAN
or anything else...

Thnx in advance.

@th0ma7
Copy link
Author

th0ma7 commented Dec 23, 2021

The following solves my issue:

diff --git ./cbits/webrtc/typedefs.h ./cbits/webrtc/typedefs.h
index 51d8992..8286eca 100644
--- cbits/webrtc/typedefs.h
+++ cbits/webrtc/typedefs.h
@@ -47,6 +47,13 @@
 #elif defined(__pnacl__)
 #define WEBRTC_ARCH_32_BITS
 #define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__PPC__)
+#if defined(__PPC64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
+#define WEBRTC_ARCH_BIG_ENDIAN
 #else
 #error Please add support for your architecture in typedefs.h
 #endif

@th0ma7 th0ma7 changed the title WEBRTC_ARCH_LITTLE_ENDIAN and environment variable? WEBRTC_ARCH_*, PPC and environment variable? Dec 23, 2021
@th0ma7
Copy link
Author

th0ma7 commented Dec 23, 2021

Also tried passing CFLAGS directly such as -D__PPC64__ -DWEBRTC_ARCH_64_BITS -DWEBRTC_ARCH_BIG_ENDIAN but that doesn't work. Only modifying the typedefs.h seems to work.

@th0ma7
Copy link
Author

th0ma7 commented Dec 23, 2021

I just noticed, all the code is good to go and already in this repository! 3bd7613

Its just need another release to happen :)

@wiseman would it be possible to release a new version of the code as it already contains the fixes. Also making it available to pypi repository as well? Thnx in advance and happy holiday!

@th0ma7
Copy link
Author

th0ma7 commented Dec 23, 2021

Modifying my requirements.txt file as a workaround solves the issue until a new version gets released.

# webrtcvad==2.0.10           # requires unreleased version at specific commit
git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad

hgy59 added a commit to hgy59/spksrc that referenced this issue May 29, 2023
hgy59 added a commit to hgy59/spksrc that referenced this issue Jun 16, 2023
hgy59 added a commit to hgy59/spksrc that referenced this issue Jul 29, 2023
hgy59 added a commit to hgy59/spksrc that referenced this issue Aug 19, 2023
hgy59 added a commit to SynoCommunity/spksrc that referenced this issue Aug 20, 2023
* homeassistant: update to v2023.5.4
- update homeassistant to v2023.5.4
- update HACS integration to v1.32.1
- update DTLSSocket to v0.1.15
- update and adjust requirements

* fix build of greenlet wheel for older compilers
* fix build of protobuf wheel for older compilers

* fix build of webrtcvad for arch-qoriq-6.1
- thanks to @th0ma7 for wiseman/py-webrtcvad#78
- thanks to @smaarn for wiseman/py-webrtcvad@3bd7613

* homeassistant: update to v2023.7.3
- update homeassistant to v2023.7.3
- update to python311 with openssl3
- this PR now depends on #5820 to be merged first

* fix some integrations
- add cross/libstdc++ to fix grpcio for DSM < 7
- add cross/opus to fix voice over ip integration
- fix Google Generative AI Conversation integration (requires grpcio fix and google_generativeai)

* migrate to PYTHON_PACKAGE
@daanzu
Copy link

daanzu commented Sep 10, 2024

Fix available in fork: https://github.com/daanzu/py-webrtcvad-wheels

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

2 participants