Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333771 - sys-libs/pthreads-w32: new ebuild for Windows pthreading library
Summary: sys-libs/pthreads-w32: new ebuild for Windows pthreading library
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard: sunrise-suggested
Keywords: EBUILD
Depends on: 333763
Blocks: 326757
  Show dependency tree
 
Reported: 2010-08-21 09:48 UTC by Dennis Schridde
Modified: 2019-09-15 13:00 UTC (History)
2 users (show)

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


Attachments
ebuild for a CVS snapshot of pthreads-w32 (pthreads-w32-2.9.0_pre20100821.ebuild,1.78 KB, text/plain)
2010-08-21 09:57 UTC, Dennis Schridde
Details
ebuild for last released version (pthreads-w32-2.8.0.ebuild,1.93 KB, text/plain)
2010-08-21 09:58 UTC, Dennis Schridde
Details
ebuild for last released version (pthreads-w32-2.8.0.ebuild,2.00 KB, text/plain)
2010-08-21 10:29 UTC, Dennis Schridde
Details
ebuild for a CVS snapshot (pthreads-w32-2.9.0_pre20100821.ebuild,1.85 KB, text/plain)
2010-08-21 10:29 UTC, Dennis Schridde
Details
ebuild for last released version (pthreads-w32-2.8.0.ebuild,2.02 KB, text/plain)
2010-08-21 10:56 UTC, Dennis Schridde
Details
ebuild for a CVS snapshot (pthreads-w32-2.9.0_pre20100821.ebuild,1.87 KB, text/plain)
2010-08-21 10:56 UTC, Dennis Schridde
Details
eblit with flag-o-matic changes/extensions (flag-o-matic.eblit,602 bytes, text/plain)
2010-10-10 10:30 UTC, Dennis Schridde
Details
2.8.0 ebuild loading flag-o-matic changes as eblit (pthreads-w32-2.8.0.ebuild,1.44 KB, text/plain)
2010-10-10 10:31 UTC, Dennis Schridde
Details
2.9.0_pre ebuild loading flag-o-matic changes as eblit (pthreads-w32-2.9.0_pre20100821.ebuild,1.29 KB, text/plain)
2010-10-10 10:32 UTC, Dennis Schridde
Details
2.8.0 ebuild loading flag-o-matic changes as eblit (pthreads-w32-2.8.0.ebuild,1.44 KB, text/plain)
2010-10-10 10:36 UTC, Dennis Schridde
Details
2.9.0_pre ebuild loading flag-o-matic changes as eblit (pthreads-w32-2.9.0_pre20100821.ebuild,1.29 KB, text/plain)
2010-10-10 10:36 UTC, Dennis Schridde
Details
ebuild for 2.8.0 (pthreads-w32-2.8.0.ebuild,3.26 KB, text/plain)
2011-08-15 21:41 UTC, Dennis Schridde
Details
patch to remove INLINE which caused undefined references (pthreads-w32-2.8.0-dont-misuse-inline.patch,325 bytes, patch)
2011-08-15 21:43 UTC, Dennis Schridde
Details | Diff
support CFLAGS and LDFLAGS on the make commandline (pthreads-w32-2.8.0-fix-flags.patch,611 bytes, patch)
2011-08-15 21:43 UTC, Dennis Schridde
Details | Diff
fix missing include (pthreads-w32-2.8.0-include-stdexcept.patch,394 bytes, patch)
2011-08-15 21:43 UTC, Dennis Schridde
Details | Diff
do not force -O3 on everyone (pthreads-w32-2.8.0-no-forced-optimisation.patch,354 bytes, patch)
2011-08-15 21:44 UTC, Dennis Schridde
Details | Diff
run tests with wine (pthreads-w32-2.8.0-run-tests-with-wine.patch,578 bytes, patch)
2011-08-15 21:44 UTC, Dennis Schridde
Details | Diff
ebuild for 2.8.9999 (2.9.0_pre live from cvs) (pthreads-w32-2.8.9999.ebuild,3.26 KB, text/plain)
2011-08-15 21:45 UTC, Dennis Schridde
Details
support CFLAGS and LDFLAGS on the make commandline (for 2.8.9999) (pthreads-w32-2.8.9999-fix-flags.patch,500 bytes, patch)
2011-08-15 21:45 UTC, Dennis Schridde
Details | Diff
do not force -O3 on everyone (for 2.8.9999) (pthreads-w32-2.8.9999-no-forced-optimisation.patch,314 bytes, patch)
2011-08-15 21:45 UTC, Dennis Schridde
Details | Diff
run tests with wine (for 2.8.9999) (pthreads-w32-2.8.9999-run-tests-with-wine.patch,548 bytes, patch)
2011-08-15 21:46 UTC, Dennis Schridde
Details | Diff
eblit providing a function to find a file in a PATH like list of dirs (find-file-in-path.eblit,170 bytes, text/plain)
2011-08-15 21:46 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2010-08-21 09:48:26 UTC
Attached ebuild builds pthreads-w32, which is necessary to build mingw32 gcc with USE=openmp (bug #326757).

Reproducible: Always
Comment 1 Dennis Schridde 2010-08-21 09:57:25 UTC
Created attachment 243827 [details]
ebuild for a CVS snapshot of pthreads-w32

I decided to build a CVS snapshot, because the last released version is 4 years old and had to be manually linked to wsock32.
Comment 2 Dennis Schridde 2010-08-21 09:58:50 UTC
Created attachment 243829 [details]
ebuild for last released version

This ebuild required some hack to L(D)FLAGS to make it build and also contains the correct MY_PV to match upstream release schemes.
Comment 3 Dennis Schridde 2010-08-21 10:02:50 UTC
Note regarding the CVS snapshot:
1) Download the source using the commands listed on upstream's website:
cvs -d :pserver:anoncvs@sourceware.org:/cvs/pthreads-win32 login # pass=anoncvs
cvs -d :pserver:anoncvs@sourceware.org:/cvs/pthreads-win32 checkout pthreads
2) Rename the folder to match the name expected by Gentoo:
mv pthreads ${P}
3) Delete the CVS folders:
find -name CVS | xargs rm -fr
Comment 4 Dennis Schridde 2010-08-21 10:04:29 UTC
P.S: The ebuild contains some functions which were necessary to make it build here, and which I'd like to see in flag-o-matic: bug #333763
Comment 5 Dennis Schridde 2010-08-21 10:29:31 UTC
Created attachment 243831 [details]
ebuild for last released version

The ebuilds presented earlier were broken in that they did not install the header files.
Comment 6 Dennis Schridde 2010-08-21 10:29:59 UTC
Created attachment 243833 [details]
ebuild for a CVS snapshot
Comment 7 Dennis Schridde 2010-08-21 10:56:06 UTC
Created attachment 243835 [details]
ebuild for last released version

The assumption that libgomp would also search for pthreadGC2, because that's some kind of standard name, failed. -> This new ebuild has the library filename fixed.
Comment 8 Dennis Schridde 2010-08-21 10:56:32 UTC
Created attachment 243837 [details]
ebuild for a CVS snapshot
Comment 9 Dane Smith (RETIRED) gentoo-dev 2010-08-23 22:56:20 UTC
Hello, The Gentoo Team would like to firstly thank you for your ebuild 
submission. We also apologize for not being able to accommodate you in a timely
manner. There are simply too many new packages.

Allow me to use this opportunity to introduce you to Gentoo Sunrise. The 
sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to 
commit to and all users can have ebuilds reviewed by Gentoo devs for entry 
into the overlay. So, the sunrise team is suggesting that you look into this 
and submit your ebuild to the overlay where even *you* can commit to. =)

Thanks,
On behalf of the Gentoo Sunrise Team,

[1]: http://www.gentoo.org/proj/en/sunrise/
[2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Comment 10 Dennis Schridde 2010-08-24 08:13:49 UTC
Depends on bug #333763 for an addition/change to the flag-o-matic eclass. (test-flag-LD, test-flags-LD, strip-unsupported-flags)
Comment 11 SpanKY gentoo-dev 2010-10-10 07:30:21 UTC
your ebuilds seem to have bad whitespace mangling.  only indent with tabs.
Comment 12 Dennis Schridde 2010-10-10 10:30:25 UTC
Created attachment 250089 [details]
eblit with flag-o-matic changes/extensions
Comment 13 Dennis Schridde 2010-10-10 10:31:41 UTC
Created attachment 250091 [details]
2.8.0 ebuild loading flag-o-matic changes as eblit
Comment 14 Dennis Schridde 2010-10-10 10:32:11 UTC
Created attachment 250093 [details]
2.9.0_pre ebuild loading flag-o-matic changes as eblit
Comment 15 Dennis Schridde 2010-10-10 10:32:51 UTC
(In reply to comment #11)
> your ebuilds seem to have bad whitespace mangling.  only indent with tabs.
Was because of copy/paste from the terminal. Fixed in the new version, where I also put the flag-o-matic stuff into a new file.
Comment 16 Dennis Schridde 2010-10-10 10:36:36 UTC
Created attachment 250095 [details]
2.8.0 ebuild loading flag-o-matic changes as eblit
Comment 17 Dennis Schridde 2010-10-10 10:36:50 UTC
Created attachment 250097 [details]
2.9.0_pre ebuild loading flag-o-matic changes as eblit
Comment 18 Dennis Schridde 2010-10-10 10:37:31 UTC
Missed on instance of the whitespace thing before. Repoman says I am clean now.
Comment 19 Dennis Schridde 2011-08-15 21:41:56 UTC
Created attachment 283479 [details]
ebuild for 2.8.0

Attached ebuild is an improved version of the older ebuild.
It is prepared to be in sync with a live ebuild 2.8.9999 which I will attach in a minute.

Changes:
 * support for building the C++ library
 * support for building the debug variants
 * theoretical support of the test phase (does not work out here, might be caused by wine)
   - requires openmp for some tests, hence adds an additional but optional dependency
 * theoretical support for compilers besides GCC (pthread-win32 atm does not support any when using GNU make, but I found it to be more self-documenting this way)

Fixes necessary for C++:
 * fixes a compilation problem when using newer gcc (stdexcept had to be included)
 * fixes a compilation problem with undefined ___gxx_personality_sj0, ___cxa_begin_catch and similar (libsupc++.a had to be linked)
Comment 20 Dennis Schridde 2011-08-15 21:43:02 UTC
Created attachment 283481 [details, diff]
patch to remove INLINE which caused undefined references
Comment 21 Dennis Schridde 2011-08-15 21:43:26 UTC
Created attachment 283483 [details, diff]
support CFLAGS and LDFLAGS on the make commandline
Comment 22 Dennis Schridde 2011-08-15 21:43:42 UTC
Created attachment 283485 [details, diff]
fix missing include
Comment 23 Dennis Schridde 2011-08-15 21:44:02 UTC
Created attachment 283487 [details, diff]
do not force -O3 on everyone
Comment 24 Dennis Schridde 2011-08-15 21:44:22 UTC
Created attachment 283489 [details, diff]
run tests with wine
Comment 25 Dennis Schridde 2011-08-15 21:45:00 UTC
Created attachment 283491 [details]
ebuild for 2.8.9999 (2.9.0_pre live from cvs)
Comment 26 Dennis Schridde 2011-08-15 21:45:37 UTC
Created attachment 283493 [details, diff]
support CFLAGS and LDFLAGS on the make commandline (for 2.8.9999)
Comment 27 Dennis Schridde 2011-08-15 21:45:59 UTC
Created attachment 283495 [details, diff]
do not force -O3 on everyone (for 2.8.9999)
Comment 28 Dennis Schridde 2011-08-15 21:46:20 UTC
Created attachment 283497 [details, diff]
run tests with wine (for 2.8.9999)
Comment 29 Dennis Schridde 2011-08-15 21:46:53 UTC
Created attachment 283499 [details]
eblit providing a function to find a file in a PATH like list of dirs
Comment 30 James Le Cuirot gentoo-dev 2019-09-14 23:11:54 UTC
Necrobump! I actually need this now so I'm going to take a look.

Dennis, if you're still around, I'm wondering why you made this a cross-* package. Would you not just do "x86_64-w64-mingw32-emerge pthreads-w32" instead? There has been talk about doing away with the cross/libc packages, if not more, and this feels like a step in the other direction.

I am wondering we could ensure this gets installed. In theory, you'd have a virtual/pthreads package but so many packages need pthreads that this seems like more hassle than it's worth. crossdev could install it as an "extra" package and perhaps that's why you did the above but I've never bothered with the extras before and I imagine most other users would skip them.
Comment 31 Dennis Schridde 2019-09-15 13:00:17 UTC
Hi James!

(In reply to James Le Cuirot from comment #30)
> Dennis, if you're still around, I'm wondering why you made this a cross-*
> package. Would you not just do "x86_64-w64-mingw32-emerge pthreads-w32"
> instead? There has been talk about doing away with the cross/libc packages,
> if not more, and this feels like a step in the other direction.

Well, this thing is 9 years old.  A lot has changed since then...

In fact I do not do much Windows development anymore, so I don't have hard feelings about you changing the category.

> I am wondering we could ensure this gets installed. In theory, you'd have a
> virtual/pthreads package but so many packages need pthreads that this seems
> like more hassle than it's worth. crossdev could install it as an "extra"
> package and perhaps that's why you did the above but I've never bothered
> with the extras before and I imagine most other users would skip them.

I think crossdev has changed a bit in the last decade.  So probably there are better ways to do these things than what I wrote in 2010.