Opened 4 years ago

Last modified 2 years ago

#16965 closed bug

__STDC_NO_THREADS__ is not defined in Haiku — at Version 8

Reported by: Begasus Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: - General Version: R1/beta2
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by pulkomandy)

When trying to build scipy I getting an error that the script wants to include "threads.h". This however isn't availabe in Haiku and the check for that is due to __STDC_NO_THREADS__ not being defined.

The source of the issue is with numpy. See a PR at https://github.com/numpy/numpy/pull/18180

__STDC_VERSION__ = 201710
__STDC_NO_THREADS__ not defined
__GLIBC__ not defined

Change History (8)

comment:1 by korli, 4 years ago

__STDC_NO_THREADS__ is theorically set by the compiler, based on its knowledge of the C library. Practically gcc seems to include the header stdc-prereqs.h, which would eventually define such a macro.

Last edited 3 years ago by pulkomandy (previous) (diff)

comment:2 by Begasus, 4 years ago

Yeah, came across that also earlier, looked for that header but we don't include it in Haiku atm

comment:3 by korli, 4 years ago

I added a stdc-prereqs.h with https://review.haiku-os.org/c/haiku/+/4097 When it's accepted, GCC and Clang can be adjusted.

comment:4 by Begasus, 3 years ago

This has been accepted, I should check if it has been resolved, but I'm not sure if it also applied to R1B2?

comment:5 by pulkomandy, 3 years ago

It has been applied to nightlies, but not to the stable beta2 branch.

comment:6 by Begasus, 3 years ago

I think this could be closed, header is included in R1B3, building scipy without the patch for numpy seems to work (checked on x86_gcc2)

comment:7 by Begasus, 3 years ago

Ok, no problem reported by numpy, but scipy still fails to find it, so I'm guessing that clang/gcc aren't adjusted to use it, so best to leave it open until then

comment:8 by pulkomandy, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.