Previous Thread
Next Thread
Print Thread
#41638 - 05/26/08 11:56 PM pthread_setaffinity_np compile error  
Joined: May 2008
Posts: 7
adam Offline
Member
adam  Offline
Member

Joined: May 2008
Posts: 7
Land of Many Squirrels
Hi there, I find (the excellent) sdlmame very easy to compile on Ubuntu, but have problems with the Xandros on the eeePC. The specific error I get is:
cc1: warnings being treated as errors
src/osd/sdl/sdlsync.c: In function 'osd_thread_cpu_affinity':
src/osd/sdl/sdlsync.c:594: warning: implicit declaration of function 'pthread_setaffinity_np'

I went into the makefile and hashed out the "-Werror" line in the compile flags section, but then I had similar error messages when linking, and I couldn't figure out how to force that through.

Any ideas? And thanks in advance.

gcc --version returns 4.1.2 20061115
make --version returns 3.81

#41641 - 05/27/08 02:33 AM Re: pthread_setaffinity_np compile error [Re: adam]  
Joined: Mar 2001
Posts: 15,933
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,933
USA
Hmm. I know that was problematic on BSD - does Xandros not use standard glibc or something?

Anyway, you can disable the advanced sync (you'll lose scaling beyond 2 CPUs but on an Eee that's, heh, not really an issue) by editing src/osd/sdl/sdlsync.h and change the:

#define THREAD_COOPERATIVE (1)

to

#define THREAD_COOPERATIVE (0)

#41651 - 05/27/08 12:48 PM Re: pthread_setaffinity_np compile error [Re: R. Belmont]  
Joined: May 2008
Posts: 7
adam Offline
Member
adam  Offline
Member

Joined: May 2008
Posts: 7
Land of Many Squirrels
You are a scholar and a gentleman, sir, and that did indeed allow compilation. Am a bit curious, though: before I posted that first question, I took the liberty of installing the latest libc from the Debian repos - a quick "ls" reports /lib/libc-2.7.so

Could I have avoided the "thread_cooperative" fix by going with version 2.4 of libc as demanded by MAME?

#41655 - 05/27/08 01:50 PM Re: pthread_setaffinity_np compile error [Re: adam]  
Joined: Mar 2001
Posts: 15,933
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,933
USA
Nah, that shouldn't have mattered. It's known to work as-is on (K)Ubuntu, so I'm a little surprised there was an issue on another Debian derivative, but if distros were predictable they'd be no fun smile

#41664 - 05/27/08 04:10 PM Re: pthread_setaffinity_np compile error [Re: R. Belmont]  
Joined: May 2008
Posts: 7
adam Offline
Member
adam  Offline
Member

Joined: May 2008
Posts: 7
Land of Many Squirrels
Mmm, *buntu is certainly one of the better ones when it comes to things "just working"... Now, if only it booted faster...

#46541 - 11/27/08 03:27 AM Re: pthread_setaffinity_np compile error [Re: adam]  
Joined: Feb 2007
Posts: 16
ludomatic Offline
Member
ludomatic  Offline
Member

Joined: Feb 2007
Posts: 16
Noumea (NC)
Same problems on my Debian Etch and version 0.128: started with comment of the "-Werror" flag yesterday but still had the 'pthread_setaffinity_np' error.

Looked around the web for a while and the answer was finally here!
Thanks!!

I hope to publish soon SDLMAME (v0.128) packages for debian Etch and Lenny. Just need to debug them a bit now.

Thanks again for your work and disponibility smile


SDLMAME & SDLMESS for Debian @ http://apt.ludomatic.fr/

Moderated by  R. Belmont 

Who's Online Now
2 registered members (AJR, Sune), 20 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,534
Posts111,540
Members4,793
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.036s Queries: 14 (0.015s) Memory: 4.9667 MB (Peak: 5.1583 MB) Zlib enabled. Server Time: 2018-05-22 15:40:06 UTC