[Rd] Compiling error with glmnet and nloptr
Dear All, I haven't been able to compile the latest glmnet and nloptr from CRAN wth the following error messages, glmnet: elnet_exp.cpp:141:59: required from here glmnetpp/include/glmnetpp_bits/elnet_point/gaussian_base.hpp:90:39: error: 'self' was not declared in this scope [=](auto k) { self().template update(k, ab, dem); }, ... make: *** [elnet_exp.o] Error 1 ERROR: compilation failed for package �glmnet� * removing �/rds/user/jhz22/hpc-work/R/glmnet� * restoring previous �/rds/user/jhz22/hpc-work/R/glmnet� nloptr: test-C-API.cpp:108:35: error: call of overloaded 'abs(__gnu_cxx::__alloc_traits >::value_type)' is ambiguous expect_true(abs(res[1] - 8./27) < 1.0e-4); ... /usr/local/software/archive/linux-scientific7-x86_64/gcc-9/gcc-6.5.0-dtb6lagchexqdijlx6xgkin3zlfddpzi/include/c++/6.5.0/cstdlib:172:3: note: candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~ make: *** [test-C-API.o] Error 1 ERROR: compilation failed for package �nloptr� Any suggestions to fix these? I use gcc/6 and have $ uname -a Linux login-e-16 3.10.0-1160.59.1.el7.x86_64 #1 SMP Tue Feb 22 10:57:56 CST 2022 x86_64 x86_64 x86_64 GNU/Linux Many thanks in advance, Jing Hua [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Compiling error with glmnet and nloptr
Also for now, I commented on self().template update at lines 59,90 of glmnetpp/include/glmnetpp_bits/elnet_point/gaussian_base.hpp and glmnet also passed , so example(glmnet) gives the familiar results. Ideally, some better solution is preferable. Jing Hua From: jing hua zhao Sent: 10 March 2022 10:45 To: R-devel Subject: Re: Compiling error with glmnet and nloptr Just a note that I used R 4.1.2 and with R 4.1.3 I had the same issues nevertheless I was able to go through with (not entirely sure preferable) nloptr once abs() is changed into fabs() within �src/test-C-API.cpp. Thanks. Jing Hua From: jing hua zhao Sent: 10 March 2022 09:22 To: R-devel Subject: Compiling error with glmnet and nloptr Dear All, I haven't been able to compile the latest glmnet and nloptr from CRAN wth the following error messages, glmnet: elnet_exp.cpp:141:59: required from here glmnetpp/include/glmnetpp_bits/elnet_point/gaussian_base.hpp:90:39: error: 'self' was not declared in this scope [=](auto k) { self().template update(k, ab, dem); }, ... make: *** [elnet_exp.o] Error 1 ERROR: compilation failed for package �glmnet� * removing �/rds/user/jhz22/hpc-work/R/glmnet� * restoring previous �/rds/user/jhz22/hpc-work/R/glmnet� nloptr: test-C-API.cpp:108:35: error: call of overloaded 'abs(__gnu_cxx::__alloc_traits >::value_type)' is ambiguous expect_true(abs(res[1] - 8./27) < 1.0e-4); ... /usr/local/software/archive/linux-scientific7-x86_64/gcc-9/gcc-6.5.0-dtb6lagchexqdijlx6xgkin3zlfddpzi/include/c++/6.5.0/cstdlib:172:3: note: candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~ make: *** [test-C-API.o] Error 1 ERROR: compilation failed for package �nloptr� Any suggestions to fix these? I use gcc/6 and have $ uname -a Linux login-e-16 3.10.0-1160.59.1.el7.x86_64 #1 SMP Tue Feb 22 10:57:56 CST 2022 x86_64 x86_64 x86_64 GNU/Linux Many thanks in advance, Jing Hua [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] security holes in system2
Dear R Developers, The documentation for "system2" only defines "args" as args: a character vector of arguments to 'command'. This encourages the reader to think that R's system2 interface is passing its arguments unchanged to exec(). But I was surprised to find that under the hood, you're just pasting my arguments together and sending them to a subshell to be re-parsed: command <- paste(c(env, shQuote(command), args), collapse = " ") What horror! Please fix or document the fact that system2 executes its ARGUMENTS and not just the command. Aside from being relevant to data scientists, it's a big security hole. It means that, in some cases, something that looks like plain text in my R code will end up being executed as a command on my system, which seems dangerous to me. > my_data=c("<(>&2 echo oops)") > system2("echo",args=my_data) /dev/fd/63 oops Thank you, Frederick __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel