I have been trying to install RMariaDB on my CentOS server with no success. I am running R version 3.5. I keep getting error messages related to scope. The source files seem to be correct and the install has been MD5 Sum checked. The package will unpack but then fails with a non-zero exit status. I get similar error messages whether I am installing RMySQL or RMariaDB. They are both related to the my_bool variable. Specific error messages are posted below:
> install.packages("RMariaDB")
Installing package into ‘/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RMariaDB_1.0.6.tar.gz'
Content type 'application/x-gzip' length 42903 bytes (41 KB)
==================================================
downloaded 41 KB
* installing *source* package ‘RMariaDB’ ...
** package ‘RMariaDB’ successfully unpacked and MD5 sums checked
Using mysql_config
Found mysql_config/mariadb_config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/mysql -m64
Using PKG_LIBS=-L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -lssl -lcrypto -ldl
** libs
g++ -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I"/usr/share/R/library/BH/include" -I"/usr/share/R/library/plogr/include" -I"/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c DbConnection.cpp -o DbConnection.o
g++ -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/mysql -m64 -I"/usr/share/R/library/BH/include" -I"/usr/share/R/library/plogr/include" -I"/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/Rcpp/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c DbResult.cpp -o DbResult.o
In file included from MariaResultPrep.h:6:0,
from DbResult.cpp:4:
MariaBinding.h:14:15: error: ‘my_bool’ was not declared in this scope
std::vector<my_bool> is_null;
^
MariaBinding.h:14:22: error: template argument 1 is invalid
std::vector<my_bool> is_null;
^
MariaBinding.h:14:22: error: template argument 2 is invalid
In file included from MariaResultPrep.h:9:0,
from DbResult.cpp:4:
MariaRow.h:18:15: error: ‘my_bool’ was not declared in this scope
std::vector<my_bool> nulls_, errors_;
^
MariaRow.h:18:22: error: template argument 1 is invalid
std::vector<my_bool> nulls_, errors_;
^
MariaRow.h:18:22: error: template argument 2 is invalid
make: *** [DbResult.o] Error 1
ERROR: compilation failed for package ‘RMariaDB’
* removing ‘/home/cmiddlet#cgifederal.com/R/x86_64-redhat-linux-gnu-library/3.5/RMariaDB’
Warning in install.packages :
installation of package ‘RMariaDB’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpwlaf35/downloaded_packages’
Related
I have updated Xcode and MacOS operating system to Monterey and now I am having a series of issues of making Rstudio to work as used to do.
In particular, now I am getting an error when I try to source with Rcpp the code described in Rcpp with quad precision computation.
This is the error I get:
In file included from /usr/local/gfortran/include/c++/12.1.0/cmath:47,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30,
from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp.h:27,
from quadexp.cpp:2:
/usr/local/gfortran/include/c++/12.1.0/bits/std_abs.h:38:15: fatal error: stdlib.h: No such file or directory
38 | #include_next <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [quadexp.o] Error 1
Do you have any idea of what does it mean? I checked in /usr/local/gfortran/include/c++/12.1.0/bits and stdlib.h is present.
This is my ~/.R/Makevars:
LOC=/usr/local/gfortran
CC=$(LOC)/bin/gcc -fopenmp
CXX=$(LOC)/bin/g++ -fopenmp
CXX11 = $(LOC)/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -I/usr/local/opt/llvm/include
LDFLAGS=-L$(LOC)/lib -Wl,-rpath,$(LOC)/lib,-L/usr/local/lib
CPPFLAGS=-I$(LOC)/include -I/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/usr/local/include
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
I want to build mesa3d source code for some reason. I follow the guide on https://mesa3d.org/install.html and the build environment is fedora31 and gcc9.2, but there are some build error when I trying to build the code with running ninja install.
FAILED: src/mesa/drivers/dri/r200/58cd8d4##r200#sta/radeon_buffer_objects.c.o
cc -Isrc/mesa/drivers/dri/r200/58cd8d4##r200#sta -Isrc/mesa/drivers/dri/r200 -I../src/mesa/drivers/dri/r200 -Iinclude -I../include -Isrc -I../src -Isrc/mapi -I../src/mapi -Isrc/mesa -I../src/mesa -I../src/gallium/include -Isrc/gallium/auxiliary -I../src/gallium/auxiliary -Isrc/mesa/drivers/dri/common -I../src/mesa/drivers/dri/common -Isrc/util -I../src/util -I../src/mesa/drivers/dri/r200/server -Isrc/util/xmlpool -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="20.0.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/issues"' -DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_UINT128 -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_SYS_SYSCTL_H -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_MEMALIGN -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="9.0.0"' -DHAVE_VALGRIND -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -Werror=format -Wformat-security -fPIC -fvisibility=hidden -DRADEON_R200 -MD -MQ 'src/mesa/drivers/dri/r200/58cd8d4##r200#sta/radeon_buffer_objects.c.o' -MF 'src/mesa/drivers/dri/r200/58cd8d4##r200#sta/radeon_buffer_objects.c.o.d' -o 'src/mesa/drivers/dri/r200/58cd8d4##r200#sta/radeon_buffer_objects.c.o' -c ../src/mesa/drivers/dri/r200/radeon_buffer_objects.c
../src/mesa/drivers/dri/r200/radeon_buffer_objects.c:1:1: error: expected identifier or '(' before '.' token
1 | ../radeon/radeon_buffer_objects.c
| ^
Then I check the radeon_buffer_objects.c, and this file just have one file path in it.
../radeon/radeon_buffer_objects.c
I'm not very familier with gcc and clang. What is that mean? And how can I resolve this build error?
As AnthonySottile's comment said, this error is about the symbol link support. I have cloned this repo to windows before and upload to my own git server. And the error occured when I trying to build the source code from my git.
I try to clone the repo from mesa3d.org, and the issue resolved.
Thanks for the help, guys.
I'm trying to compile a C++ library on Mac OS which compiles on Linux. (This is done via installing an R package via a Makevars file, see: https://cran.r-project.org/doc/manuals/r-release/R-exts.html) On Linux, I see the following when I do make:
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I../inst/include/ -I"/usr/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I../inst/include/ -I"/usr/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c packagename.cpp -o packagename.o
g++ -std=c++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o packagename.so RcppExports.o packagename.o -llib1 -llib2 -llib3 -L/usr/lib/R/lib -lR
installing to /home/username/R/x86_64-pc-linux-gnu-library/3.2/packagename/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (packagename)
When doing this with Mac OS, I notice it's using clang++ instead, which appears to cause errors:
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I/usr/local/include -fPIC -Wall -g -O2 -c packagename.cpp -o packagename.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I/usr/local/include -fPIC -Wall -g -O2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o packagename.so RcppExports.o packagename.o rcpp_hello_world.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.4/Resources/library/packagename/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘packagename’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/packagename/libs/packagename.so':
Error: loading failed
Execution halted
ERROR: loading failed
How do I specify in the Makefile to use g++ and not clang++?
I have tried CXX=g++ but this doesn't appear to work.
I am getting an "-Werror=format-security" error when gcc compiles lpSolve in R.
I am using Ubuntu 12.04 (lubuntu kernel) and R version 3.1.0.
Here is the exact error:
* installing *source* package ‘lpSolve’ ...
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c colamd.c -o colamd.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c commonlib.c -o commonlib.o
commonlib.c: In function ‘blockWriteINT’:
commonlib.c:691:3: error: format not a string literal and no format arguments [-Werror=format-security]
commonlib.c: In function ‘blockWriteBOOL’:
commonlib.c:710:3: error: format not a string literal and no format arguments [-Werror=format-security]
commonlib.c: In function ‘blockWriteREAL’:
commonlib.c:732:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [commonlib.o] Error 1
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I . -DINTEGERTIME -DPARSER_LP -DBUILDING_FOR_R -DYY_NEVER_INTERACTIVE -DUSRDLL -DCLOCKTIME -DRoleIsExternalInvEngine -DINVERSE_ACTIVE=INVERSE_LUSOL -DINLINE=static -DParanoia -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c commonlib.c -o commonlib.o
commonlib.c: In function ‘blockWriteINT’:
commonlib.c:691:3: error: format not a string literal and no format arguments [-Werror=format-security]
commonlib.c: In function ‘blockWriteBOOL’:
commonlib.c:710:3: error: format not a string literal and no format arguments [-Werror=format-security]
commonlib.c: In function ‘blockWriteREAL’:
commonlib.c:732:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [commonlib.o] Error 1
ERROR: compilation failed for package ‘lpSolve’
* removing ‘/home/ben/lpSolve.Rcheck/lpSolve’
I have tried manually installing it using R CMD INSTALL. I've also followed the instructions here to no avail.
Thanks for looking.
The error occurs at fprintf in the functions, thus if you download the source code, re-make the package, and it'll be solved. But the lpSolve packing is currently orphaned. The error might occur due to the compiler check. Here's a way to make a detour.
Go to R etc path (e.g. /usr/lib/R/etc, or /etc/R).
Edit Makeconf file: remove -Werror=format-security in CFLAGS. (It is read-only file, thus su authority is required.)
Re-install package: install.package('lpSolve')
Restore Makeconf file back if necessary.
I hope this help you.
I am trying to get my web server running on Ubuntu using Apache2 in order to run my site built with Django. Following the official django docs, I successfully got the apache server to run the django app. However, I am using Python 3.3, and when I installed mod_wsgi, it was configured for the wrong python version, so the app gets a 500 internal server error and the Apache error logs show ImportError: No module named django.core.wsgi.
I am attempting to install mod_wsgi built for Python 3.3 with the following terminal commands.
mkdir ~/sources
cd ~/sources
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
tar xvfz mod_wsgi-3.3.tar.gz
cd mod_wsgi-3.3
./configure
make
sudo make install
However, when I get to make I get an error and I am unable to continue.
~/sources/mod_wsgi-3.3$ make
/usr/bin/apxs2 -c -I/usr/include/python2.7 -DNDEBUG -D_FORTIFY_SOURCE=2 mod_wsgi.c - L/usr/lib -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64- linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wformat-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing - D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 - I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/python2.7 - DNDEBUG -D_FORTIFY_SOURCE=2 -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c: In function 'wsgi_process_socket':
mod_wsgi.c:10095:37: error: 'conn_rec' has no member named 'remote_addr'
if ((rv = apr_socket_addr_get(&c->remote_addr, APR_REMOTE, sock))
^
mod_wsgi.c:10103:27: error: 'conn_rec' has no member named 'remote_ip'
apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
^
mod_wsgi.c:10103:41: error: 'conn_rec' has no member named 'remote_addr'
apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
^
mod_wsgi.c: In function 'wsgi_hook_daemon_handler':
mod_wsgi.c:12742:18: error: 'conn_rec' has no member named 'remote_ip'
r->connection->remote_ip = (char *)apr_table_get(r->subprocess_env,
^
mod_wsgi.c: In function 'Auth_environ':
mod_wsgi.c:13262:10: error: 'conn_rec' has no member named 'remote_ip'
if (c->remote_ip) {
^
mod_wsgi.c:13263:18: error: 'conn_rec' has no member named 'remote_ip'
value = c->remote_ip;
^
mod_wsgi.c:13295:14: error: 'conn_rec' has no member named 'remote_addr'
rport = c->remote_addr->port;
^
mod_wsgi.c: In function 'wsgi_hook_access_checker':
mod_wsgi.c:14395:29: error: 'conn_rec' has no member named 'remote_ip'
host = r->connection->remote_ip;
^
mod_wsgi.c: At top level:
mod_wsgi.c:14697:5: warning: initialization from incompatible pointer type [enabled by default]
&wsgi_check_authorization,
^
mod_wsgi.c:14697:5: warning: (near initialization for 'wsgi_authz_provider.check_authorization') [enabled by default]
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
From the error message it looks like it is trying to use python2.7 when I want 3.3, although I don't know that this is the cause of the error.
I think that would stem from make, as it says it checked for python in /usr/bin/python and not /usr/bin/python3.3.
How can I get this to work properly?
I am running apache2, django1.6, ubuntu 13.10
EDIT
I was able to get ./configure to work by running ./configure --with-python=/usr/bin/python3.3, but now I get a different error:
~/sources/mod_wsgi-3.3$ make
/usr/bin/apxs2 -c -I/usr/include/python3.3m -DNDEBUG mod_wsgi.c -L/usr/lib - L/usr/lib/python3.3/config -lpython3.3 -lpthread -ldl -lutil -lm
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64- linux-gnu-gcc -std=gnu99 -prefer-pic -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wformat-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing - D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 - I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/python3.3m - DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:135:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
Instead of compiling mod_wsgi for python3.3 yourself, you could try to install the ubuntu package