public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Re: mingw/math.h not found while compiling R packages
@ 2013-07-11 17:20 Enrico Ferrero
  2013-07-11 20:28 ` marco atzeri
  0 siblings, 1 reply; 7+ messages in thread
From: Enrico Ferrero @ 2013-07-11 17:20 UTC (permalink / raw)
  To: cygwin

Hi Larry,

Thank you for your reply and advice.

> If you are using the R from Cygwin Ports, it must be an old package since
> R is no longer offered there.  I suggest you install the R package from the
> Cygwin distribution instead and retry.  Since this list supports the Cygwin
> distribution only, this would put your issue firmly on-topic for this list
> if you can still reproduce it.  For Cygwin Ports packages, they are
> supported through the Ports site:
> <http://sourceware.org/cygwinports/>
> If you have a package from that site and have questions, problems, or
> comments, it's best to consult the mailing list there.
> --
> Larry

I got confused in my first email for some reason, but I'm definitely
using R (version 2.15.1) from the Cygwin distribution, not the ports.
I just made a clean R installation just to make sure and I still get
the same error message:

>In file included from IntervalTree.c:3:0:
>common.h:59:24: fatal error: mingw/math.h: No such file or directory
>compilation terminated.
>/usr/lib/R/etc/Makeconf:121: recipe for target `IntervalTree.o' failed
>make: *** [IntervalTree.o] Error 1
>ERROR: compilation failed for package ‘IRanges’
>* removing ‘/usr/lib/R/site-library/IRanges’

I've read there are some other problems with MinGW these days, maybe
this one is related?
In any case, is there anything I can do to try to solve the issue?
Bioconductor is vital to me and using R from within Windows is causing
me a lot of headaches.

Thanks!
Best,

Enrico

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-11 17:20 Re: mingw/math.h not found while compiling R packages Enrico Ferrero
@ 2013-07-11 20:28 ` marco atzeri
  2013-07-11 22:15   ` Enrico Ferrero
  0 siblings, 1 reply; 7+ messages in thread
From: marco atzeri @ 2013-07-11 20:28 UTC (permalink / raw)
  To: cygwin

Il 7/11/2013 6:35 PM, Enrico Ferrero ha scritto:
> Hi Larry,
>
> Thank you for your reply and advice.
>
>> If you are using the R from Cygwin Ports, it must be an old package since
>> R is no longer offered there.  I suggest you install the R package from the
>> Cygwin distribution instead and retry.  Since this list supports the Cygwin
>> distribution only, this would put your issue firmly on-topic for this list
>> if you can still reproduce it.  For Cygwin Ports packages, they are
>> supported through the Ports site:
>> <http://sourceware.org/cygwinports/>
>> If you have a package from that site and have questions, problems, or
>> comments, it's best to consult the mailing list there.
>> --
>> Larry
>
> I got confused in my first email for some reason, but I'm definitely
> using R (version 2.15.1) from the Cygwin distribution, not the ports.
> I just made a clean R installation just to make sure and I still get
> the same error message:
>
>> In file included from IntervalTree.c:3:0:
>> common.h:59:24: fatal error: mingw/math.h: No such file or directory
>> compilation terminated.
>> /usr/lib/R/etc/Makeconf:121: recipe for target `IntervalTree.o' failed
>> make: *** [IntervalTree.o] Error 1
>> ERROR: compilation failed for package ‘IRanges’
>> * removing ‘/usr/lib/R/site-library/IRanges’
>
> I've read there are some other problems with MinGW these days, maybe
> this one is related?
> In any case, is there anything I can do to try to solve the issue?
> Bioconductor is vital to me and using R from within Windows is causing
> me a lot of headaches.
>
> Thanks!
> Best,
>
> Enrico
>


Hi Enrico,
could you clarify your issue with the R cygwin package ?
Are you trying to compile some addon ? How ?



Regards
Marco



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-11 20:28 ` marco atzeri
@ 2013-07-11 22:15   ` Enrico Ferrero
  2013-07-11 23:04     ` marco atzeri
  0 siblings, 1 reply; 7+ messages in thread
From: Enrico Ferrero @ 2013-07-11 22:15 UTC (permalink / raw)
  To: cygwin

Hi,

Thanks for your help, I'll try to make things clearer.

I have a full installation of Cygwin, including R version 2.15.1,
running on my Windows XP box at work.
Bioconductor [1] is a a collection of packages for computational
biologists that is installed by compiling its packages within the R
environment.
To install the base packages (and reproduce what I believe is a bug),
one just has to type at the R prompt:

>source("http://bioconductor.org/biocLite.R")
>biocLite()

During the compilation of the IRanges package [2], I get the following error:

> In file included from IntervalTree.c:3:0:
> common.h:59:24: fatal error: mingw/math.h: No such file or directory
> compilation terminated.
> /usr/lib/R/etc/Makeconf:121: recipe for target `IntervalTree.o' failed
> make: *** [IntervalTree.o] Error 1
> ERROR: compilation failed for package =91IRanges=92

So, apparently, R needs the math.h library to compile IRanges but
can't find it for some reason.
As far as I understand, in Cygwin, math.h is provided by the
mingw-runtime package, part of the MinGW suite [3].
According to this page [4] on the Cygwin website, math.h is indeed
installed by the mingw-runtime package, so I'm trying to figure out
why R can't access it. Maybe it's a path or symbolic links-related
problem? Maybe it has to do with the recently mentioned issues
affecting MinGW packages in Cygwin [5]?

Any help is very appreciated, thank you.

[1] http://www.bioconductor.org
[2] http://www.bioconductor.org/packages/2.12/bioc/html/IRanges.html
[3] http://www.mingw.org/
[4] http://cygwin.com/cgi-bin2/package-cat.cgi?file=mingw-runtime%2Fmingw-runtime-3.18-3&grep=math.h
[5] http://cygwin.com/ml/cygwin/2013-07/msg00196.html

On 11 July 2013 18:28, marco atzeri <marco.atzeri@gmail.com> wrote:
> Il 7/11/2013 6:35 PM, Enrico Ferrero ha scritto:
>
>> Hi Larry,
>>
>> Thank you for your reply and advice.
>>
>>> If you are using the R from Cygwin Ports, it must be an old package since
>>> R is no longer offered there.  I suggest you install the R package from
>>> the
>>> Cygwin distribution instead and retry.  Since this list supports the
>>> Cygwin
>>> distribution only, this would put your issue firmly on-topic for this
>>> list
>>> if you can still reproduce it.  For Cygwin Ports packages, they are
>>> supported through the Ports site:
>>> <http://sourceware.org/cygwinports/>
>>> If you have a package from that site and have questions, problems, or
>>> comments, it's best to consult the mailing list there.
>>> --
>>> Larry
>>
>>
>> I got confused in my first email for some reason, but I'm definitely
>> using R (version 2.15.1) from the Cygwin distribution, not the ports.
>> I just made a clean R installation just to make sure and I still get
>> the same error message:
>>
>>> In file included from IntervalTree.c:3:0:
>>> common.h:59:24: fatal error: mingw/math.h: No such file or directory
>>> compilation terminated.
>>> /usr/lib/R/etc/Makeconf:121: recipe for target `IntervalTree.o' failed
>>> make: *** [IntervalTree.o] Error 1
>>> ERROR: compilation failed for package ‘IRanges’
>>> * removing ‘/usr/lib/R/site-library/IRanges’
>>
>>
>> I've read there are some other problems with MinGW these days, maybe
>> this one is related?
>> In any case, is there anything I can do to try to solve the issue?
>> Bioconductor is vital to me and using R from within Windows is causing
>> me a lot of headaches.
>>
>> Thanks!
>> Best,
>>
>> Enrico
>>
>
>
> Hi Enrico,
> could you clarify your issue with the R cygwin package ?
> Are you trying to compile some addon ? How ?
>
>
>
> Regards
> Marco
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>



--
Enrico

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-11 22:15   ` Enrico Ferrero
@ 2013-07-11 23:04     ` marco atzeri
  2013-07-12  7:33       ` marco atzeri
  0 siblings, 1 reply; 7+ messages in thread
From: marco atzeri @ 2013-07-11 23:04 UTC (permalink / raw)
  To: cygwin

Il 7/11/2013 10:51 PM, Enrico Ferrero ha scritto:
> Hi,
>
> Thanks for your help, I'll try to make things clearer.
>
> I have a full installation of Cygwin, including R version 2.15.1,
> running on my Windows XP box at work.
> Bioconductor [1] is a a collection of packages for computational
> biologists that is installed by compiling its packages within the R
> environment.
> To install the base packages (and reproduce what I believe is a bug),
> one just has to type at the R prompt:
>
>> source("http://bioconductor.org/biocLite.R")
>> biocLite()

as you are not using R-3.x the last should be

   biocLite(NULL)

>
> During the compilation of the IRanges package [2], I get the following error:
>
>> In file included from IntervalTree.c:3:0:
>> common.h:59:24: fatal error: mingw/math.h: No such file or directory
>> compilation terminated.
>> /usr/lib/R/etc/Makeconf:121: recipe for target `IntervalTree.o' failed
>> make: *** [IntervalTree.o] Error 1
>> ERROR: compilation failed for package =91IRanges=92
>
> So, apparently, R needs the math.h library to compile IRanges but
> can't find it for some reason.

likely the package is broken and incorrectly identify cygwin for mingw.

> As far as I understand, in Cygwin, math.h is provided by the
> mingw-runtime package, part of the MinGW suite [3].
> According to this page [4] on the Cygwin website, math.h is indeed
> installed by the mingw-runtime package, so I'm trying to figure out
> why R can't access it. Maybe it's a path or symbolic links-related
> problem? Maybe it has to do with the recently mentioned issues
> affecting MinGW packages in Cygwin [5]?

wrong, cygwin have its own math.h

$ cygcheck -f /usr/include/math.h
cygwin-1.7.20-1


>
> Any help is very appreciated, thank you.

I am building biocLite, it will take some time...

>
> [1] http://www.bioconductor.org
> [2] http://www.bioconductor.org/packages/2.12/bioc/html/IRanges.html
> [3] http://www.mingw.org/
> [4] http://cygwin.com/cgi-bin2/package-cat.cgi?file=mingw-runtime%2Fmingw-runtime-3.18-3&grep=math.h
> [5] http://cygwin.com/ml/cygwin/2013-07/msg00196.html
>

Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-11 23:04     ` marco atzeri
@ 2013-07-12  7:33       ` marco atzeri
  2013-07-12  8:51         ` Enrico Ferrero
  0 siblings, 1 reply; 7+ messages in thread
From: marco atzeri @ 2013-07-12  7:33 UTC (permalink / raw)
  To: cygwin

Il 7/12/2013 12:02 AM, marco atzeri ha scritto:
> Il 7/11/2013 10:51 PM, Enrico Ferrero ha scritto:
>> Hi,
>>
>
> I am building biocLite, it will take some time...
>

Enrico,
As I was thinking the package is broken.
I don't know why they put a wrong and useless #include directive

If you download the package and patch the source as

-------------------------------------------------------
--- orig/IRanges/src/common.h   2013-02-22 04:36:50.000000000 +0100
+++ IRanges/src/common.h        2013-07-12 00:19:05.922405200 +0200
@@ -55,10 +55,6 @@
  #endif
  #endif

-#ifdef __CYGWIN32__
-#include <mingw/math.h>
-#endif
-
  #ifndef NAN
  #define NAN (0.0 / 0.0)
  #endif
---------------------------------------------------------

after repacking
you can then install the local file with something like
  install.packages("/tmp/IRanges_1.16.6.tar.gz")

I put the already patched file here if you are interested:
http://matzeri.altervista.org/works/R/

Regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-12  7:33       ` marco atzeri
@ 2013-07-12  8:51         ` Enrico Ferrero
  2013-07-12 10:43           ` marco atzeri
  0 siblings, 1 reply; 7+ messages in thread
From: Enrico Ferrero @ 2013-07-12  8:51 UTC (permalink / raw)
  To: cygwin

Hi Marco,

Thanks a lot for your help. I downloaded your patched package and it
compiles without any issues.

Since the bug is in Bioconductor and not Cygwin at the end of the day,
it would probably be a good idea to file a bug report there.

If you're OK with it, I can CC you and link to your patch, just let me know.

Again, thank you!
Best,

Enrico


On 12 July 2013 04:48, marco atzeri <marco.atzeri@gmail.com> wrote:
> Il 7/12/2013 12:02 AM, marco atzeri ha scritto:
>>
>> Il 7/11/2013 10:51 PM, Enrico Ferrero ha scritto:
>>>
>>> Hi,
>>>
>>
>> I am building biocLite, it will take some time...
>>
>
> Enrico,
> As I was thinking the package is broken.
> I don't know why they put a wrong and useless #include directive
>
> If you download the package and patch the source as
>
> -------------------------------------------------------
> --- orig/IRanges/src/common.h   2013-02-22 04:36:50.000000000 +0100
> +++ IRanges/src/common.h        2013-07-12 00:19:05.922405200 +0200
> @@ -55,10 +55,6 @@
>  #endif
>  #endif
>
> -#ifdef __CYGWIN32__
> -#include <mingw/math.h>
> -#endif
> -
>  #ifndef NAN
>  #define NAN (0.0 / 0.0)
>  #endif
> ---------------------------------------------------------
>
> after repacking
> you can then install the local file with something like
>  install.packages("/tmp/IRanges_1.16.6.tar.gz")
>
> I put the already patched file here if you are interested:
> http://matzeri.altervista.org/works/R/
>
> Regards
>
> Marco
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mingw/math.h not found while compiling R packages
  2013-07-12  8:51         ` Enrico Ferrero
@ 2013-07-12 10:43           ` marco atzeri
  0 siblings, 0 replies; 7+ messages in thread
From: marco atzeri @ 2013-07-12 10:43 UTC (permalink / raw)
  To: cygwin

Il 7/12/2013 10:01 AM, Enrico Ferrero ha scritto:
> Hi Marco,
>
> Thanks a lot for your help. I downloaded your patched package and it
> compiles without any issues.
>
> Since the bug is in Bioconductor and not Cygwin at the end of the day,
> it would probably be a good idea to file a bug report there.
>
> If you're OK with it, I can CC you and link to your patch, just let me know.
>
> Again, thank you!
> Best,
>
> Enrico
>

fine for me.

Ciao
Marco





--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-12  8:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-11 17:20 Re: mingw/math.h not found while compiling R packages Enrico Ferrero
2013-07-11 20:28 ` marco atzeri
2013-07-11 22:15   ` Enrico Ferrero
2013-07-11 23:04     ` marco atzeri
2013-07-12  7:33       ` marco atzeri
2013-07-12  8:51         ` Enrico Ferrero
2013-07-12 10:43           ` marco atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).