s-u / Rserve

Fast, flexible and powerful server providing access to R from many languages and systems
http://RForge.net/Rserve
Other
282 stars 65 forks source link

Rserve_1.8.6 causing errors: ld: library not found for -lssl #144

Closed datasurfergtx closed 4 years ago

datasurfergtx commented 4 years ago

I am trying to get a newer version of RServe installed, as the CRAN version has the long vectors bug (known issue). When I attempt to install the new version (either on Rforge or locally) I get the same error ld: library not found for -lssl

Here's the error log I have:

> install.packages("/Users/jackylam/Downloads/Rserve_1.8-6.tar.gz", repos = NULL, type="source")

Installing package into ‘/Users/jackylam/Library/R/3.6/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘Rserve’ ...
** using staged installation
checking whether to compile the server... yes
checking whether to compile the client... no
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking whether time.h and sys/time.h may both be included... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking return type of signal handlers... void
checking for memset... yes
checking for mkdir... yes
checking for rmdir... yes
checking for select... yes
checking for socket... yes
checking for srandomdev... yes
checking for library containing crypt... none required
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking for socklen_t... yes
checking for connect... yes
checking whether to enable IPv6... no
checking for dlopen in -ldl... yes
checking openssl/rsa.h usability... no
checking openssl/rsa.h presence... no
checking for openssl/rsa.h... no
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking whether threads are desired... yes
checking for working threads support... checking build system type... x86_64-apple-darwin19.0.0
checking host system type... x86_64-apple-darwin19.0.0
checking if compiler needs -Werror to reject unknown flags... yes
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for PTHREAD_PRIO_INHERIT... yes
yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/client/cxx/Makefile
config.status: creating src/config.h
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RSserver.c -o RSserver.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c Rserv.c -o Rserv.o
Rserv.c:2994:6: warning: unused variable 'type' [-Wunused-variable]
        int type = 0;
            ^
Rserv.c:3350:8: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
                        if (i < plen) {
                            ^
Rserv.c:3268:22: note: initialize the variable 'i' to silence this warning
                        size_t plen = 0, i;
                                          ^
                                           = 0
Rserv.c:360:13: warning: unused variable 'authkey' [-Wunused-variable]
static char authkey[1024];  /* server-side authentication key */
            ^
Rserv.c:361:12: warning: unused variable 'authkey_req' [-Wunused-variable]
static int authkey_req = 0; /* number of auth requests */
           ^
Rserv.c:592:12: warning: unused function 'fork_http' [-Wunused-function]
static int fork_http(args_t *arg) {
           ^
Rserv.c:608:12: warning: unused function 'fork_https' [-Wunused-function]
static int fork_https(args_t *arg) {
           ^
Rserv.c:624:12: warning: unused function 'fork_ws' [-Wunused-function]
static int fork_ws(args_t *arg) {
           ^
Rserv.c:670:13: warning: unused function 'generate_addr' [-Wunused-function]
static void generate_addr(rsmsg_addr_t *addr) {
            ^
Rserv.c:699:28: warning: unused variable 'NaStringRepresentation' [-Wunused-const-variable]
static const unsigned char NaStringRepresentation[2] = { 255, 0 };
                           ^
9 warnings generated.
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c base64.c -o base64.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c http.c -o http.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c ioc.c -o ioc.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c md5.c -o md5.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c oc.c -o oc.o
oc.c:127:10: warning: unused variable 'res' [-Wunused-variable]
    SEXP res;
         ^
1 warning generated.
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c qap_decode.c -o qap_decode.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c qap_encode.c -o qap_encode.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c rsio.c -o rsio.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c session.c -o session.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c sha1.c -o sha1.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c standalone.c -o standalone.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c tls.c -o tls.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c ulog.c -o ulog.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c utils.c -o utils.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c websockets.c -o websockets.o
In file included from websockets.c:8:
./rserr.h:20:13: warning: unused function 'RSEprintf' [-Wunused-function]
static void RSEprintf(const char *format, ...) {
            ^
1 warning generated.
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c winembed.c -o winembed.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 Rserve.so RSserver.o Rserv.o base64.o http.o ioc.o md5.o oc.o qap_decode.o qap_encode.o rsio.o session.o sha1.o standalone.o tls.o ulog.o utils.o websockets.o winembed.o -ldl -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
clang -DSTANDALONE_RSERVE -DDAEMON -I. -Iinclude -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -Wall -g -O2  -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -o Rserve standalone.c md5.c session.c qap_decode.c qap_encode.c sha1.c base64.c websockets.c RSserver.c tls.c http.c oc.c rsio.c ulog.c ioc.c utils.c -ldl    -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation -ldl  
In file included from standalone.c:6:
./Rserv.c:2994:6: warning: unused variable 'type' [-Wunused-variable]
        int type = 0;
            ^
./Rserv.c:3350:8: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
                        if (i < plen) {
                            ^
./Rserv.c:3268:22: note: initialize the variable 'i' to silence this warning
                        size_t plen = 0, i;
                                          ^
                                           = 0
./Rserv.c:670:13: warning: unused function 'generate_addr' [-Wunused-function]
static void generate_addr(rsmsg_addr_t *addr) {
            ^
3 warnings generated.
In file included from websockets.c:8:
./rserr.h:20:13: warning: unused function 'RSEprintf' [-Wunused-function]
static void RSEprintf(const char *format, ...) {
            ^
1 warning generated.
oc.c:127:10: warning: unused variable 'res' [-Wunused-variable]
    SEXP res;
         ^
1 warning generated.
clang -DSTANDALONE_RSERVE -DRSERV_DEBUG -DNODAEMON -I. -Iinclude -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -o Rserve.dbg standalone.c md5.c session.c qap_decode.c qap_encode.c sha1.c base64.c websockets.c RSserver.c tls.c http.c oc.c rsio.c ulog.c ioc.c utils.c -ldl    -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation -ldl  
In file included from standalone.c:6:
./Rserv.c:2994:6: warning: unused variable 'type' [-Wunused-variable]
        int type = 0;
            ^
./Rserv.c:3350:8: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
                        if (i < plen) {
                            ^
./Rserv.c:3268:22: note: initialize the variable 'i' to silence this warning
                        size_t plen = 0, i;
                                          ^
                                           = 0
./Rserv.c:670:13: warning: unused function 'generate_addr' [-Wunused-function]
static void generate_addr(rsmsg_addr_t *addr) {
            ^
3 warnings generated.
In file included from websockets.c:8:
./rserr.h:20:13: warning: unused function 'RSEprintf' [-Wunused-function]
static void RSEprintf(const char *format, ...) {
            ^
1 warning generated.
oc.c:127:10: warning: unused variable 'res' [-Wunused-variable]
    SEXP res;
         ^
1 warning generated.
./mergefat Rserve "/Library/Frameworks/R.framework/Resources/bin/Rserve"
./mergefat Rserve.dbg "/Library/Frameworks/R.framework/Resources/bin/Rserve.dbg"
make -C proxy 'CC=clang' 'CPPFLAGS=-I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread' CFLAGS='-Wall -g -O2   -D_THREAD_SAFE -pthread' 'LIBS=-ldl  ' && cp -p proxy/forward .
ln -sfn ../ulog.h ulog.h
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o forward.o forward.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o http.o http.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o http_tools.o http_tools.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o server.o server.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o tls.o tls.c
ln -sfn ../md5.h md5.h
ln -sfn ../sha1.h sha1.h
ln -sfn ../base64.c base64.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o websockets.o websockets.c
ln -sfn ../md5.c md5.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o md5.o md5.c
ln -sfn ../sha1.c sha1.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o sha1.o sha1.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o base64.o base64.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o date.o date.c
ln -sfn ../ulog.c ulog.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o ulog.o ulog.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o chandler.o chandler.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread -I.. -DFORKED -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DRSERVE_PKG -I. -Iinclude   -D_THREAD_SAFE -pthread  -c -o rscript.o rscript.c
clang -Wall -g -O2   -D_THREAD_SAFE -pthread  -o forward forward.o http.o http_tools.o server.o tls.o websockets.o md5.o sha1.o base64.o date.o ulog.o chandler.o rscript.o -ldl   -lssl
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Users/jackylam/Library/R/3.6/library/Rserve’
Warning in install.packages :
  installation of package ‘/Users/jackylam/Downloads/Rserve_1.8-6.tar.gz’ had non-zero exit status

I am using gcc 9.0.2 that I downloaded using homebrew. It seems like there is some interference with XCode but I'm not too sure how to troubleshoot this.

gordonwoodhull commented 4 years ago

MacOS doesn't have libssl installed by default.

I recently went through this. I installed openssl with homebrew and I created ~/.R/Makevars (not a great practice, but I was just trying to get stuff working)

CPPFLAGS=-I/usr/local/opt/openssl/include
PKG_LIBS=-lssl  -lcrypto -ldl -L/usr/local/opt/openssl/lib

I can't remember if I had to do anything else.

dselivanov commented 4 years ago

@s-u I believe configure script has some difficulties identifying openssl on Catalina, so PKG_LIBSis not generated properly. I remember that I haven't had any issues on Mojave (just had LDFLAGS += -L/usr/local/opt/openssl/lib in my ~/.R/Makevars).

Also seems setting PKG_LIBS in ~/.R/Makevars is not a good option since it should be set in a pkg.

PS configure from openssl pkg successfully detects OpenSSL installation

s-u commented 4 years ago

@dselivanov It is generated properly if you have working libssl. Catalina has removed OpenSSL from the system and also all dev files. I would not recommend using Homebrew, mixing HB with native libraries creates a very explosive mix that usually breaks. You can use the system LibreSSL, but you have to use full paths in LIBS because Apple is now disabling search in system /usr/lib and the SDK doesn't include it (c.f. the setup in PKI).

Note that the correct way is to use use either CPPFLAGS/LIBS or PKG_CPPFLAGS/PKG_LIBS with R CMD INSTALL. Do not modify Makevars - that is a really bad idea as it affects compilations of all code in R and causes a lot of issues when your forget to remove it after updates etc.

All in all, the user has to decide what to do on Catalina - I would recommend using static openssl build since that won't conflict with anything (NB that's what nginx does). The other alternative is to get the headers from Apple and use full paths in LIBS which then uses the system libraries.

s-u commented 4 years ago

BTW: openssl package doesn't use the system library, it will download and install a private copy - I find its approach very controversial since it does a lot of things you may not even know - and it will link against a homebrew installation which I don' find safe for reasons explained above. If you use homebrew, you should use R from homebrew and no special setup is needed, but you cannot use CRAN packages.

dselivanov commented 4 years ago

@s-u Thanks for the suggestions, I've successfully linked to a static openssl (just downloaded 1.1.1 and followed instructions ).

Do not modify Makevars - that is a really bad idea as it affects compilations of all code in R and causes a lot of issues when your forget to remove it after updates etc.

that's understandable...

All in all, the user has to decide what to do on Catalina

Regretting a lot after upgrade =(