#2712 closed defect (fixed)
Build 7292 compile not work (edit: only with openwrt?!), Build 7291 ok
Reported by: | The_Raven | Owned by: | |
---|---|---|---|
Priority: | major | Component: | General |
Severity: | medium | Keywords: | |
Cc: | gf@… | Sensitive: | no |
Description
Revision
7292
Issue Description
Does not compile
When the issue occurs
When try to compile
How the issue is reproducable
Compile it and you see it. ;-)
This is the Error:
oscam.c: In function 'add_job':
oscam.c:4167: warning: implicit declaration of function 'pthread_getcpuclockid'
/tmp/ccPeS3JH.o: In function `add_job':
oscam.c:(.text.add_job+0x570): undefined reference to `pthread_getcpuclockid'
collect2: ld returned 1 exit status
Attachments (1)
Change History (13)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Checked again and it looks that it happens only if crosscompile! Nativ build works!
comment:3 by , 12 years ago
cross compile also working (db2)
maybe a specific module is causing the problem which you complile and I don't
comment:4 by , 12 years ago
Hm, very strange! db2 works, but can you please test openwrt2.6? Works with 7291 but not with 7292.
comment:5 by , 12 years ago
Priority: | critical → major |
---|---|
Severity: | high → medium |
comment:7 by , 12 years ago
Summary: | Build 7292 compile not work, Build 7291 ok → Build 7292 compile not work (edit: only with openwrt?!), Build 7291 ok |
---|
comment:8 by , 12 years ago
Guys this is an issue with the toolchain. The libc do not define pthread_getcpuclockid. We already have similar problems that were solved here: http://www.streamboard.tv:8001/ticket/2564#comment:4
I think anybody who have this problem should bother the guys that give him such old/broken libc.
comment:9 by , 12 years ago
Ok, http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getcpuclockid.html
It seems that this is a new function and it is unsupported under OS X as well. I think it can safely be replaced by times(3).
comment:10 by , 12 years ago
Well, I have looked at the pthread_getclockid() usage and I think the following should resolve the situation:
diff --git a/oscam.c b/oscam.c index 4d16396..7e2d568 100644 --- a/oscam.c +++ b/oscam.c @@ -4162,9 +4162,8 @@ void add_job(struct s_client *cl, int8_t action, void *ptr, int32_t len) { //Thread down??? pthread_mutex_lock(&cl->thread_lock); if (cl->thread_active) { - clockid_t clock_id; //Just test for invalid thread id: - if (pthread_getcpuclockid(cl->thread, &clock_id) == ESRCH) { + if (pthread_detach(cl->thread) == ESRCH) { cl->thread_active = 0; cs_log("WARNING: %s %s thread died!", cl->typ=='c'?"client":"reader", username(cl)); }
by , 12 years ago
Attachment: | oscam-pthread_getcpuclockid.c.diff added |
---|
comment:12 by , 12 years ago
Hm, in german we say "i understand only trainstation" what means: I understand nothing :-)
But works again! Thx for fixing it!
cannot confirm this problem
compiled 7292 for i386 with simplebuild without any error