R: Error compiling dbscan - c++

I can install dbscan on my laptop, no problem.
But it is not installing on a linux cluster I use for big data.
I have tried with R 3.3.3 and 3.4.0. I get the same error after invoking
install.packages("dbscan")
Error Message:
buildHDBSCAN.cpp(45): error: more than one operator "==" matches these operands:
built-in operator "pointer == pointer"
function "Rcpp::operator==(Rcpp::Na_Proxy, SEXP)"
operand types are: Rcpp::internal::generic_name_proxy<19> == SEXP
if (!hcl.containsElementNamed("labels") || hcl["labels"] == R_NilValue){
^
compilation aborted for buildHDBSCAN.cpp (code 2)
make: ***
[/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2 /Compiler/intel2016.4/r/3.3.3/lib64/R/etc/Makeconf:141: buildHDBSCAN.o] Error 2
ERROR: compilation failed for package ‘dbscan’
removing ‘/home/xxxxxx/R/x86_64-pc-linux-gnu-library/3.3/dbscan’
The downloaded source packages are in
‘/tmp/RtmpI1SJp8/downloaded_packages’
Warning message:
In install.packages("dbscan") :
installation of package ‘dbscan’ had non-zero exit status

Related

Box include file unknown problem on gtkmm

I'm working on a gtkmm3.0 app on Ubuntu and OSX.
I tried to make my project in three different enviroments:
OSx Big Sur
Ubuntu 16.04.7 LTS
Ubuntu 20.04.2 LTS
On the first and last one, my project is building well with no warnings and no errors, but in the second one, I'm having a bunch of exceptions(see below)
In file included from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:25:0,
from /usr/include/glibmm-2.4/glibmm/object.h:34,
from /usr/include/pangomm-1.4/pangomm/context.h:32,
from /usr/include/gtkmm-3.0/gtkmm/widget.h:32,
from /usr/include/gtkmm-3.0/gtkmm/container.h:29,
from /usr/include/gtkmm-3.0/gtkmm/box.h:28,
from /home/workspace/CPPND-Linear-System-Solver/src/Gui.h:5,
from /home/workspace/CPPND-Linear-System-Solver/src/Gui.cpp:1:
/usr/include/glibmm-2.4/glibmm/variant.h:583:55: error: ISO C++1z does not allow dynamic exception specifications
tatic V_CastTo cast_dynamic(const VariantBase& v) throw(std::bad_cast);
^~~~~
/usr/include/glibmm-2.4/glibmm/variant.h:630:1: error: ISO C++1z does not allow dynamic exception specifications
throw(std::bad_cast)
^~~~~
/usr/include/glibmm-2.4/glibmm/variant.h:886:1: error: ISO C++1z does not allow dynamic exception specifications
throw(std::bad_cast);
^~~~~
/usr/include/glibmm-2.4/glibmm/variant.h:1069:1: error: ISO C++1z does not allow dynamic exception specifications
throw(std::bad_cast);
^~~~~
/usr/include/glibmm-2.4/glibmm/variant.h:1126:1: error: ISO C++1z does not allow dynamic exception specifications
throw(std::bad_cast);
^~~~~
CMakeFiles/linear_system.dir/build.make:75: recipe for target 'CMakeFiles/linear_system.dir/src/Gui.cpp.o' failed
make[2]: *** [CMakeFiles/linear_system.dir/src/Gui.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/linear_system.dir/all' failed
make[1]: *** [CMakeFiles/linear_system.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I'm googling since yesterday for a possible solution for it, and I did not found anything, but to define the throw which has not worked and seems to me its not a good practice. Also I looked for substitute the box container but besides it will give me so much work, it doesn't make sense to not work because of bad cast error just in one enviroment.
The exception happens on the line that I include the gtkmm/box.h file
and also I created a simple window application and it maked well, so as the exception message says, I think the problem is on the box.h file, but I didn't found a way to workaround it in Ubuntu 16.
App details:
C++17
gtkmm3.0
glib 2.4(in both ubuntu versions)
Installed all the gtkmm3.0 requirements previously the make, on https://www.gtkmm.org/en/download.html
Thank you

Error using Cygwin: "collect2: fatal error: ld terminated with signal 11 [Segmentation fault]"

I'm trying to use cygwin to download openslide (building natively on Windows) on a Windows 10 x64 system. I ran into an error earlier relating to chk_fail and set the line in the build file with -D_FORTIFY_SOURCE to 0 instead of the default (2). You can probably tell by now I don't really know what I'm doing. But I got a new error below relating to a memory error from what I've read. I tried deleting the whole package folder including the makefiles and object files, then clone from Github again and rebuild, but it didn't work. Can anyone give me pointers about what's happening here and how to fix it? It would be much appreciated.
Scanning dependencies of target ziptool
[ 90%] Building C object src/CMakeFiles/ziptool.dir/ziptool.c.obj
[ 90%] Linking C executable ziptool.exe
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [src/CMakeFiles/ziptool.dir/build.make:109: src/ziptool.exe] Error 1
make[2]: *** Deleting file 'src/ziptool.exe'
make[1]: *** [CMakeFiles/Makefile2:442: src/CMakeFiles/ziptool.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
Failed: make $parallel (line 417)
I solved this problem. Firstly, don't even bother to build this package using Cygwin. It won't work because of dependency issues and there is no record for version control in the package README.
For anyone else who has this problem like I did, you can download the latest versions of the code here: https://github.com/openslide/openslide-winbuild/releases and pick the latest one.
I first pip installed openslide-python. Then I moved openslide-win64-20171122 (from Github) into anaconda3/site-packages (not necessary, but nice), and then from anaconda3/site-packages/openslide I opened lowlevel.py.
In lowlevel.py, you need to add the following lines:
(in the beginning after importing libraries)
os.environ['PATH'] = "path/to/openslide-win64-20171122/bin" + ";" + os.environ['PATH']
You can also change this line:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary('libopenslide-0.dll')
to this:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary(util.find_library("libopenslide-0.dll"))
so that it searches for the libopenslide-0.dll file. Then don't forget to add from ctypes import util at the beginning.

using brm function but encounter "Compiling the C++ model No C++ compiler found ..."

I am using brm function but encounter the following problem. So I followed the instruction to install Rtools. But it returns the same error message ... Does anyone have the experience in solving this problem?
Compiling the C++ model
No C++ compiler found, so the following will probably not work.
See https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows#toolchain
Error in compileCode(f, code, language = language, verbose = verbose) :Compilation ERROR, function(s)/method(s) not created! Warning message:
In system(cmd) : 'make' not found
In addition: Warning messages:
1: In system2(file.path(Sys.getenv("R_HOME"), "bin", Sys.getenv("R_ARCH_BIN"),
running command '"C:/PROGRA~1/R/R-35~1.1/bin//R" CMD config CXX' had status 1
2: In system(cmd, intern = !verbose) :
running command 'C:/PROGRA~1/R/R-35~1.1/bin/x64/R CMD SHLIB file4a701b336a9f.cpp 2> file4a701b336a9f.cpp.err.txt' had status 1

'half' is not a member of 'Eigen'

Task :
I am trying to build TensorFlow Library with bazel using OpenCL in order to run the operations on GPU without enabling GPU of Tensorflow (without CUDA/NVIDIA).
Basically want to run on mobile GPU with the help of Android NDK and the built opencl-tensorflow library)
Steps Taken:
Replace the eigen_archive libray in /home/ashok/.cache/bazel/_bazel_ashok/337a0d8d7fbaddcaa8098e349718a6d6/external with 'eigen-opencl' library of https://bitbucket.org/benoitsteiner/eigen-opencl and build TensorFlow using bazel.
Issues Faced: 'half' is not a member of 'Eigen'
INFO: Found 1 target...
ERROR: /home/ashok/Ashok/tensorflow-1.0.1/tensorflow/core/BUILD:814:1: C++ compilation of rule '//tensorflow/core:android_tensorflow_lib_lite' failed (Exit 1)
In file included from ./tensorflow/core/framework/allocator.h:25:0,
from ./tensorflow/core/framework/op_kernel.h:22,
from ./tensorflow/core/util/guarded_philox_random.h:19,
from tensorflow/core/util/guarded_philox_random.cc:16:
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
./tensorflow/core/framework/type_traits.h:69:63: error: template argument 2 is invalid
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
Target //tensorflow/examples/android:tensorflow_demo failed to build
Please help in resolving the issue
Use https://bitbucket.org/benoitsteiner/opencl instead of https://bitbucket.org/benoitsteiner/eigen-opencl as it is the most updated repository

Error when build Ogre on Linux: narrowing conversion

I am trying to get Ogre on Linux. I downloaded the source files and uncompressed them. Then I created the build folder then I ran "cmake ..". After that completed, I ran "make -j4" (I do have 4 cores and I have also tried just make). I get to 49% and it stops every time. I have downloaded the cmake gui and ran configure and checked all the boxes. I hit configure again and then generate. I tried running "make" again.
Downloads/ogre_src_v1-8-1/RenderSystems/GL/src/atifs/src/ps_‌​1_4.cpp:689:1: error: narrowing conversion of ‘-35051’ from ‘int’ to ‘uint {aka unsigned int}’ inside { } [-Wnarrowing] };
That is the error that pops up several times except they refer to a different line of the code in ps_1_4.cpp and the number ‘-35051’ is different.
Also, There are several warnings for casting the const GLboolean* to GLboolean* throughout the build but this is the message that I have at the end:
RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/build.make:542: recipe for target 'RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/__/__/RenderSystem_GL/compile_RenderSystem_GL_0.cpp.o' failed
make[2]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/__/__/RenderSystem_GL/compile_RenderSystem_GL_0.cpp.o] Error 1
CMakeFiles/Makefile2:1057: recipe for target 'RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all' failed
make[1]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Also every time that I have tried a new way I delete the build folder and start all over. Each time it appears to end with this message. I am still relatively new to Linux and CMake, so can you explain what is going on and how you came to this conclusion?
Note: I have found one forum that talks about this but I don't know where the build function is or how to change the CXX_FLAG.
Referenced post suggests that Ogre can be successfully built using gnu++98 standard (which is actually a c++98 plus GNU extensions).
The standard is set via compiler flags, in case of cmake flags may be passed as:
cmake -DCMAKE_CXX_FLAGS="--std=gnu++98" ..