I just pushed a new PDL git with a fix for the perl vs POSIX threads namespace/implementation collision. You should be able to build with the unedited pthread.h now....
--Chris On Sun, Nov 6, 2011 at 5:58 PM, chm <devel.chm...@gmail.com> wrote: > dmake test passed all except the known problem > with t/pthreadBarf.t. Also, I think we can fix > the breakage in pthread.h by doing the undef > in our pdlmagic file that is including pthread.h. > > Cheers, > Chris > > On 11/6/2011 5:40 PM, chm wrote: >> >> 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<sisyph...@optusnet.com.au> >>>>> 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 >> >> >> ----- >> No virus found in this message. >> Checked by AVG - www.avg.com >> Version: 10.0.1411 / Virus Database: 2092/4000 - Release Date: 11/06/11 >> >> > >