On Wed, Sep 23, 2020 at 07:34:50PM +0100, Shayan Doust wrote: > This [commit] now rectifies the build issue for r-cran-prophet. > > I can build r-cran-prophet successfully after re-building r-cran-rstan with > the > new patch.
Strange, when I try to build r-cran-rstan with your patch I get: g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"." -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -D_REENTRANT -DSTAN_THREADS -I'/usr/lib/R/site-library/Rcpp/include' -I'/usr/lib/R/site-library/RcppEigen/include' -I'/usr/lib/R/site-library/BH/include' -I'/usr/lib/R/site-library/StanHeaders/include' -I'/usr/lib/R/site-library/RcppParallel/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-OT058M/r-base-4.0.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c stan/lang/grammars/whitespace_grammar_inst.cpp -o stan/lang/grammars/whitespace_grammar_inst.o g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-z,relro -o rstan.so Module.o chains.o init.o misc.o pointer-tools.o sparse_extractors.o stan_fit_base.o stan_fit_rccp.o stanc.o stan/lang/ast_def.o stan/lang/grammars/bare_type_grammar_inst.o stan/lang/grammars/block_var_decls_grammar_inst.o stan/lang/grammars/expression07_grammar_inst.o stan/lang/grammars/expression_grammar_inst.o stan/lang/grammars/functions_grammar_inst.o stan/lang/grammars/indexes_grammar_inst.o stan/lang/grammars/local_var_decls_grammar_inst.o stan/lang/grammars/program_grammar_inst.o stan/lang/grammars/semantic_actions_def.o stan/lang/grammars/statement_2_grammar_inst.o stan/lang/grammars/statement_grammar_inst.o stan/lang/grammars/term_grammar_inst.o stan/lang/grammars/whitespace_grammar_inst.o /usr/lib/x86_64-linux-gnu -ltbb -ltbbmalloc -L/usr/lib/R/lib -lR /usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu: file format not recognized collect2: error: ld returned 1 exit status make[1]: *** [/usr/share/R/share/make/shlib.mk:6: rstan.so] Error 1 It looks as if some variable is not resloved properly resolved in the chroot I substituted s/inst.o /usr/lib/x86_64-linux-gnu -ltbb/inst.o -L/usr/lib/x86_64-linux-gnu -ltbb/ (in the very end) and it worked. I guess the patch in R/plugin.R is responsible for this since this is where I can find the string -ltbb. Any idea how to fix this? Kind regards Andreas. > Within r-cran-prophet: > $ autopkgtest . -- null > > [TRUNCATED] > > /usr/bin/ld: cannot find -lStanHeaders > collect2: error: ld returned 1 exit status > make: *** [/usr/share/R/share/make/shlib.mk:6: sourceCpp_2.so] Error 1 > -- 2. Error: (unknown) (@test_stan_functions.R#9) > ----------------------------- > $ operator is invalid for atomic vectors > Backtrace: > 1. base::tryCatch(...) > 2. base:::tryCatchList(expr, classes, parentenv, handlers) > 3. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 4. value[[3L]](cond) > 5. rstan::expose_stan_functions(...) > > == testthat results > =========================================================== > [ OK: 160 | SKIPPED: 0 | WARNINGS: 3 | FAILED: 2 ] > 1. Error: (unknown) (@test_prophet.R#9) > 2. Error: (unknown) (@test_stan_functions.R#9) > > There exists some failed tests, however 160 pass! > > Kind regards, > Shayan Doust > > > [commit]: > https://salsa.debian.org/r-pkg-team/r-cran-rstan/-/commit/7351289242ba080c112b1c15784e57f154a79076 pub RSA 4096/19D02395 2019-09-04 Shayan Doust (Personal EMAIL) <he...@shayandoust.me> > sub RSA 4096/00484410 2020-06-26 > -- http://fam-tille.de