Hi, the short version of this question is how can it be that pbuilder seems to "eat" some '-L' in front of a linker option in r-cran-rstan[1] to make the build fail in pbuilder (see below) while Shayan confirmed schroot is able to build the package nicely?
Kind regards Andreas. [1] https://salsa.debian.org/r-pkg-team/r-cran-rstan On Thu, Sep 24, 2020 at 01:17:18PM +0100, Shayan Doust wrote: > Hello Andreas, > > That is very strange. It seems like a localised issue with chroot? It's > strange > because I can build this with sbuild (which relies on chroot?). I have > attached > the full log of my build regarding r-cran-rstan for information on the build > in > my case. > > I don't use chroots but I do rely on $ pbuilder login in some cases, so I'm > not > sure why you can't build this in your chroot. > > Kind regards, > Shayan Doust > > On 24/09/2020 10:19, Andreas Tille wrote: > > 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. > > -- http://fam-tille.de