Re: Strange pthread_self() return value

2021-06-12 Thread nia
On Fri, Jun 11, 2021 at 09:41:39PM +, RVP wrote: > 1. Is `hwloc_thread_t' the same as `pthread_t' when hwloc is compiled >on NetBSD? > > 2. Does a `make check' of hwloc on NetBSD pass? > > -RVP Yes to both. Martin pointed out on IRC that the problem is the main reference executable (as o

Re: Strange pthread_self() return value

2021-06-11 Thread RVP
On Fri, 11 Jun 2021, nia wrote: The segfault is actually in hwloc, a library used by OpenCL: Program received signal SIGSEGV, Segmentation fault. 0x764e5660a2c8 in pthread_getaffinity_np () from /usr/lib/libpthread.so.1 (gdb) bt #0 0x764e5660a2c8 in pthread_getaffinity_np () from /usr

Re: Strange pthread_self() return value

2021-06-11 Thread nia
On Fri, Jun 11, 2021 at 06:48:57PM +0200, Martin Husemann wrote: > On Fri, Jun 11, 2021 at 04:41:51PM +, nia wrote: > > However, this value comes from the return value of pthread_self(): > > You did not link with -pthread (so you get the libc stub of pthread_self()). > > Martin Hmm.. amnesi

Re: Strange pthread_self() return value

2021-06-11 Thread Martin Husemann
On Fri, Jun 11, 2021 at 04:41:51PM +, nia wrote: > However, this value comes from the return value of pthread_self(): You did not link with -pthread (so you get the libc stub of pthread_self()). Martin

Strange pthread_self() return value

2021-06-11 Thread nia
For some trivia/background, I am working on OpenCL support (some parallel computing standard that someone mentioned wanting) in pkgsrc. I've ported a "portable" CPU-based OpenCL implementation (parallel/pocl) to NetBSD. However, currently all reference OpenCL programs linked with -lOpenCL fail, s