Opened 9 years ago
Closed 9 years ago
#5389 closed Bug (fixed)
transmission-2.80: libpthread compile error
Reported by: | tals | Owned by: | jordan |
---|---|---|---|
Priority: | Normal | Milestone: | 2.81 |
Component: | libtransmission | Version: | 2.80 |
Severity: | Normal | Keywords: | |
Cc: |
Description
Building transmission-2.80 fails with the following error:
In file included from platform.c:55: /usr/include/pthread.h:455: error: syntax error before '*' token /usr/include/pthread.h:460: error: syntax error before '*' token /usr/include/pthread.h:463: error: syntax error before '*' token /usr/include/pthread.h:466: error: syntax error before '*' token /usr/include/pthread.h:469: error: syntax error before '*' token /usr/include/pthread.h:472: error: syntax error before '*' token /usr/include/pthread.h:491: error: syntax error before '*' token /usr/include/pthread.h:497: error: syntax error before '*' token /usr/include/pthread.h:500: error: syntax error before '*' token /usr/include/pthread.h:503: error: syntax error before '*' token /usr/include/pthread.h:508: error: syntax error before '*' token /usr/include/pthread.h:512: error: syntax error before '*' token /usr/include/pthread.h:516: error: syntax error before '*' token make[1]: *** [platform.o] Error 1
ENV: kernel: 2.4.28 (uClibc 0.9.27) gcc: 3.3.6
P.S.: There was a similar issue: https://trac.transmissionbt.com/ticket/534
Attachments (1)
Change History (7)
comment:1 Changed 9 years ago by jordan
comment:2 Changed 9 years ago by rb07
Its not only systems using uClibc, its a lot of NASes running older versions of Linux, and GNU libc.
I have one (kernel 2.6.12 built on 2005, with libc 2.3.6), and have been looking at this mess, the problem is in platform.c, in my NAS you can correct the problem shown above by including <sys/types.h> after <pthread.h>, but then you have another problem with <sys/quota.h>, so that is not a solution (which is the one used 6 years ago in #534 when quota.h was not being used).
Has anybody thought of a way to get rid of pthread's recursive locks? That could be a cleaner solution.
Changed 9 years ago by rb07
comment:3 Changed 9 years ago by rb07
Attached a simple fix: since the problem is just headers clashing, I separated the thread stuff from the quota stuff.
Tested on my NAS, version 2.80 builds fine (and its up and running).
Of course it needs more testing, on all the different platforms where the quota stuff makes different things. From a functional point of view, I didn't change a thing, so is should work as before.
One note about the quota stuff, unrelated to this ticket, but its inclusion broke the build on Cygwin, I already added a note about that, and a workaround in the Wiki (building Transmission).
comment:4 Changed 9 years ago by tals
Thank you!
Works for me as well. Compiled as following:
--disable-nls --disable-mac --without-gtk --enable-lightweight --without-inotify --without-kqueue --without-systemd-daemon
comment:5 Changed 9 years ago by jordan
- Milestone changed from None Set to 2.81
- Status changed from new to assigned
comment:6 Changed 9 years ago by jordan
- Resolution set to fixed
- Status changed from assigned to closed
Patch merged as-is in r14110. Thanks!
None of the devs are running on uClibc, but if you want to track this down and find a patch for it I'd be happy to test it / use it.