<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 13, 2015 at 8:11 AM, JJ Allaire <span dir="ltr"><<a href="mailto:jj.allaire@gmail.com" target="_blank">jj.allaire@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">One other issue to run down is detecting the current architecture on<br>
Solaris builds. Right now we force 32-bit in Makevars as follows:<br>
<br>
ifeq ($(USE_TBB), SunOS)<br>
   MAKE_ARGS += arch=ia32<br>
endif<br>
<br>
Does anyone know if there is a variable we could inspect from within<br>
Makevars that would tell us the architecture for R itself? (as opposed<br>
to the underlying system).<br></blockquote><div><br></div><div>I think the way to go is just to strip the arch flags from the TBB config, like here: <a href="https://github.com/gaborcsardi/RcppParallel/commit/8d9b818042390ded7d00f9ef3cc4d5f9e4096b53">https://github.com/gaborcsardi/RcppParallel/commit/8d9b818042390ded7d00f9ef3cc4d5f9e4096b53</a></div><div>and then make sure that TBB is compiled with the appropriate compilers and flags, taken from </div><div>R CMD config CXX<br></div><div>R CMD config CXXFLAGS<br></div><div>...</div><div>etc.</div><div><br></div><div>On Solaris R is 32 bit by default, and if it is not, the appropriate arch flags will be reported by R CMD config. This solutions also has the advantage that if CRAN's config changes, you likely don't need to update anything.</div><div><br></div><div>If you still want to detect the arch, then AFAIK it is in .Platform$r_arch. This is empty on the 32 bit Solaris, I guess because this is the default arch on this platform. Maybe it is set something else on 64 bit Solaris, but I am not sure. To decide between 32 bit and 64 bit I think you can use .Machine$sizeof.pointer.</div><div><br></div><div>G.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
<br>
On Mon, Apr 13, 2015 at 8:03 AM, JJ Allaire <<a href="mailto:jj.allaire@gmail.com">jj.allaire@gmail.com</a>> wrote:<br>
> That's excellent!!!! I just updated the branch to reflect this change<br>
> and also successfully ran the tests on the Solaris config that you<br>
> provided me access to.<br>
><br>
> I'll have to take a closer look at the warnings. One other issue that<br>
> needs to be resolved prior to the next submission to CRAN revolves<br>
> around pedantic warnings on Debian testing that prohibit "long long"<br>
> (used by both TinyThread and TBB). The easy workaround is<br>
> SystemRequirements: C++11 however this will mean that package won't<br>
> compile on pre-Mavericks Macs (~30% of all Macs) nor RedHat/CentOS<br>
> systems. Perhaps I can modify TinyThread and TBB to no longer use<br>
> "long long" but I'll need to do this very carefully.<br>
><br>
><br>
><br>
><br>
> On Sun, Apr 12, 2015 at 10:30 PM, Gábor Csárdi <<a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a>> wrote:<br>
>> Hi JJ & all,<br>
>><br>
>> I had some time, had an idea, and made it to work. The problem was that TBB<br>
>> was not compiled with the same flags as R and the rest of the R package, so<br>
>> just had to find what is the difference that is incompatible.<br>
>><br>
>> It is simple, you need to compile TBB with -library=stlport4<br>
>> So if you change line 34 in SunOS.suncc.inc  to<br>
>><br>
>> CPLUS = CC -library=stlport4<br>
>><br>
>> then it compiles and installs fine. What's even better, the tests run fine,<br>
>> too. They spit out a lot of compiler warnings, but they all pass.<br>
>><br>
>> Best,<br>
>> Gabor<br>
>><br>
>> On Wed, Apr 8, 2015 at 11:38 AM, Gábor Csárdi <<a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Ok, the server seems to work. JJ, I'll send you a private email. If anyone<br>
>>> wants access, please email me in private.<br>
>>><br>
>>> Remember that this is just a mac mini, so it might not be super fast. It<br>
>>> seems fast enough for a single user, though.<br>
>>><br>
>>> Gabor<br>
>>><br>
>>> On Tue, Apr 7, 2015 at 7:17 PM, Gábor Csárdi <<a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> On Tue, Apr 7, 2015 at 6:50 PM, Jeroen Ooms <<a href="mailto:jeroenooms@gmail.com">jeroenooms@gmail.com</a>> wrote:<br>
>>>> [...]<br>
>>>>><br>
>>>>> So that's why I thought they probably use GCC for packages that don't<br>
>>>>> work with Solaris Studio.<br>
>>>><br>
>>>><br>
>>>> I see. That would indeed make sense. G.<br>
>>>><br>
>>><br>
>><br>
</div></div></blockquote></div><br></div></div>