-
Notifications
You must be signed in to change notification settings - Fork 395
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
fix(profiling): allow to build on Alpine Linux #1391
Conversation
b3cb8f8
to
1a3a3db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a note to our documentation "How to build from source" that at least lists the required system packages?
Maybe just something in readme is fine?
@@ -938,6 +949,7 @@ workflows: | |||
- requestsgevent | |||
- sqlalchemy | |||
- sqlite3 | |||
- test_build_alpine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd consider adding all versions we support on alpine, but this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the compatibility issue is with their libc, not with any Python version specifically, so I don't think it's worth it.
This hides the pthread_t type usage and force the cast to unsigned long thread no matter what. This is fine with glibc and musl libc at least. Fixes DataDog#1388
1a3a3db
to
f7c098c
Compare
Do you mean for Alpine, or for every Linux distro? |
Yes? It should mostly just be "you need python headers and a c++ compiler", example for probably don't need to be exhaustive... ? or maybe not worth it? |
I don't think it has been a problem so far. But if we ever get support/issues opened on this, it might be worth it. (don't misread me, I don't want to sound like the guy who doesn't want to write documentation. 😆) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! 😄
# ctypedef unsigned long pthread_t | ||
# but e.g. musl libc defines pthread_t as a struct __pthread * which breaks the arithmetic Cython | ||
# wants to do. | ||
# We pay this with a warning at compilation time, but it works anyhow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This hides the pthread_t type usage and force the cast to unsigned long thread no matter what. This is fine with glibc and musl libc at least. Fixes #1388
This hides the pthread_t type usage and force the cast to unsigned long thread
no matter what.
This is fine with glibc and musl libc at least.
Fixes #1388