We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5396 - checking for pthreads... no
Summary: checking for pthreads... no
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-13 13:33 UTC by Rene Dudfield
Modified: 2020-12-14 01:11 UTC (History)
1 user (show)

See Also:


Attachments
config.log (348.49 KB, text/plain)
2020-12-13 14:14 UTC, Rene Dudfield
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Dudfield 2020-12-13 13:33:12 UTC
Using tip(d08f9559922f) on CentOS 5, pthreads support is not detected by the configure script.

"checking for pthreads... no"
Comment 1 Ozkan Sezer 2020-12-13 13:44:59 UTC
(In reply to Rene Dudfield from comment #0)
> Using tip(d08f9559922f) on CentOS 5, pthreads support is not detected by the
> configure script.
> 
> "checking for pthreads... no"

Well, we need at least your config.log to understand the issues.
Comment 2 Ozkan Sezer 2020-12-13 13:52:11 UTC
Ugh.. nasty copy/paste typo from 5395 fix. Fixed by
https://hg.libsdl.org/SDL/rev/f60231cbd8cd
Comment 3 Rene Dudfield 2020-12-13 14:13:30 UTC
Thanks :)

Sorry to do this... but I get another compile issue:

/sdl_build/SDL2-2.0.12/src/core/linux/SDL_threadprio.c: In function ‘rtkit_initialize_realtime_thread’:
/sdl_build/SDL2-2.0.12/src/core/linux/SDL_threadprio.c:106:51: error: ‘SCHED_RESET_ON_FORK’ undeclared (first use in this function)
     int nSchedPolicy = sched_getscheduler(nPid) | SCHED_RESET_ON_FORK;
                                                   ^
/sdl_build/SDL2-2.0.12/src/core/linux/SDL_threadprio.c:106:51: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/SDL_threadprio.lo] Error 1
make: *** Waiting for unfinished jobs....



SCHED_RESET_ON_FORK ancient... and is on the host.

From the configure...

checking for pthreads... yes
checking for recursive mutexes... yes
checking for pthread semaphores... yes
checking for sem_timedwait... yes
checking for pthread_np.h... no
checking for pthread_setname_np... no
checking for pthread_set_name_np... no

I've attached the configure.log
Comment 4 Rene Dudfield 2020-12-13 14:14:24 UTC
Created attachment 4578 [details]
config.log
Comment 5 Rene Dudfield 2020-12-13 14:18:57 UTC
I'm not sure if this will be useful, but here's how to reproduce with a docker based build.

git clone https://github.com/pygame/pygame.git
git checkout sdl2.0.14-test
cd buildconfig/manylinux-build
make base-image-manylinux-x86 wheels-manylinux-x86


To get a shell on there.
    docker run --name manylinux1_base_i686 -it pygame/manylinux1_base_i686

To copy the config.log file off there into a SDL2-2.0.12/config.log locally:

    docker run pygame/manylinux1_base_i686 tar -c -C /sdl_build SDL2-2.0.12/config.log | tar x
Comment 6 Ozkan Sezer 2020-12-13 15:03:43 UTC
Pushed https://hg.libsdl.org/SDL/rev/58c41548a7d4  to fix
your SCHED_RESET_ON_FORK issue: SCHED_RESET_ON_FORK is in
kernel >= 2.6.32. Don't honestly know how the result will
be at run time if built on such an old system.

Closing as fixed.
Comment 7 Rene Dudfield 2020-12-14 01:11:29 UTC
Thank you very much Ozkan :)