I'm trying to install an R package 'cubature' in a Linux-based remote server which uses SLURM as manager.
Given that I'm a user of the server, I do not have root access. I tried to install the R package locally, but I do get the following error:
In file included from ./src/divonne/common.c:14:0,
from ./src/common/CSample.c:77,
from ./src/divonne/Divonne.c:14:
./src/divonne/Split.c: In function ‘SolveEqs’:
./src/divonne/Split.c:119:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int first_time = 1 ; c >= cut; --c) {
^
./src/divonne/Split.c:119:3: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [libcuba.a(Divonne.o)] Error 1
make[1]: Leaving directory `/tmp/RtmpKH27PL/R.INSTALLa8387b918120/cubature/src/Cuba-4.2'
make: *** [cuba.ts] Error 2
ERROR: compilation failed for package ‘cubature’
It seems that R cannot find the right compiler for installing the R package.
Do you have any suggestion on what I should do?
Related
I am trying to install the package GWmodel from source following this website. After running install_github(lbb220/GWmodel/GWmodel) I am receiving this error: Error: Failed to install 'unknown package' from GitHub: Line starting '<<<<<<< HEAD ...' is malformed!
The reason I want to to install the package from source and not use the install.packages("GWmodel") is that I want to use parallel.method = "cuda". In the documentation it says:
Requirements of using CUDA for high-performence computation in GWR functions:
To run GWR-CUDA (i.e. parallel.method is pecified as “cuda”) with gwr.basic , bw.gwr and gwr.model.selection, the following conditions are required:
There is at least one NVIDIA GPU supporting CUDA equipped on user's computer.
CUDA (>10.2) are installed with the environment variable 'CUDA_HOME' set properly.
The package should re-built from source. - For Linux user, 'GWmodelCUDA' will be automatically built if CUDA toolkit could be detected by the complier. - For Windows user, 'GWmodelCUDA.dll' and 'GWmodelCUDA.lib' will be automatically downloaded; however, we would recommend users to build the 'GWmodelCUDA' library manually to avoid some potentially unknown issues, and an 'CMakeLists.txt' file is provided for this procedure.
If any condition above is not satisfied, the GWR-CUDA will not work even though the “parallel.method” is specified as “cuda”.
If I install it using install.github() I am getting the error I mentioned. I have installed the CUDA (>10.2) and I have set the environment variable 'CUDA_HOME' properly.
If I use the install.packages("GWmodel") I get no errors. I also tried to download GWmodel.zip and install from a local zip file, but the same error.
I have install rtools successfully (I tested it using the example here)
I am using R.Studio 1.4.1717, R 4.1.1 and Windows 11.
Any ideas how can I proceed?
I used install_github("lbb220/GWmodel") and although I don't receive the above error, still the installation cannot be done. I am getting the below message now:
** libs
*** arch - i386
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.1/include" -DNDEBUG -I'C:/Program Files/R/R-4.1.1/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.1/library/RcppArmadillo/include' -ARMA_64BIT_WORD=1 -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c GWmodel.cpp -o GWmodel.o
GWmodel.cpp: In function 'double sp_gcdist(double, double, double, double)':
GWmodel.cpp:764:29: error: 'DOUBLE_EPS' was not declared in this scope
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
GWmodel.cpp:764:29: note: suggested alternative: 'ENABLE_NLS'
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
ENABLE_NLS
GWmodel.cpp: In function 'void printMat(arma::mat)':
GWmodel.cpp:1165:16: warning: comparison of integer expressions of different signedness: 'const uword' {aka 'const unsigned int'} and 'int' [-Wsign-compare]
if (m.n_rows < n)
~~~~~~~~~^~~
make: *** [C:/PROGRA~1/R/R-41~1.1/etc/i386/Makeconf:245: GWmodel.o] Error 1
ERROR: compilation failed for package 'GWmodel'
* removing 'C:/Program Files/R/R-4.1.1/library/GWmodel'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/GEOGRA~1/AppData/Local/Temp/RtmpOwWBPs/file8f43609514d/GWmodel_2.2-0.tar.gz’ had non-zero exit status
This is because you are not actually installing from the main repository. Try install_github(lbb220/GWmodel).
I'm trying to install R from source on Windows with OpenBLAS.
I (mainly) followed the steps here;
https://www.avrahamadler.com/r-tips/build-openblas-for-windows-r64/
I have OpenBLAS compiled, and R seems to work. However, in the Makefile script once you get to the rpackages section it crashes with this;
C:\R64\src\gnuwin32>make rpackages
building package 'base'
cannot create /tmp/R17244: directory nonexistent
mv: cannot stat '/tmp/R17244': No such file or directory
make[3]: *** [mkR1] Error 1
make[2]: *** [all] Error 2
make[1]: *** [R] Error 1
make: *** [rpackages] Error 2
So it feels like R is trying to setup a temporary directory at /tmp, but that directory won't exist on a Windows system. Any ideas?
Past few weeks I have been trying to setup Qt native build environment on Raspberry Pi.
I followed steps mentioned in Native Build of Qt 5.4.1.
Since I do not use USB Hard Disk, I omitted following steps:
Unpacking source to an external USB HDD
Increasing available RAM for concurrent compilation
Instead I extracted to moved to path: cd ~/opt/qt-everywhere-opensource-src-5.4.1
and for compilation I ran: make 2>&1 | tee make.out
I tried Qt 5.4.1 to build on Jessie version of Raspbian OS, but it failed. I found similar error someone posted and tried to reply but no response at the end.
And now I tried Qt 5.4.1 on Wheezy version, and I get different error:
/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore//libJavaScriptCore.a: member /home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore//.obj/dfg/DFGThunks.o in archive is not an object
collect2: ld returned 1 exit status
Makefile.jsc:98: recipe for target '../../bin/jsc' failed
make[3]: *** [../../bin/jsc] Error 1
make[3]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore'
Makefile.JavaScriptCore:126: recipe for target 'sub-jsc-pro-make_first-ordered' failed
make[2]: *** [sub-jsc-pro-make_first-ordered] Error 2
make[2]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore'
Makefile:93: recipe for target 'sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered' failed
make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered] Error 2
make[1]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit'
Makefile:485: recipe for target 'module-qtwebkit-make_first' failed
make: *** [module-qtwebkit-make_first] Error 2
Can someone tell me why this occurs? Is this Qt code issue? Is there a way to resolve this?
I'm using CentOS 6.4 and I'm trying to install the R package 'rPython'. It failed with following messages. Anybody knows how to fix this? Thanks!
/usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(dictobject.o): relocation R_X86_64_32S against `PyDict_Type' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [rPython.so] Error 1
ERROR: compilation failed for package ‘rPython’
* removing ‘/usr/lib64/R/library/rPython’
It seems that the default installation of Python on RHEL / CentOS,
etc. is not "shared enabled", i.e., it does not include libpython*.so. Just the libpython*.a static library. This prevents some Python
applications to run properly. There are instructions in different
places, (e.g., here or here) indicating how to install Python as a shared library on CentOS and related Linux flavours.
I am trying to do some performance analysis of HTTP/1.1 and HTTP /2. But I have not been successful in installing the later one. I need both the protocols from the same implementation (e.g. H2O). The first problem I got while installing H2O is the openssl version in ubuntu 14.04. The I updated the version to 1.0.2 as suggested by 1. Then I got the following error messages:
In function `h2o_socket_ssl_get_selected_protocol':
/tmp/h2o/lib/common/socket.c:499: undefined reference to `SSL_get0_alpn_selected'
CMakeFiles/h2o.dir/lib/common/socket.c.o: In function `h2o_ssl_register_alpn_protocols':
/tmp/h2o/lib/common/socket.c:542: undefined reference to `SSL_CTX_set_alpn_select_cb'
collect2: error: ld returned 1 exit status
make[2]: *** [h2o] Error 1
make[1]: *** [CMakeFiles/h2o.dir/all] Error 2
make: *** [all] Error 2
Can anybody please help me here.
Try using Nginx. There is a lot more support for it. H2O is a little more complicated to setup and the docs aren't as well written.