Bug#987755: Mips build failure in new rpf 1.0.9 (Was: Bug#987755: r-cran-rpf: FTBFS on mips due to a variable called 'mips')
On Tue, Oct 19, 2021 at 06:00:35PM +0530, Nilesh Patra wrote: > There is still a failure in the latest version as well (1.0.9) > a minor change fixes it, please consider applying attached patch. Gah! Will do
Bug#987755: Mips build failure in new rpf 1.0.9 (Was: Bug#987755: r-cran-rpf: FTBFS on mips due to a variable called 'mips')
Hi Joshua, On Thu, 29 Apr 2021 13:09:46 -0400 Joshua N Pritikin wrote:> > I wonder whether you want to fix this issue with the suggested > patch upstream. Thank you. Yes, I will apply it. There is still a failure in the latest version as well (1.0.9) a minor change fixes it, please consider applying attached patch. Thanks!!! Nilesh --- a/src/ba81quad.h +++ b/src/ba81quad.h @@ -740,7 +740,7 @@ int minItemsPerScore; double weightSum; public: - void setMinItemsPerScore(int mips); + void setMinItemsPerScore(int mips_); std::vector rowSkip; // whether to treat the row as NA // workspace OpenPGP_signature Description: OpenPGP digital signature
Bug#987755: r-cran-rpf: FTBFS on mips due to a variable called 'mips'
On Thu, Apr 29, 2021 at 04:18:07PM +0200, Andreas Tille wrote: > Control: tags -1 upstream > Control: forwarded -1 Joshua Pritikin > > Hi Joshua, > > I wonder whether you want to fix this issue with the suggested > patch upstream. Thank you. Yes, I will apply it.
Bug#987755: r-cran-rpf: FTBFS on mips due to a variable called 'mips'
Control: tags -1 upstream Control: forwarded -1 Joshua Pritikin Hi Joshua, I wonder whether you want to fix this issue with the suggested patch upstream. Kind regards Andreas. On Thu, Apr 29, 2021 at 11:10:46AM +0800, Yangfl wrote: > Source: r-cran-rpf > Tags: patch > Severity: minor > > Hi, > > r-cran-rpf FTBFS on mips, since a variable is called 'mips' and on > mips 'mips' is expanded to '1'. Lines in question: > > ba81quad.h:743:31: error: expected ‘,’ or ‘...’ before numeric constant > 743 | void setMinItemsPerScore(int mips); > | ^~~~ > ba81quad.cpp: In member function ‘void ifaGroup::import(const List&)’: > ba81quad.cpp:214:6: error: expected unqualified-id before numeric constant > 214 | int mips = 1; > | ^~~~ > ba81quad.cpp:274:4: error: lvalue required as left operand of assignment > 274 |mips = as(slotValue); > |^~~~ > ba81quad.cpp: At global scope: > ba81quad.cpp:426:40: error: expected ‘,’ or ‘...’ before numeric constant > 426 | void ifaGroup::setMinItemsPerScore(int mips) > |^~~~ > > Please consider applying this patch, adding a suffix to the variable 'mips'. > diff --git a/src/ba81quad.cpp b/src/ba81quad.cpp > index 60d276c..d6419ce 100644 > --- a/src/ba81quad.cpp > +++ b/src/ba81quad.cpp > @@ -211,7 +211,7 @@ void ifaGroup::import(const List ) > > paramRows = -1; > int pmatCols=-1; > - int mips = 1; > + int mips_ = 1; > int dataRows = 0; > NumericVector Rmean; > NumericMatrix Rcov; > @@ -271,7 +271,7 @@ void ifaGroup::import(const List ) > } else if (strEQ(key, "qpoints")) { > qpoints = as(slotValue); > } else if (strEQ(key, "minItemsPerScore")) { > - mips = as(slotValue); > + mips_ = as(slotValue); > } else { > // ignore > } > @@ -312,7 +312,7 @@ void ifaGroup::import(const List ) > > setLatentDistribution(mean, cov); > > - setMinItemsPerScore(mips); > + setMinItemsPerScore(mips_); > > if (numItems() != pmatCols) { > stop("item matrix implies %d items but spec is length %d", > @@ -423,13 +423,13 @@ void ba81NormalQuad::layer::setupOutcomes(ifaGroup ) > void ba81NormalQuad::setupOutcomes(class ifaGroup ) > { layers[0].setupOutcomes(ig); } > > -void ifaGroup::setMinItemsPerScore(int mips) > +void ifaGroup::setMinItemsPerScore(int mips_) > { > - if (numItems() && mips > numItems()) { > + if (numItems() && mips_ > numItems()) { > stop("minItemsPerScore (=%d) cannot be larger than the number > of items (=%d)", > - mips, numItems()); > + mips_, numItems()); > } > - minItemsPerScore = mips; > + minItemsPerScore = mips_; > } > > void ifaGroup::buildRowMult() > diff --git a/src/ba81quad.h b/src/ba81quad.h > index 3e60a86..39c5eb1 100644 > --- a/src/ba81quad.h > +++ b/src/ba81quad.h > @@ -740,7 +740,7 @@ private: > int minItemsPerScore; > double weightSum; > public: > - void setMinItemsPerScore(int mips); > + void setMinItemsPerScore(int mips_); > std::vector rowSkip; // whether to treat the row as NA > > // workspace > ___ > R-pkg-team mailing list > r-pkg-t...@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/r-pkg-team -- http://fam-tille.de
Bug#987755: r-cran-rpf: FTBFS on mips due to a variable called 'mips'
Source: r-cran-rpf Tags: patch Severity: minor Hi, r-cran-rpf FTBFS on mips, since a variable is called 'mips' and on mips 'mips' is expanded to '1'. Lines in question: ba81quad.h:743:31: error: expected ‘,’ or ‘...’ before numeric constant 743 | void setMinItemsPerScore(int mips); | ^~~~ ba81quad.cpp: In member function ‘void ifaGroup::import(const List&)’: ba81quad.cpp:214:6: error: expected unqualified-id before numeric constant 214 | int mips = 1; | ^~~~ ba81quad.cpp:274:4: error: lvalue required as left operand of assignment 274 |mips = as(slotValue); |^~~~ ba81quad.cpp: At global scope: ba81quad.cpp:426:40: error: expected ‘,’ or ‘...’ before numeric constant 426 | void ifaGroup::setMinItemsPerScore(int mips) |^~~~ Please consider applying this patch, adding a suffix to the variable 'mips'. diff --git a/src/ba81quad.cpp b/src/ba81quad.cpp index 60d276c..d6419ce 100644 --- a/src/ba81quad.cpp +++ b/src/ba81quad.cpp @@ -211,7 +211,7 @@ void ifaGroup::import(const List ) paramRows = -1; int pmatCols=-1; - int mips = 1; + int mips_ = 1; int dataRows = 0; NumericVector Rmean; NumericMatrix Rcov; @@ -271,7 +271,7 @@ void ifaGroup::import(const List ) } else if (strEQ(key, "qpoints")) { qpoints = as(slotValue); } else if (strEQ(key, "minItemsPerScore")) { - mips = as(slotValue); + mips_ = as(slotValue); } else { // ignore } @@ -312,7 +312,7 @@ void ifaGroup::import(const List ) setLatentDistribution(mean, cov); - setMinItemsPerScore(mips); + setMinItemsPerScore(mips_); if (numItems() != pmatCols) { stop("item matrix implies %d items but spec is length %d", @@ -423,13 +423,13 @@ void ba81NormalQuad::layer::setupOutcomes(ifaGroup ) void ba81NormalQuad::setupOutcomes(class ifaGroup ) { layers[0].setupOutcomes(ig); } -void ifaGroup::setMinItemsPerScore(int mips) +void ifaGroup::setMinItemsPerScore(int mips_) { - if (numItems() && mips > numItems()) { + if (numItems() && mips_ > numItems()) { stop("minItemsPerScore (=%d) cannot be larger than the number of items (=%d)", - mips, numItems()); + mips_, numItems()); } - minItemsPerScore = mips; + minItemsPerScore = mips_; } void ifaGroup::buildRowMult() diff --git a/src/ba81quad.h b/src/ba81quad.h index 3e60a86..39c5eb1 100644 --- a/src/ba81quad.h +++ b/src/ba81quad.h @@ -740,7 +740,7 @@ private: int minItemsPerScore; double weightSum; public: - void setMinItemsPerScore(int mips); + void setMinItemsPerScore(int mips_); std::vector rowSkip; // whether to treat the row as NA // workspace