Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2013-01-12 Thread Dirk Eddelbuettel

On 11 January 2013 at 00:31, Guillem Jover wrote:
| On Mon, 2012-12-31 at 17:41:52 +, Steven Chamberlain wrote:
|  On 31/12/12 17:06, Dirk Eddelbuettel wrote:
|   
https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/src/Timer.cpp?root=rcppr1=4182r2=4181pathrev=4182
|  
|  Actually... presence of time.h rather depends on the libc, not the kernel?
|  
|  So __GLIBC__ is perhaps more relevant than __FreeBSD_kernel__ in this
|  case - plus it should work for other GNU/k*BSD variants if/when they exist.
| 
| Well, that's still suboptimal, the ideal solution in this kind of
| cases is to test for the feature at build time, which avoids all this
| ifdef whitelists, and subsequent updates.

Agreed in principle.  This is however an R package and configure sometimes
gets in the way of multiarch builds (on non-Linux platforms).

Luckily, the Timer class is a pretty optional feature.

|  While here, I think I can explain the build failure on GNU/Hurd.  The
|  test for __MACH__ applies to both Apple systems and GNU systems.  I
|  suggest using mach/mach_time.h only for __APPLE__, and then adding
|  __GNU__ to the list for time.h
| 
| For Mac OS X I'd test for __APPLE__  __MACH__, otherwise that could
| trigger on other non Mach-based Apple systems.

Ok. Adjusted.

Thanks,  Dirk
 
| Thanks,
| Guillem

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20721.27380.899600.524...@max.nulle.part



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2013-01-10 Thread Guillem Jover
On Mon, 2012-12-31 at 17:41:52 +, Steven Chamberlain wrote:
 On 31/12/12 17:06, Dirk Eddelbuettel wrote:
  https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/src/Timer.cpp?root=rcppr1=4182r2=4181pathrev=4182
 
 Actually... presence of time.h rather depends on the libc, not the kernel?
 
 So __GLIBC__ is perhaps more relevant than __FreeBSD_kernel__ in this
 case - plus it should work for other GNU/k*BSD variants if/when they exist.

Well, that's still suboptimal, the ideal solution in this kind of
cases is to test for the feature at build time, which avoids all this
ifdef whitelists, and subsequent updates.

 While here, I think I can explain the build failure on GNU/Hurd.  The
 test for __MACH__ applies to both Apple systems and GNU systems.  I
 suggest using mach/mach_time.h only for __APPLE__, and then adding
 __GNU__ to the list for time.h

For Mac OS X I'd test for __APPLE__  __MACH__, otherwise that could
trigger on other non Mach-based Apple systems.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130110233139.ga27...@gaara.hadrons.org



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-31 Thread Steven Chamberlain
Hi,

On 31/12/12 06:47, Rainer Hurling wrote:
 I just tried to build Rcpp with __FreeBSD_kernel__ on a recent FreeBSD
 10.0-CURRENT (newest developer version) and it does not resolve. On
 'pure' FreeBSD there is only __FreeBSD__ defined, not a kernel specific
 version.

Which compiler were you using?

It's still defined in 10.0-CURRENT at least in sys/param.h:

http://svnweb.freebsd.org/base/head/sys/sys/param.h?view=annotate#l77

 I think there are much more 'pure' FreeBSD systems than linux ones with
 FreeBSD kernel, so it would be nice, if you would pick up at least the
 __FreeBSD__ symbol.

You are right, I see in the comments describing __FreeBSD_kernel__, that
__FreeBSD__ should be tested for as well, for the benefit of older
FreeBSD versions, 3rd party compilers.

So Dirk, I think we now have this horror:

#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) ||
defined(__FreeBSD_kernel__) || defined(__NetBSD__) ||
defined(__OpenBSD__) || defined(__DragonFly__)

I'm not sure what (__linux) refers to and may not be needed.

Some others might be:

defined(__APPLE__) for Mach, or Mac OS X
defined(__GNU__) for GNU/Hurd

Yet more examples:

http://codesearch.debian.net/search?q=BSD.*BSD_kernel.*BSD

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50e1bef1.9010...@pyro.eu.org



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-31 Thread Dirk Eddelbuettel

On 31 December 2012 at 16:36, Steven Chamberlain wrote:
| So Dirk, I think we now have this horror:
| 
| #elif defined(linux) || defined(__linux) || defined(__FreeBSD__) ||
| defined(__FreeBSD_kernel__) || defined(__NetBSD__) ||
| defined(__OpenBSD__) || defined(__DragonFly__)
 
Which is pretty much what I had committed -- modulo DragonFly.  What is that 
for?

https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/src/Timer.cpp?root=rcppr1=4182r2=4181pathrev=4182
(running a plain Debian install of FusionForge, slightly rebranded for R :)

As this is about the Rcpp project, we already test in another spot for
known/supported compilers (mostly to get rid of Visual Studio idiots -- R on
Windows very much depends on MinGW whether they understand it or not).

Dirk
-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20705.50686.100568.628...@max.nulle.part



Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-30 Thread Christoph Egger
Package: src:rcpp
Version: 0.10.2-1
Severity: serious
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Justification: fails to build from source (but built successfully in the past)

Hi!

Your package failed to build on the kfreebsd-* buildds:

g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic  -O2 -pipe -g  
-c Timer.cpp -o Timer.o
Timer.cpp:35:6: error: #error Rcpp::Timer not supported by your OS.
Timer.cpp:93:6: error: #error Rcpp::Benchmark::Timer not supported by your OS.
make[1]: *** [Timer.o] Error 1

Full build log at
https://buildd.debian.org/status/fetch.php?pkg=rcpparch=kfreebsd-amd64ver=0.10.2-1stamp=1356129312

Regards

Christoph

If you have further questions please mail debian-bsd@lists.debian.org

-- 


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87k3rzhyaq@mitoraj.siccegge.de



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-30 Thread Dirk Eddelbuettel

On 30 December 2012 at 16:15, Christoph Egger wrote:
| Package: src:rcpp
| Version: 0.10.2-1
| Severity: serious
| User: debian-bsd@lists.debian.org
| Usertags: kfreebsd
| X-Debbugs-Cc: debian-bsd@lists.debian.org
| Justification: fails to build from source (but built successfully in the past)
| 
| Hi!
| 
| Your package failed to build on the kfreebsd-* buildds:

Yup. Rainer Hurling, an active R user on *BSD, already told me about it and
provided a patch for FreeBSD (as I happen to be upstream and Debian maintainer).

How do I best get all BSDs at once?  Currently we do 

#elif defined(linux) || defined(__linux) || defined(__FreeBSD__)

in two place.  If memory serves, there were a) similar handles for NetBSD and
OpenBSD I should add.   And which one do you guys need for the BSD kernel on
Debian?

Dirk

| 
| g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic  -O2 -pipe 
-g  -c Timer.cpp -o Timer.o
| Timer.cpp:35:6: error: #error Rcpp::Timer not supported by your OS.
| Timer.cpp:93:6: error: #error Rcpp::Benchmark::Timer not supported by your 
OS.
| make[1]: *** [Timer.o] Error 1
| 
| Full build log at
| 
https://buildd.debian.org/status/fetch.php?pkg=rcpparch=kfreebsd-amd64ver=0.10.2-1stamp=1356129312
| 
| Regards
| 
| Christoph
| 
| If you have further questions please mail debian-bsd@lists.debian.org
| 
| -- 

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20704.56660.249233.434...@max.nulle.part



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-30 Thread Christoph Egger
Hi!

Dirk Eddelbuettel e...@debian.org writes:
 On 30 December 2012 at 16:15, Christoph Egger wrote:
 | Package: src:rcpp
 | Version: 0.10.2-1
 | Severity: serious
 | User: debian-bsd@lists.debian.org
 | Usertags: kfreebsd
 | X-Debbugs-Cc: debian-bsd@lists.debian.org
 | Justification: fails to build from source (but built successfully in the 
 past)
 | 
 | Hi!
 | 
 | Your package failed to build on the kfreebsd-* buildds:

 Yup. Rainer Hurling, an active R user on *BSD, already told me about it and
 provided a patch for FreeBSD (as I happen to be upstream and Debian 
 maintainer).

 How do I best get all BSDs at once?  Currently we do 

 #elif defined(linux) || defined(__linux) || defined(__FreeBSD__)

 in two place.  If memory serves, there were a) similar handles for NetBSD and
 OpenBSD I should add.   And which one do you guys need for the BSD kernel on
 Debian?

Jep I'm seeing __NetBSD__ and __OpenBSD__ in lots of source. kFreeBSD
uses __FreeBSD_kernel__ which -- if memory serves me correctly -- be
also defined in newer FreeBSDs.

Regards

Christoph


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/878v8fhurd@mitoraj.siccegge.de



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-30 Thread Dirk Eddelbuettel

Hi Christoph,

On 30 December 2012 at 17:31, Christoph Egger wrote:
| Hi!
| 
| Dirk Eddelbuettel e...@debian.org writes:
|  On 30 December 2012 at 16:15, Christoph Egger wrote:
|  | Package: src:rcpp
|  | Version: 0.10.2-1
|  | Severity: serious
|  | User: debian-bsd@lists.debian.org
|  | Usertags: kfreebsd
|  | X-Debbugs-Cc: debian-bsd@lists.debian.org
|  | Justification: fails to build from source (but built successfully in the 
past)
|  | 
|  | Hi!
|  | 
|  | Your package failed to build on the kfreebsd-* buildds:
| 
|  Yup. Rainer Hurling, an active R user on *BSD, already told me about it and
|  provided a patch for FreeBSD (as I happen to be upstream and Debian 
maintainer).
| 
|  How do I best get all BSDs at once?  Currently we do 
| 
|  #elif defined(linux) || defined(__linux) || defined(__FreeBSD__)
| 
|  in two place.  If memory serves, there were a) similar handles for NetBSD 
and
|  OpenBSD I should add.   And which one do you guys need for the BSD kernel on
|  Debian?
| 
| Jep I'm seeing __NetBSD__ and __OpenBSD__ in lots of source. kFreeBSD

Ok, will add these two but ...

| uses __FreeBSD_kernel__ which -- if memory serves me correctly -- be
| also defined in newer FreeBSDs.

... you are telling me I also need this?  

Can't you guys just settle for __WhateverBSD__ and leave the rest of us
alone?  ;-)

Cheers, Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com  


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20704.62255.105601.290...@max.nulle.part



Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error Rcpp::Timer not supported by your OS.

2012-12-30 Thread Steven Chamberlain
Hi Dirk,

On 31/12/12 02:06, Dirk Eddelbuettel wrote:
 |  #elif defined(linux) || defined(__linux) || defined(__FreeBSD__)

Sometimes you are really testing for the type of libc on the system, not
the kernel.  For that, __GLIBC__ is supposed to be defined on all
GNU/k*BSD variants.  There is a bit more info at:

http://glibc-bsd.alioth.debian.org/porting/PORTING

 | 
 |  in two place.  If memory serves, there were a) similar handles for NetBSD 
 and
 |  OpenBSD I should add.   And which one do you guys need for the BSD kernel 
 on
 |  Debian?
 | 
 | Jep I'm seeing __NetBSD__ and __OpenBSD__ in lots of source.

Plenty of examples of that here:

http://codesearch.debian.net/search?q=defined.*BSD.*BSD.*BSD
or
http://codesearch.debian.net/search?q=defined.*BSD__

Generally you have to list all of them :(


But it is probably more portable in the long term to test for specific
features that you want to use, wherever it makes sense.

 | uses __FreeBSD_kernel__ which -- if memory serves me correctly -- be
 | also defined in newer FreeBSDs.
 
 ... you are telling me I also need this?

If you are really testing for kernels, I think it is preferred that you
test for __FreeBSD_kernel__, instead of just __FreeBSD__ which is a bit
ambigious, and only defined on a pure FreeBSD (with BSD libc) system.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50e0f966.7050...@pyro.eu.org