Re: gcc for building Perl on WinXP
[email protected] (chm)
| Newsgroups | perl.win32.vanilla |
|---|---|
| Message-ID | <[email protected]> |
I got it to work with the following: Add after the POSIX Threads comment block in pthread.h: > #ifdef PTHREAD_CREATE_JOINABLE > #undef PTHREAD_CREATE_JOINABLE > #endif in order to remedy the fact that perl has added a macro with the same value. If the pthread one is not already defined then the perl one is---but this breaks the w32 pthreads include file. Then set the parameters in perldl.conf to > WITH_POSIX_THREADS => 1, > > POSIX_THREADS_INC => undef, # '-I/usr/pthread/include' > POSIX_THREADS_LIBS => '-lpthread', # '-L/usr/pthread -lpthreadGC2' It is building away as I type. Will let you know how dmake test comes out.... --Chris On 11/6/2011 4:31 PM, chm wrote: > Hi kmx- > > The detection for the pthread library is currently broken. > To build PDL with pthreads you'll need to explicitly set > the values of WITH_POSIX_THREADS, POSIX_THREADS_INC, and > POSIX_THREADS_LIBS where the comment indicate what worked > for my strawberry perl install was: > >> WITH_POSIX_THREADS => undef, >> >> POSIX_THREADS_LIBS => '-LC:/chm/strawberry/pthreads/lib -lpthreadGC2', >> POSIX_THREADS_INC => '-IC:/chm/strawberry/pthreads/include', > > and the C:/chm/strawberry/pthreads contained the pthreads > install location. I'm actually working on the detection > code this evening so that if a pthread library is in the > correct location it would be detected and used. > > I'll give your library a build try this evening if I can. > > Cheers, > Chris > > > On 11/6/2011 4:14 PM, kmx wrote: >> Chris and/or Rob, >> >> could you please try the following: >> >> 1/ take >> http://strawberryperl.com/package/kmx/p5.14.2.1-RC/strawberry-perl-5.14.2.1-portable-32bit-beta-1.zip >> >> >> >> 2/ take >> http://strawberryperl.com/package/kmx/32_libs/5.14-extras/32bit_pthreads-2.9.0-bin_20111101.zip >> >> >> (unzip into the same dir as 1/) >> >> 3/ try to build PDL with pthreads support >> >> My quick test failed during PDL installation (but it was really a quick >> shot) >> >> Any feedback welcome >> >> -- >> kmx >> >> On 3.11.2011 14:13, Chris Marshall wrote: >>> We've tested the PDL pthread support with "POSIX Threads >>> (pthreads) for Win32" at http://sourceware.org/pthreads-win32/ . >>> It is nice because it allows PDL computations to make use >>> of multicore processors for calculations. Always nice to see >>> those factors of 2X, 4X, 6X, or more in speedup.... >>> >>> --Chris >>> >>> On Wed, Nov 2, 2011 at 9:30 PM, Sisyphus<[email protected]> >>> wrote: >>>> ----- Original Message ----- From: "kmx" >>>>> As for the future gcc-4.6.2 toolchain there is also an interesting >>>>> question about including pthreads or winpthreads support as PDL is >>>>> AFAIK >>>>> somohow able to handle threads this way (not sure if this is valid for >>>>> Win32) >>>> Yes, pthreads works with PDL on Win32. >>>> There's a crash in one of PDL's pthread test scripts that needs to be >>>> sorted >>>> out, but the basic functionality seems to be fine. >>>> >>>> Cheers, >>>> Rob