Previous Thread
Next Thread
Print Thread
pthread_setaffinity_np compile error #41638
05/26/08 11:56 PM
05/26/08 11:56 PM
Joined: May 2008
Posts: 7
Land of Many Squirrels
A
adam Offline OP
Member
adam  Offline OP
Member
A
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

Re: pthread_setaffinity_np compile error [Re: adam] #41641
05/27/08 02:33 AM
05/27/08 02:33 AM
Joined: Mar 2001
Posts: 15,988
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 15,988
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)

Re: pthread_setaffinity_np compile error [Re: R. Belmont] #41651
05/27/08 12:48 PM
05/27/08 12:48 PM
Joined: May 2008
Posts: 7
Land of Many Squirrels
A
adam Offline OP
Member
adam  Offline OP
Member
A
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?

Re: pthread_setaffinity_np compile error [Re: adam] #41655
05/27/08 01:50 PM
05/27/08 01:50 PM
Joined: Mar 2001
Posts: 15,988
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 15,988
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

Re: pthread_setaffinity_np compile error [Re: R. Belmont] #41664
05/27/08 04:10 PM
05/27/08 04:10 PM
Joined: May 2008
Posts: 7
Land of Many Squirrels
A
adam Offline OP
Member
adam  Offline OP
Member
A
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...

Re: pthread_setaffinity_np compile error [Re: adam] #46541
11/27/08 03:27 AM
11/27/08 03:27 AM
Joined: Feb 2007
Posts: 16
Noumea (NC)
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
1 registered members (Praxis), 73 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,566
Posts111,891
Members4,805
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.045s Queries: 14 (0.018s) Memory: 5.6232 MB (Peak: 5.8094 MB) Zlib enabled. Server Time: 2018-08-19 19:30:49 UTC