Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407371 - dev-libs/libxml2-2.7.8-r5 fails to compile against sys-libs/pthreads-win32-2.8.0
Summary: dev-libs/libxml2-2.7.8-r5 fails to compile against sys-libs/pthreads-win32-2.8.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 06:12 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2012-03-08 07:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge--info.txt (emerge--info.txt,3.26 KB, text/plain)
2012-03-08 06:12 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
build.log (build.log,85.07 KB, text/plain)
2012-03-08 06:16 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
libxml2-2.7.8-pthreads-win32.patch (libxml2-2.7.8-pthreads-win32.patch,919 bytes, patch)
2012-03-08 06:21 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-03-08 06:12:53 UTC
Created attachment 304587 [details]
emerge--info.txt

See the attached build.log.

The aggrieved line in testThreads.c is:

	    tid[i] = (pthread_t) -1;

This fails because pthreads-win32 (as a pthreads implementation is allowed, according to the POSIX documentation of pthread_equal()) declares pthread_t as a struct. From its pthread.h:

typedef struct {
    void * p;                   /* Pointer to actual object */
    unsigned int x;             /* Extra information - reuse count etc */
} ptw32_handle_t;

typedef ptw32_handle_t pthread_t;

This bug has been fixed upstream already in commit d794a84a9e147498069b4c582d57b899bf068187 ( http://git.gnome.org/browse/libxml2/commit/?id=d794a84a9e147498069b4c582d57b899bf068187 ). Applying this patch, which I'll attach,  fixes the compilation error for me.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-03-08 06:16:52 UTC
Created attachment 304589 [details]
build.log
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2012-03-08 06:21:06 UTC
Created attachment 304591 [details, diff]
libxml2-2.7.8-pthreads-win32.patch
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-03-08 07:00:08 UTC
Thanks, fixed in cvs.

>  08 Mar 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  libxml2-2.7.8-r5.ebuild, +files/libxml2-2.7.8-windows-thread_t.patch:
>  Fix building against pthreads-win32 (bug #407371, thanks to Nathan Phillip
>  Brink (binki)).