Comments (7)
I have cross-checked the musl source code, and it turns out that their pthread_t definition is made of as much insanity as the rest of their threading support...
#ifdef __cplusplus
TYPEDEF unsigned long pthread_t;
#else
TYPEDEF struct __pthread * pthread_t;
#endif
...so I guess I'll just redefine ThreadId to be c_ulong on musl and call it a day. 🤷
from hwlocality.
Should be good now.
from hwlocality.
Do we know why libc::pthread_t is void* on Alpine ? Is it a general musl thing ?
from hwlocality.
Wow, musl is so amazing. I've never seen such an inconvenient and insane implementation.
from hwlocality.
Try to update to the freshly released hwlocality-sys v0.4.1 and you should hopefully be good to go.
from hwlocality.
Sorry for necrobumping, but there is one remaining error
error[E0308]: mismatched types
--> src/lib.rs:266:14
|
264 | pub fn current_thread_id() -> ThreadId {
| -------- expected `u64` because of return type
265 | // SAFETY: Should be always safe to call
266 | unsafe { libc::pthread_self() }
| ^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `*mut c_void`
|
= note: expected type `u64`
found raw pointer `*mut c_void`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `hwlocality` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
from hwlocality.
This should be resolved by #116, and the hwlocality 1.0.0-alpha.2 release that I'll push which integrates it.
Long-term, I should set up a musl build in CI to avoid this sort of issues, but I do not have the time for this right now.
from hwlocality.
Related Issues (20)
- `rustls-tls` instead of OpenSSL for reqwest
- Road to v1 HOT 1
- Add a musl build to CI
- Disagreement of membind:set_thisthread_membind HOT 9
- Dynamic loading HOT 1
- Bump MSRV to 1.70 once old enough HOT 1
- create does not appear to be published yet HOT 10
- Topology::cpuset causes segfault HOT 4
- Try to make bundled feature work on macOS, without dynamic linking HOT 4
- Add support for hwloc v2.10
- Update description to emphasize that bundled version exists HOT 2
- Use standard library's ThreadId rather than custom type alias HOT 3
- Clarify dependencies required HOT 5
- Aarch64 compilation error
- The fully qualified file name must be less than 260 characters
- Consider downloading vendored library from a specific commit hash HOT 3
- Cross-compilation on macOS fails HOT 5
- Use runtime env vars CARGO_CFG_* for probing target, os and flavor in build.rs
- For vendored hwloc, allow to build the minimal version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hwlocality.