[Rd] Missing libpthread in RTools

2010-10-15 Thread Davor Cubranic
It appears that Mingw gcc included in RTools is missing a dependent 
library. If I compile a program with '-lgomp' switch (for OpenMP 
support), I get a errors about undefined references to functions like 
'_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the 
following error:


c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: 
cannot find -lpthread

Sure enough, there is neither libpthread.a nor libpthread.dll under 
RTools' installation directory. I think these library are standard in 
Cygwin. Is there any chance to include them in RTools, too?

Davor

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Missing libpthread in RTools

2010-10-15 Thread Duncan Murdoch

On 15/10/2010 4:53 PM, Davor Cubranic wrote:

It appears that Mingw gcc included in RTools is missing a dependent
library. If I compile a program with '-lgomp' switch (for OpenMP
support), I get a errors about undefined references to functions like
'_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the
following error:

 
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe:
cannot find -lpthread

Sure enough, there is neither libpthread.a nor libpthread.dll under
RTools' installation directory. I think these library are standard in
Cygwin. Is there any chance to include them in RTools, too?


Rtools is for building R, and that library isn't needed in R.  If you 
want it for some particular purpose, can't you just install a copy on 
your machine?


Duncan Murdoch



Davor

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Missing libpthread in RTools

2010-10-19 Thread Davor Cubranic
On 2010-10-15, at 4:39 PM, Duncan Murdoch wrote:

> On 15/10/2010 4:53 PM, Davor Cubranic wrote:
>> It appears that Mingw gcc included in RTools is missing a dependent
>> library. If I compile a program with '-lgomp' switch (for OpenMP
>> support), I get a errors about undefined references to functions like
>> '_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the
>> following error:
>> 
>> 
>> c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe:
>> cannot find -lpthread
>> 
>> Sure enough, there is neither libpthread.a nor libpthread.dll under
>> RTools' installation directory. I think these library are standard in
>> Cygwin. Is there any chance to include them in RTools, too?
> 
> Rtools is for building R, and that library isn't needed in R.  If you want it 
> for some particular purpose, can't you just install a copy on your machine?

Yes, I can. But does it make sense for the compiler to have support for OpenMP 
(i.e., allow -fopenmp), but not include its library dependency so that it fails 
in the linking phase?

Davor
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Missing libpthread in RTools

2010-10-19 Thread Prof Brian Ripley

On Tue, 19 Oct 2010, Davor Cubranic wrote:


On 2010-10-15, at 4:39 PM, Duncan Murdoch wrote:


On 15/10/2010 4:53 PM, Davor Cubranic wrote:

It appears that Mingw gcc included in RTools is missing a dependent
library. If I compile a program with '-lgomp' switch (for OpenMP
support), I get a errors about undefined references to functions like
'_imp__pthread_mutex_destroy'. Adding the '-static' switch, I get the
following error:

c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe:
cannot find -lpthread

Sure enough, there is neither libpthread.a nor libpthread.dll under
RTools' installation directory. I think these library are standard in
Cygwin. Is there any chance to include them in RTools, too?


Rtools is for building R, and that library isn't needed in R.  If you want it 
for some particular purpose, can't you just install a copy on your machine?


Yes, I can. But does it make sense for the compiler to have support 
for OpenMP (i.e., allow -fopenmp), but not include its library 
dependency so that it fails in the linking phase?


For the MinGW project, yes.  The 'Min' stands for 'minimal'.

Note that there are a lot of issues with gcc using pthreads for OMP on 
Windows, and the gcc developers are working on a different solution.




Davor
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel