clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
523 stars 29 forks source link

Mis-configuration: R-extras / R RPM / Rstudio cpp flags & LD_LIBRARY_PATH #2105

Open fhirworx opened 4 years ago

fhirworx commented 4 years ago

Clean install of CL Desktop, swupd install of R-Rstudio bundle does not work as expected. I've attempted various workarounds but always land back at some flavor of the below error:

 [rdesktop] ERROR system error 2 (No such file or directory) [path=/usr/lib64/R/rstudio/bin/resources/stylesheets/rstudio-gnome-light.qss]; OCCURRED AT: rstudio::core::Error rstudio::core::FilePath::open_r(boost::shared_ptr<std::basic_istream<char> >*) const /builddir/build/BUILD/rstudio-1.2.5042/src/cpp/core/FilePath.cpp:1107; LOGGED FROM: void rstudio::desktop::applyDesktopTheme(QWidget*, bool) /builddir/build/BUILD/rstudio-1.2.5042/src/cpp/desktop/DesktopUtils.cpp:149
ld: mode elf_x86_64
attempt to open /usr/x86_64-generic-linux/lib64/libzlib.so failed
attempt to open /usr/x86_64-generic-linux/lib64/libzlib.a failed
attempt to open /usr/lib64/libzlib.so failed
attempt to open /usr/lib64/libzlib.a failed
attempt to open /usr/lib32/libzlib.so failed
attempt to open /usr/lib32/libzlib.a failed
attempt to open /usr/lib/libzlib.so failed
attempt to open /usr/lib/libzlib.a failed
attempt to open /usr/x86_64-generic-linux/lib/libzlib.so failed
attempt to open /usr/x86_64-generic-linux/lib/libzlib.a failed
ld: cannot find -lzlib
attempt to open /usr/x86_64-generic-linux/lib64/libzlib.so failed
attempt to open /usr/x86_64-generic-linux/lib64/zlib.a failed
attempt to open /usr/lib64/libzlib.so failed
attempt to open /usr/lib64/zlib.a failed
attempt to open /usr/lib32/libzlib.so failed
attempt to open /usr/lib32/zlib.a failed
attempt to open /usr/lib/libzlib.so failed
attempt to open /usr/lib/zlib.a failed
attempt to open /usr/x86_64-generic-linux/lib/libzlib.so failed
attempt to open /usr/x86_64-generic-linux/lib/zlib.a failed

Setting PATH as a workaround, or using Renviron customized creates different issues to troubleshoot. Similar happens if using jupyter, or manual install of Zeppelin. I'm at a loss to figure out what IDE can be used in ClearOS to code in R, if the Rstudio issue is not addressible at this time. But, basically using the swupd bundle of R and trying to use an IDE, I end up violating some FHS / creating other problems.

lebensterben commented 4 years ago

I don't have this issue. try r-studio-server for now

fhirworx commented 4 years ago

Thank you; I'll try that instead. Below was how I worked around. In-progress debug here.

I'm trying to get hadoop/hdfs/yarn/spark/zeppelin all to play nice and keep hitting the R issue. All points back to the issue with the linker.

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
loading site script './config.site'
loading build-specific script './config.site'
checking for pwd... /usr/bin/pwd
checking whether builddir is srcdir... yes
checking whether ln -s works... yes
checking for gcc-ar... gcc-ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for sed... /usr/bin/sed
checking for which... /usr/bin/which
checking for less... /usr/bin/less
checking for gtar... no
checking for gnutar... no
checking for tar... /usr/bin/tar
checking for tex... /usr/bin/tex
checking for pdftex... /usr/bin/pdftex
checking for pdflatex... /usr/bin/pdflatex
checking for makeindex... /usr/bin/makeindex
checking for texi2any... /usr/bin/texi2any
checking whether texi2any version is at least 5.1... yes
checking for ginstall-info... no
checking for install-info... /usr/bin/install-info
checking for texi2dvi... /usr/bin/texi2dvi
checking for kpsewhich... /usr/bin/kpsewhich
checking for latex inconsolata package... found zi4.sty
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for gzip... /usr/bin/gzip
checking for bzip2... /usr/bin/bzip2
checking for firefox... /usr/bin/firefox
using default browser ... /usr/bin/firefox
checking for acroread... no
checking for acroread4... no
checking for xdg-open... /usr/bin/xdg-open
checking for working aclocal... found
checking for working autoconf... found
checking for working autoheader... found
checking for bison... bison -y
checking for notangle... false
checking for realpath... /usr/bin/realpath
checking for pkg-config... /usr/bin/pkg-config
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... 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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to run the C preprocessor... gcc -E
looking for a modern Fortran compiler
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fvisibility-inlines-hidden -Wl,--enable-new-dtags  can compile C++ code... yes
checking how to run the C++ preprocessor... g++ -E
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc accepts -fvisibility... yes
checking whether g++ accepts -fvisibility... yes
checking whether gfortran accepts -fvisibility... yes
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... no
checking whether gcc accepts -g... no
checking whether g++ can compile ObjC++... no
checking whether  can compile ObjC++... no
checking for Objective C++ compiler... no working ObjC++ compiler found
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... gcc-nm
checking the name lister (gcc-nm) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... gcc-ranlib
checking for gawk... gawk
checking command to parse gcc-nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for cos in -lm... yes
checking for sin in -lm... yes
checking for dlopen in -ldl... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for rl_callback_read_char in -lreadline... yes
checking for history_truncate_file... yes
checking for tilde_expand_word... yes
checking whether rl_callback_sigcleanup exists and is declared... yes
checking whether rl_completion_matches exists and is declared... yes
checking whether rl_resize_terminal exists and is declared... yes
checking whether rl_sort_completion_matches exists and is declared... yes
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for dlfcn.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking for strings.h... (cached) yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking features.h usability... yes
checking features.h presence... yes
checking for features.h... yes
checking floatingpoint.h usability... no
checking floatingpoint.h presence... no
checking for floatingpoint.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking stdalign.h usability... yes
checking stdalign.h presence... yes
checking for stdalign.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking for GNU C library with version >= 2... yes
checking return type of signal handlers... void
checking for uint64_t... yes
checking for int64_t... yes
checking for int_fast64_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether SIZE_MAX is declared... yes
checking for blkcnt_t... yes
checking for type of socket length... socklen_t *
checking for stack_t... yes
checking for intptr_t... yes
checking for uintptr_t... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking for inline... inline
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of double... 8
checking size of size_t... 8
checking for C stack direction... down
checking size of long double... 16
checking whether we can compute C Make dependencies... yes, using $(CC) -MM
checking whether gcc supports -c -o FILE.lo... yes
checking for gcc option to support OpenMP... -fopenmp
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran...  -L/usr/local/lib64 -L/usr/lib64/gcc/x86_64-generic-linux/10 -L/usr/lib64/gcc/x86_64-generic-linux/10/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-generic-linux/10/../../.. -lgfortran -lm -lquadmath
checking how to get verbose linking output from gcc... -v
checking for C libraries of gcc...  -L/usr/local/lib64 -L/usr/lib64/gcc/x86_64-generic-linux/10 -L/usr/lib64/gcc/x86_64-generic-linux/10/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-generic-linux/10/../../.. -lgcc_s
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking whether gfortran appends underscores to external names... yes
checking whether gfortran appends extra underscores to external names... no
checking whether mixed C/Fortran code can be run... yes
checking whether gfortran and gcc agree on int and double... yes
checking whether gfortran and gcc agree on double complex... yes
checking for gfortran option to support OpenMP... -fopenmp
checking whether g++ accepts -M for generating dependencies... yes
checking whether we can compute ObjC Make dependencies... no
checking if need -fno-optimize-sibling-calls for gfortran... yes
checking for type of 'hidden' Fortran character lengths... size_t
checking for xmkmf... no
checking whether g++  supports C++11 features with -std=gnu++11... yes
checking whether g++  supports C++14 features with -std=gnu++14... yes
checking whether g++  supports C++17 features with -std=gnu++17... yes
checking whether g++  supports C++20 features with -std=gnu++20... yes
checking for g++ -std=gnu++11 option to support OpenMP... -fopenmp
checking for option providing pthread_kill... none required
checking whether POSIX threads are supported... yes
checking for off_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking whether alloca is declared... yes
checking whether expm1 exists and is declared... yes
checking whether hypot exists and is declared... yes
checking whether log1p exists and is declared... yes
checking whether log1pl exists and is declared... yes
checking whether log2 exists and is declared... yes
checking whether log10 exists and is declared... yes
checking whether nearbyint exists and is declared... yes
checking whether nearbyintl exists and is declared... yes
checking whether powl exists and is declared... yes
checking whether rintl exists and is declared... yes
checking whether va_copy exists and is declared... yes
checking for isblank... yes
checking sunmath.h usability... no
checking sunmath.h presence... no
checking for sunmath.h... no
checking for cospi in -lsunmath... no
checking for atanpi... no
checking for atan2pi... no
checking for cospi... no
checking for exp10... yes
checking for pown... no
checking for sinpi... no
checking for tanpi... no
checking for __cospi... no
checking for __sinpi... no
checking for __tanpi... no
checking for fseeko... yes
checking for ftello... yes
checking for matherr... no
checking whether fcntl exists and is declared... yes
checking whether getgrgid exists and is declared... yes
checking whether getpwuid exists and is declared... yes
checking whether kill exists and is declared... yes
checking whether sigaction exists and is declared... yes
checking whether sigaltstack exists and is declared... yes
checking whether sigemptyset exists and is declared... yes
checking whether fdopen exists and is declared... yes
checking whether popen exists and is declared... yes
checking whether getline exists and is declared... yes
checking whether select exists and is declared... yes
checking whether setenv exists and is declared... yes
checking whether unsetenv exists and is declared... yes
checking whether getrlimit exists and is declared... yes
checking whether setrlimit exists and is declared... yes
checking whether getrusage exists and is declared... yes
checking whether getpriority exists and is declared... yes
checking whether chmod exists and is declared... yes
checking whether mkfifo exists and is declared... yes
checking whether stat exists and is declared... yes
checking whether umask exists and is declared... yes
checking whether gettimeofday exists and is declared... yes
checking whether utimes exists and is declared... yes
checking whether times exists and is declared... yes
checking whether gmtime_r exists and is declared... yes
checking whether localtime_r exists and is declared... yes
checking whether nl_langinfo exists and is declared... yes
checking whether access exists and is declared... yes
checking whether chdir exists and is declared... yes
checking whether execv exists and is declared... yes
checking whether ftruncate exists and is declared... yes
checking whether getcwd exists and is declared... yes
checking whether geteuid exists and is declared... yes
checking whether getuid exists and is declared... yes
checking whether link exists and is declared... yes
checking whether readlink exists and is declared... yes
checking whether symlink exists and is declared... yes
checking whether sysconf exists and is declared... yes
checking whether sched_setaffinity exists and is declared... yes
checking whether sched_getaffinity exists and is declared... yes
checking whether utime exists and is declared... yes
checking whether utimensat exists and is declared... yes
checking for clock_gettime in -lrt... yes
checking whether clock_gettime exists and is declared... yes
checking whether timespec_get exists and is declared... yes
checking for putenv... yes
checking whether putenv is declared... yes
checking for vasprintf... yes
checking whether vasprintf is declared... yes
checking for mempcpy... yes
checking for realpath... yes
checking whether realpath is declared... yes
checking whether glob exists and is declared... yes
checking for dladdr... yes
checking for dlsym... yes
checking whether dladdr is declared... yes
checking whether dlsym is declared... yes
checking whether RTLD_DEFAULT is declared... yes
checking whether RTLD_NEXT is declared... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking whether thr_stksegment exists and is declared... no
checking for isnan... yes
checking whether isfinite is declared... yes
checking whether isnan is declared... yes
checking whether you have IEEE 754 floating-point arithmetic... yes
checking whether putenv("FOO") can unset an environment variable... yes
checking whether putenv("FOO=") can unset an environment variable... no
checking for nl_langinfo and CODESET... yes
checking for mkdtemp... yes
checking for strdup... yes
checking for strncasecmp... yes
checking whether mkdtemp is declared... yes
checking whether strdup is declared... yes
checking whether strncasecmp is declared... yes
checking for library containing connect... none required
checking for library containing gethostbyname... none required
checking for library containing xdr_string... none required
checking for working calloc... yes
checking for working isfinite... yes
checking for working log1p... yes
checking whether ftell works correctly on files opened for append... yes
checking for working sigaction... yes
checking whether mktime sets errno... no
checking whether mktime works correctly outside 1902-2037... yes
checking complex.h usability... yes
checking complex.h presence... yes
checking for complex.h... yes
checking for double complex... yes
checking whether C99 double complex is supported... yes
checking whether cabs exists and is declared... yes
checking whether carg exists and is declared... yes
checking whether cexp exists and is declared... yes
checking whether clog exists and is declared... yes
checking whether csqrt exists and is declared... yes
checking whether cpow exists and is declared... yes
checking whether ccos exists and is declared... yes
checking whether csin exists and is declared... yes
checking whether ctan exists and is declared... yes
checking whether cacos exists and is declared... yes
checking whether casin exists and is declared... yes
checking whether catan exists and is declared... yes
checking whether ccosh exists and is declared... yes
checking whether csinh exists and is declared... yes
checking whether ctanh exists and is declared... yes
checking for working ctanh... yes
checking whether 'struct tm' includes tm_zone... yes
checking whether 'struct tm' includes tm_gmtoff... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv... yes
checking whether iconv accepts "UTF-8", "latin1", "ASCII" and "UCS-*"... yes
checking whether iconv accepts "CP1252"... yes
checking for iconvlist... no
checking for iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking whether mbrtowc exists and is declared... yes
checking whether wcrtomb exists and is declared... yes
checking whether wcscoll exists and is declared... yes
checking whether wcsftime exists and is declared... yes
checking whether wcstod exists and is declared... yes
checking whether mbstowcs exists and is declared... yes
checking whether wcstombs exists and is declared... yes
checking whether wctrans exists and is declared... yes
checking whether iswblank exists and is declared... yes
checking whether wctype exists and is declared... yes
checking whether iswctype exists and is declared... yes
checking for wctrans_t... yes
checking for mbstate_t... yes
checking for ICU... yes
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking X11/Intrinsic.h usability... yes
checking X11/Intrinsic.h presence... yes
checking for X11/Intrinsic.h... yes
checking for XtToolkitInitialize in -lXt... yes
using X11 ... yes
checking for KeySym... yes
checking X11/Xmu/Atoms.h usability... yes
checking X11/Xmu/Atoms.h presence... yes
checking for X11/Xmu/Atoms.h... yes
checking for XmuInternAtom in -lXmu... yes
checking whether pkg-config knows about cairo and pango... yes
checking whether cairo including pango is >= 1.2 and works... yes
checking for tclConfig.sh... no
checking for tclConfig.sh in library (sub)directories... /usr/lib64/tclConfig.sh
checking for tkConfig.sh... no
checking for tkConfig.sh in library (sub)directories... /usr/lib64/tkConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking tk.h usability... yes
checking tk.h presence... yes
checking for tk.h... yes
checking whether compiling/linking Tcl/Tk code works... yes
checking for BSD networking... yes
checking rpc/types.h usability... yes
checking rpc/types.h presence... yes
checking for rpc/types.h... yes
checking for rpc/xdr.h... yes
checking for XDR support... yes
checking for inflateInit2_ in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking if zlib version >= 1.2.5... yes
checking whether zlib support suffices... yes
checking mmap support for zlib... yes
checking for BZ2_bzlibVersion in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking if bzip2 version >= 1.0.6... yes
checking whether bzip2 support suffices... yes
checking for lzma_version_number in -llzma... yes
checking lzma.h usability... yes
checking lzma.h presence... yes
checking for lzma.h... yes
checking if lzma version >= 5.0.3... yes
checking pcre2.h usability... yes
checking pcre2.h presence... yes
checking for pcre2.h... yes
checking for pcre2_compile_8 in -lpcre2-8... yes
checking if PCRE2 has Unicode support... yes
checking whether PCRE support suffices... yes
checking for curl-config... /usr/bin/curl-config
checking libcurl version ... 7.71.1
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0... 
checking if libcurl supports https... yes
checking if jpeglib version >= 6b... yes
checking for jpeg_destroy_compress in -ljpeg... yes
checking if libpng version >= 1.2.7... yes
checking for png_create_write_struct in -lpng... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFOpen in -ltiff... yes
checking whether leap seconds are treated according to POSIX... yes
checking for inline... inline
checking for sys/time.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for struct stat.st_atim.tv_nsec... yes
checking whether struct stat.st_atim is of type struct timespec... yes
checking for setitimer... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether KERN_USRSTACK sysctl is supported... no
checking for visible __lib_stack_end... yes
checking for lpr... lpr
checking for paperconf... false
checking for Fortran flag to compile .f90 files... none
checking for Fortran flag to compile .f95 files... none
checking for gfortran option to support OpenMP... (cached) -fopenmp
checking for recommended packages... yes
checking whether NLS is requested... yes

Configuring src/extra/intl directory
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether we are using the GNU C Library 2 or newer... yes
checking for ranlib... (cached) gcc-ranlib
checking for simple visibility declarations... yes
checking for stdint.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether integer division by zero raises SIGFPE... yes
checking for inttypes.h... yes
checking for unsigned long long int... yes
checking for inttypes.h... (cached) yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by gcc... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking whether imported symbols can be declared weak... yes
checking for multithread API to use... none
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking for inttypes.h... (cached) yes
checking for limits.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... (cached) yes
checking for munmap... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strdup... (cached) yes
checking for strtoul... yes
checking for tsearch... yes
checking for argz_count... yes
checking for argz_stringify... yes
checking for argz_next... yes
checking for __fsetlocking... yes
checking whether feof_unlocked is declared... yes
checking whether fgets_unlocked is declared... yes
checking for iconv... (cached) yes
checking for iconv declaration... (cached) 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for NL_LOCALE_NAME macro... yes
checking for bison... bison
checking version of bison... 3.7.1, ok
checking for long long int... yes
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for intmax_t... yes
checking whether printf() supports POSIX/XSI format strings... yes
checking whether we are using the GNU C Library 2.1 or newer... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for stdint.h... (cached) yes
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for ptrdiff_t... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... yes
checking for fwprintf... yes
checking for putenv... (cached) yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for wcslen... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether getc_unlocked is declared... yes
checking for nl_langinfo and CODESET... (cached) yes
checking for LC_MESSAGES... yes
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
Finished configuring src/extra/intl directory

checking whether OpenMP SIMD reduction is supported... yes
using as R_SHELL for scripts ... /bin/sh
configure: creating ./config.status
config.status: creating Makeconf
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/html/Makefile
config.status: creating doc/manual/Makefile
config.status: creating etc/Makefile
config.status: creating etc/Makeconf
config.status: creating etc/Renviron
config.status: creating etc/javaconf
config.status: creating etc/ldpaths
config.status: creating m4/Makefile
config.status: creating po/Makefile
config.status: creating share/Makefile
config.status: creating src/Makefile
config.status: creating src/appl/Makefile
config.status: creating src/extra/Makefile
config.status: creating src/extra/blas/Makefile
config.status: creating src/extra/intl/Makefile
config.status: creating src/extra/tre/Makefile
config.status: creating src/extra/tzone/Makefile
config.status: creating src/extra/xdr/Makefile
config.status: creating src/include/Makefile
config.status: creating src/include/Rmath.h0
config.status: creating src/include/R_ext/Makefile
config.status: creating src/library/Recommended/Makefile
config.status: creating src/library/Makefile
config.status: creating src/library/base/DESCRIPTION
config.status: creating src/library/base/Makefile
config.status: creating src/library/compiler/DESCRIPTION
config.status: creating src/library/compiler/Makefile
config.status: creating src/library/datasets/DESCRIPTION
config.status: creating src/library/datasets/Makefile
config.status: creating src/library/graphics/DESCRIPTION
config.status: creating src/library/graphics/Makefile
config.status: creating src/library/graphics/src/Makefile
config.status: creating src/library/grDevices/DESCRIPTION
config.status: creating src/library/grDevices/Makefile
config.status: creating src/library/grDevices/src/Makefile
config.status: creating src/library/grDevices/src/cairo/Makefile
config.status: creating src/library/grid/DESCRIPTION
config.status: creating src/library/grid/Makefile
config.status: creating src/library/grid/src/Makefile
config.status: creating src/library/methods/DESCRIPTION
config.status: creating src/library/methods/Makefile
config.status: creating src/library/methods/src/Makefile
config.status: creating src/library/parallel/DESCRIPTION
config.status: creating src/library/parallel/Makefile
config.status: creating src/library/parallel/src/Makefile
config.status: creating src/library/profile/Makefile
config.status: creating src/library/stats/DESCRIPTION
config.status: creating src/library/stats/Makefile
config.status: creating src/library/stats/src/Makefile
config.status: creating src/library/stats4/DESCRIPTION
config.status: creating src/library/stats4/Makefile
config.status: creating src/library/splines/DESCRIPTION
config.status: creating src/library/splines/Makefile
config.status: creating src/library/splines/src/Makefile
config.status: creating src/library/tcltk/DESCRIPTION
config.status: creating src/library/tcltk/Makefile
config.status: creating src/library/tcltk/src/Makefile
config.status: creating src/library/tools/DESCRIPTION
config.status: creating src/library/tools/Makefile
config.status: creating src/library/tools/src/Makefile
config.status: creating src/library/translations/DESCRIPTION
config.status: creating src/library/translations/Makefile
config.status: creating src/library/utils/DESCRIPTION
config.status: creating src/library/utils/Makefile
config.status: creating src/library/utils/src/Makefile
config.status: creating src/main/Makefile
config.status: creating src/modules/Makefile
config.status: creating src/modules/X11/Makefile
config.status: creating src/modules/internet/Makefile
config.status: creating src/modules/lapack/Makefile
config.status: creating src/nmath/Makefile
config.status: creating src/nmath/standalone/Makefile
config.status: creating src/scripts/Makefile
config.status: creating src/scripts/R.sh
config.status: creating src/scripts/Rcmd
config.status: creating src/scripts/javareconf
config.status: creating src/scripts/mkinstalldirs
config.status: creating src/scripts/pager
config.status: creating src/scripts/rtags
config.status: creating src/unix/Makefile
config.status: creating tests/Makefile
config.status: creating tests/Embedding/Makefile
config.status: creating tests/Examples/Makefile
config.status: creating tools/Makefile
config.status: creating src/include/config.h
config.status: executing libtool commands
config.status: executing stamp-h commands

R is now configured for x86_64-pc-linux-gnu

Source directory: . Installation directory: /opt/R

  C compiler:                  gcc  -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries
  Fortran fixed-form compiler: gfortran -fno-optimize-sibling-calls -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize -Wl,--enable-new-dtags -Wa,-mbranches-within-32B-boundaries 

  Default C++ compiler:        g++ -std=gnu++11  -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fvisibility-inlines-hidden -Wl,--enable-new-dtags 
  C++14 compiler:              g++ -std=gnu++14  -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fvisibility-inlines-hidden -Wl,--enable-new-dtags 
  C++17 compiler:              g++ -std=gnu++17  -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fvisibility-inlines-hidden -Wl,--enable-new-dtags 
  C++20 compiler:              g++ -std=gnu++20  -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fvisibility-inlines-hidden -Wl,--enable-new-dtags 
  Fortran free-form compiler:  gfortran -fno-optimize-sibling-calls -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize -Wl,-sort-common -Wl,--enable-new-dtags 

Obj-C compiler:

Interfaces supported: X11, tcltk External libraries: pcre2, readline, curl Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU Options enabled: shared BLAS, R profiling

Capabilities skipped:
Options not enabled: memory profiling

Recommended packages: yes

lebensterben commented 4 years ago

@kriscdev I've tried again on my side and cannot reproduce the error. What I understand now is you have a clean install of CL Desktop and only R-basic and R-studio bundle, right?

How to reproduce the error mentioned in your original post?

PS.Multi-line code section should be enclosed with three back-ticks ( instead of one).

fhirworx commented 4 years ago

I don't have this issue. try r-studio-server for now

It looks like the CMAKE install prefix is a possible culprit. Is there ever any such thing as "/usr/local/lib" anywhere in Clear Linux? I haven't found that to be the case, but could be doing something ignorant. The linker flag is wrong, as when compiling anything the "-L/usr/local/lib" doesn't exist, and GCC throws "cannot find profile".

To reproduce, in the rstudio GUI -> click connections -> try to add a Spark connection -> Shiny will attempt to load -> Rstudio throws and error -> logs show "cannot find * in /x/bin/y" and locate "y" shows the valid path is /x/y/ (no bin).

Either way, each time I can troubleshoot and fix an LD_LIBRARY_PATH issue with Java and/or Hadoop, something else pops up with R. Below is an excerpt of what comes bundled/packaged. Anything Java-based in rstudio (and/or rstudio-server) using the bundles will force Rstudio to throw an error eventually. Sometimes I can get to a Spark connection, but never run something.

This is from the docs included in R source code:

**CMAKE_INSTALL_PREFIX  Defaults:
                           Linux (Desktop):     /usr/local/lib/rstudio 
                           Linux (Server):      /usr/local/lib/rstudio-server**

_and from config.site after clear OS install and using swupd to install R-rstudio[-server]_

## The appropriate 'lib' dir, normally 'lib', but 'lib64' on Linux on
## x86_64, mips64, ppc64, sparc64, s390x but not ia64 (except Debian
## and derivatives).
## LIBnn=

## Path ('-L'), and any other miscellaneous options for the linker.
## '-L' options set here will be prepended to LD_LIBRARY_PATH (or its
## system equivalent) at run time.
## If unset defaults to '-L/usr/local/lib', with '-L/sw/lib' prepended
## on macOS systems using Fink with root '/sw'.
## On some Linux 64-bit systems its default is -L/usr/local/lib64.
## If LIBnn is set it defaults to -L/usr/local/$LIBnn.
## LDFLAGS=
lebensterben commented 4 years ago

To reproduce, in the rstudio GUI -> click connections -> try to add a Spark connection -> Shiny will attempt to load -> Rstudio throws and error -> logs show "cannot find * in /x/bin/y" and locate "y" shows the valid path is /x/y/ (no bin).

I cannot re-produce this error.

Below is the output:

> shiny::runGadget(sparklyr::connection_spark_shinyapp(), viewer = .rs.embeddedViewer)
Loading required package: shiny

Listening on http://127.0.0.1:4783
> library(sparklyr)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> spark_install(version = "2.4.3", hadoop_version = "2.7")
Installing Spark 2.4.3 for Hadoop 2.7 or later.
Downloading from:
- 'https://archive.apache.org/dist/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz'
Installing to:
- '~/spark/spark-2.4.3-bin-hadoop2.7'
trying URL 'https://archive.apache.org/dist/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz'
Content type 'application/x-gzip' length 229988313 bytes (219.3 MB)
==================================================
downloaded 219.3 MB

Installation complete.
> sc <- spark_connect(master = "local")
* Using Spark: 2.4.3
fhirworx commented 4 years ago

Thanks for the quick response, would you mind sharing output of declare -p

lebensterben commented 4 years ago

@kriscdev Below is a subset of the output

declare -x AR="gcc-ar"
declare -x CC="gcc"
declare -x CFFLAGS="-g -O3 -feliminate-unused-debug-types  -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wl,--copy-dt-needed-entries -m64  -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize  -ftree-loop-vectorize "
declare -x CFLAGS="-g -O3 -feliminate-unused-debug-types  -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,--copy-dt-needed-entries -m64  -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize "
declare -x CXX="g++"
declare -x CXXFLAGS="-g -O3 -feliminate-unused-debug-types  -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,--copy-dt-needed-entries -m64  -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize  -fvisibility-inlines-hidden "
declare -x ENV="/usr/share/modules/init/profile.sh"
declare -x FCFLAGS="-g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize -ftree-loop-vectorize -Wl,-sort-common -Wl,--enable-new-dtags "
declare -x FFLAGS="-g -O3 -feliminate-unused-debug-types  -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wl,--copy-dt-needed-entries -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -malign-data=abi -fno-semantic-interposition -ftree-vectorize  -ftree-loop-vectorize "
declare -x GLPATH="/usr/lib64"
declare -x GROFF_NO_SGR="1"
declare -x LA_INCLUDE="/usr/include"
declare -x LA_LIBS="/usr/lib64/libopenblas.so.0"
declare -x LA_PATH="/usr/lib64/"
declare -x LA_VERSION="OpenBLAS"
declare -x MESA_GLSL_CACHE_DISABLE="0"
declare -x MODULEPATH="/usr/share/modules/modulefiles"
declare -x MODULEPATH_modshare="/usr/share/modules/modulefiles:1"
declare -x MODULESHOME="/usr/share/modules"
declare -x MODULES_CMD="/usr/libexec/modulecmd.tcl"
declare -x MPI_CC="/usr/bin/mpicc"
declare -x MPI_INCLUDE="/usr/include/"
declare -x MPI_LIBS="/usr/lib64/libmpich.so"
declare -x MPI_PATH="/usr/lib64/"
declare -x MPI_VERSION="3.2"
declare -x NM="gcc-nm"
declare -x RANLIB="gcc-ranlib"
declare -x THEANO_FLAGS="floatX=float32,openmp=true,gcc.cxxflags=\"-ftree-vectorize -mavx\""
lebensterben commented 4 years ago

swupd search-file zlib.so gives the following:

Bundle R-extras [installed] (6878 MB on system)
        /usr/lib64/ruby/2.7.0/x86_64-linux-gnu/zlib.so
fhirworx commented 4 years ago

Thank you so much, yet again. I'll try again in my off-hours.

Here's what I got from R, starting from scratch again, rstudio-server did spin up fine:

> Sys.getenv()
CLICOLOR_FORCE          1
DISPLAY                 :0
EDITOR                  vi
GIT_ASKPASS             rpostback-askpass
HOME                    /home/krisc
LANG                    en_US.UTF-8
LD_LIBRARY_PATH         /usr/lib64/R/lib::/lib:/usr/local/lib64
LN_S                    ln -s
LOGNAME                 krisc
MAKE                    make
MPLENGINE               tkAgg
PAGER                   /usr/bin/less
PATH                    /usr/local/bin:/usr/bin
R_BROWSER               
R_BZIPCMD               /usr/bin/bzip2
R_DOC_DIR               /usr/lib64/R/doc
R_GZIPCMD               /usr/bin/gzip
R_HOME                  /usr/lib64/R
R_INCLUDE_DIR           /usr/lib64/R/include
R_LIBS_SITE             
R_LIBS_USER             ~/R/x86_64-generic-linux-gnu-library/4.0
R_PAPERSIZE             a4
R_PDFVIEWER             
R_PLATFORM              x86_64-generic-linux-gnu
R_PRINTCMD              
R_RD4PDF                times,inconsolata,hyper
R_SESSION_TMPDIR        /tmp/RtmpVCqkqq
R_SHARE_DIR             /usr/lib64/R/share
R_STRIP_SHARED_LIB      strip --strip-unneeded
R_STRIP_STATIC_LIB      strip --strip-debug
R_SYSTEM_ABI            linux,gcc,gxx,gfortran,gfortran
R_TEXI2DVICMD           /usr/bin/texi2dvi
R_UNZIPCMD              /usr/bin/unzip
R_ZIPCMD                /usr/bin/zip
RMARKDOWN_MATHJAX_PATH
                        /usr/lib64/R/rstudio-server/resources/mathjax-26
RS_RPOSTBACK_PATH       /usr/lib64/R/rstudio-server/bin/rpostback
RSTUDIO                 1
RSTUDIO_CONSOLE_COLOR   256
RSTUDIO_CONSOLE_WIDTH   80
RSTUDIO_PANDOC          /usr/lib64/R/rstudio-server/bin/pandoc
RSTUDIO_R_MODULE        
RSTUDIO_R_PRELAUNCH_SCRIPT
RSTUDIO_R_VERSION_LABEL                      
RSTUDIO_SESSION_STREAM
                        krisc-d
RSTUDIO_USER_IDENTITY   krisc
RSTUDIO_VERSION         99.9.9
RSTUDIO_WINUTILS        bin/winutils
SED                     /usr/bin/sed
SSH_ASKPASS             rpostback-askpass
TAR                     /usr/bin/tar
TERM                    xterm-256color
USER                    krisc

I may not be able to revisit until later in the week/weekend, but will troubleshoot and ensure I use the previous post first before posting anymore noise.

fhirworx commented 4 years ago

Summary

The Makeconf in the Rstudio packages suggets both the following are improperly configured/set: CPPFLAGS LD_LIBRARY_PATH

Above rests on the presence of usr/local/lib64 and checking for Fortran libraries of gfortran... -L/usr/local/lib64 during Rstudio configuration (as above). @lebensterben's workaround is fine to an extent. But, similar issues arise after trying to use R CMD javareconf. rJava R package and various other libraries needed to use an R interpreter for Spark/Yarn/HDFS setup require either using the aforementioned, or instead setting the needed environment variables. Otherwise, JNI throws an error. (light background here)

Details

Here's the Makeconf that comes with the bundle:

/usr/lib64/R/etc # cat Makeconf
# etc/Makeconf.  Generated from Makeconf.in by configure.
#https://stackoverflow.com/questions/29700460/what-is-the-difference-between-fprofile-use-and-fauto-profile
# ${R_HOME}/etc/Makeconf
#
# R was configured using the following call
# (not including env. vars and site configuration)
# configure  '--build=x86_64-generic-linux-gnu' '--host=x86_64-generic-linux-gnu' '--target=x86_64-clr-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/bin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-static' '--with-system-zlib' '--with-system-bzlib' '--with-system-pcre' '--with-system-xz' '--enable-BLAS-shlib' '--enable-R-shlib' '--with-blas=-lopenblas' '--with-cairo' '--enable-lto' '--disable-long-double' 'build_alias=x86_64-generic-linux-gnu' 'host_alias=x86_64-generic-linux-gnu' 'target_alias=x86_64-clr-linux-gnu' 'SHLIB_LDFLAGS=-g' 'SHLIB_CXXLDFLAGS=-g' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig' 'CC=gcc' 'CFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC' 'FCFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction ' 'CXX=g++' 'CXXFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction '

## This fails if it contains spaces, or if it is quoted
include $(R_SHARE_DIR)/make/vars.mk

AR = gcc-ar
BLAS_LIBS = -L"$(R_HOME)/lib$(R_ARCH)" -lRblas
C_VISIBILITY = -fvisibility=hidden
CC = gcc
CFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC $(LTO)
CPICFLAGS = -fpic
**CPPFLAGS = -I/usr/local/include**
CXX = g++ -std=gnu++11
## Not used by anything in R, in particular not for the .cc.d rule
## but used via R CMD config by several packages
CXXCPP = $(CXX) -E
CXXFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXXPICFLAGS = -fpic
CXX11 = g++
CXX11FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX11PICFLAGS = -fpic
CXX11STD = -std=gnu++11
CXX14 = g++
CXX14FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX14PICFLAGS = -fpic
CXX14STD = -std=gnu++14
CXX17 = g++
CXX17FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX17PICFLAGS = -fpic
CXX17STD = -std=gnu++17
CXX20 = g++
CXX20FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX20PICFLAGS = -fpic
CXX20STD = -std=gnu++20
CXX_VISIBILITY = -fvisibility=hidden
DYLIB_EXT = .so
DYLIB_LD = $(CC)
DYLIB_LDFLAGS = -g -shared -fopenmp $(CFLAGS) $(CPICFLAGS)
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
F_VISIBILITY = -fvisibility=hidden
## FC is the compiler used for all Fortran as from R 3.6.0
FC = gfortran
FCFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
FCLIBS_XTRA = 
FFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
FLIBS =  -lgfortran -lm -lquadmath
FPICFLAGS = -fpic
FOUNDATION_CPPFLAGS = 
FOUNDATION_LIBS = 
JAR = /opt/java/bin/jar
JAVA = /opt/java/bin/java
JAVAC = /opt/java/bin/javac
JAVAH = /opt/java/bin/javac -h
## JAVA_HOME might be used in the next three.  
## They are for packages 'JavaGD' and 'rJava'
JAVA_HOME = /opt/java
JAVA_CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JAVA_LIBS = -L$(JAVA_HOME)/lib/server -ljvm
JAVA_LD_LIBRARY_PATH = $(JAVA_HOME)/lib/server
LAPACK_LIBS = -L"$(R_HOME)/lib$(R_ARCH)" -lRlapack
**LDFLAGS = -L/usr/local/lib64**
## we only need this is if it is external, as otherwise link to R
LIBINTL= 
LIBM = -lm
LIBR0 = -L"$(R_HOME)/lib$(R_ARCH)"
LIBR1 = -lR
LIBR = -L"$(R_HOME)/lib$(R_ARCH)" -lR
LIBS =  -lpcre2-8 -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n
## needed by R CMD config
LIBnn = lib64
LIBTOOL = $(SHELL) "$(R_HOME)/bin/libtool"
LTO = -flto
## needed to build applications linking to static libR
MAIN_LD = $(CC)
MAIN_LDFLAGS = -Wl,--export-dynamic -fopenmp
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
MKINSTALLDIRS = "$(R_HOME)/bin/mkinstalldirs"
OBJC = 
OBJCFLAGS =  $(LTO)
OBJC_LIBS = 
OBJCXX = 
R_ARCH = 
RANLIB = gcc-ranlib
SAFE_FFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -msse2 -mfpmath=sse
SED = /usr/bin/sed
SHELL = /bin/sh
SHLIB_CFLAGS = 
SHLIB_CXXFLAGS = 
SHLIB_CXXLD = $(CXX)
SHLIB_CXXLDFLAGS = -g -shared
SHLIB_CXX11LD = $(CXX11) $(CXX11STD)
SHLIB_CXX11LDFLAGS = -g -shared
SHLIB_CXX14LD = $(CXX14) $(CXX14STD)
SHLIB_CXX14LDFLAGS = -g -shared
SHLIB_CXX17LD = $(CXX17) $(CXX17STD)
SHLIB_CXX17LDFLAGS = -g -shared
SHLIB_CXX20LD = $(CXX20) $(CXX20STD)
SHLIB_CXX20LDFLAGS = -g -shared
SHLIB_EXT = .so
SHLIB_FFLAGS = 
SHLIB_LD = $(CC)
SHLIB_LDFLAGS = -g -shared $(CFLAGS) $(CPICFLAGS)
SHLIB_LIBADD = 
## We want to ensure libR is picked up from $(R_HOME)/lib
## before e.g. /usr/local/lib if a version is already installed.
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FFLAGS = -fopenmp
STRIP_STATIC_LIB = strip --strip-debug
STRIP_SHARED_LIB = strip --strip-unneeded
TCLTK_CPPFLAGS = -I/usr/include -I/usr/include 
TCLTK_LIBS = -L/usr/lib64 -ltcl8.6 -L/usr/lib64 -ltk8.6 -lX11 -lXss -lXext
YACC = bison -y

## Legacy settings: these might be used in a src/Makefile
SHLIB_FCLD = $(FC)
SHLIB_FCLDFLAGS = -g -shared

## for linking to libR.a
STATIC_LIBR = # -Wl,--whole-archive "$(R_HOME)/lib$(R_ARCH)/libR.a" -Wl,--no-whole-archive $(BLAS_LIBS) $(FLIBS)  $(LIBINTL) -lreadline  $(LIBS)

## These are recorded as macros for legacy use in packages
## set on AIX, formerly for old glibc (-D__NO_MATH_INLINES)
R_XTRA_CFLAGS = 
##  was formerly set on HP-UX
R_XTRA_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG
## currently unset
R_XTRA_CXXFLAGS = 
## used for gfortran in R > 3.6.0
R_XTRA_FFLAGS = -fno-optimize-sibling-calls

## CXX98 is no longer supported, but packages may use it.
SHLIB_CXX98LD = @SHLIB_CXX98LD@
SHLIB_CXX98LDFLAGS = @SHLIB_CXX98LDFLAGS@

## SHLIB_CFLAGS SHLIB_CXXFLAGS SHLIB_FFLAGS are apparently currently unused
## SHLIB_CXXFLAGS is undocumented, there is no SHLIB_FCFLAGS
ALL_CFLAGS =  $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
ALL_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG $(PKG_CPPFLAGS) $(CLINK_CPPFLAGS) $(CPPFLAGS) 
ALL_CXXFLAGS =  $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
ALL_FFLAGS = -fno-optimize-sibling-calls $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
## can be overridden by R CMD SHLIB
P_FCFLAGS = $(PKG_FFLAGS)
ALL_FCFLAGS = -fno-optimize-sibling-calls $(P_FCFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FCFLAGS)
## LIBR here as a couple of packages use this without SHLIB_LINK
ALL_LIBS = $(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)# $(LIBINTL)

.SUFFIXES:
.SUFFIXES: .c .cc .cpp .d .f .f90 .f95 .m .mm .M .o

.c.o:
    $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
.c.d:
    @echo "making $@ from $<"
    @$(CC) -MM $(ALL_CPPFLAGS) $< > $@
.m.d:
    @echo > $@
.cc.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cpp.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cc.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.cpp.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.m.o:
    $(OBJC) $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -c $< -o $@
.mm.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.M.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.f.o:
    $(FC) $(ALL_FFLAGS) -c $< -o $@
## @FCFLAGS_f9x@ are flags needed to recognise the extensions
.f95.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@
.f90.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@

Because Java JDK 8+ deprecated JAVAH and instead native Java headers get generated via javac -h , but to run Hadoop/HDFS/Yarn/Spark with an R interpreter, requires rJava package from CRAN, setup needs `R CMD javareconf -e' and then following error appears:

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
gcc -I"/usr/lib64/R/include" -DNDEBUG -I/opt/java/include -I/opt/java/include/linux  -I/usr/local/include   -fpic  -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC -flto -c conftest.c -o conftest.o
conftest.c: In function ‘main’:
conftest.c:6:1: warning: ‘/var/tmp/pgo/#tmp#Rjavareconf.hRjTkC#conftest.gcda’ profile count data file not found [-Wmissing-profile]
    6 | }
      | ^

I cannot find much at all about above error, but this link describes -fprofile use. "var/tmp/pgo" comes up missing. I'm stuck here.

lebensterben commented 4 years ago

both rstudio and rstudio-server works on my side. I don't understand how the problem you saw is related to misconfiguration

fhirworx commented 4 years ago

Thank you for the quick response. What's the output when you run R CMD javareconf ?

lebensterben commented 4 years ago
❯ sudo R CMD javareconf
Password: 
Java interpreter : /usr/bin/java
Java version     : 1.8.0-u252
Java home path   : /usr/lib/jvm/java-1.8.0-openjdk/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -I"/usr/lib64/R/include" -DNDEBUG -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include/linux  -I/usr/local/include   -fpic  -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC -flto -c conftest.c -o conftest.o
conftest.c: In function ‘main’:
conftest.c:6:1: warning: ‘/var/tmp/pgo/#tmp#Rjavareconf.9xbMZY#conftest.gcda’ profile count data file not found [-Wmissing-profile]
    6 | }
      | ^
gcc -g -shared -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12 -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction -fPIC -flto -fpic -L/usr/lib64/R/lib -L/usr/local/lib64 -o conftest.so conftest.o -L/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server -ljvm -L/usr/lib64/R/lib -lR

JAVA_HOME        : /usr/lib/jvm/java-1.8.0-openjdk/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib64/R
Done.
fhirworx commented 4 years ago

Yes, that's the issue I cannot work around. Above confirms the CPP flag and LD Path is not set correctly. Below gets at verifying that assertion.

After fresh install, log reproduced below

2020/08/29 21:06:35 [DBG] No swupd override files in "/etc/swupd" to install to target
2020/08/29 21:06:35 [INF] Running post-install hooks
2020/08/29 21:06:35 [INF] Saving the installation results
2020/08/29 21:06:35 [DBG] telem-record-gen --severity 1 --class org.clearlinux/clr-installer/success --no-post --echo --event-id 86b1127f3f4ab3c63531d49bfd2c3e56 --payload version=2.7.0
targetMedia:
- name: vda
  path: /dev/vda
  majMin: "253:0"
  size: "68719476736"
  ro: "false"
  rm: "false"
  type: disk
  children:
  - name: vda1
    fstype: vfat
    uuid: 0C80-3CC3
    mountpoint: /boot
    label: boot
    size: "157286400"
    ro: "false"
    rm: "false"
    type: part
  - name: vda2
    fstype: ext4
    uuid: 96794e72-c80f-4d2b-962d-f28ea2a49105
    mountpoint: /
    label: root
    size: "68562190336"
    ro: "false"
    rm: "false"
    type: part
keyboard: us
language: en_US.UTF-8
bundles: [c-basic, desktop-autostart, git, openssh-server, os-core, os-core-update,
  vim, NetworkManager, user-basic, python3-basic, machine-learning-basic, java-basic,
  dev-utils, R-extras, telemetrics, sysadmin-basic, tzdata]
userBundles: [user-basic, python3-basic, machine-learning-basic, java-basic, dev-utils,
  R-extras]
telemetry: true
timezone: America/New_York
kernel: kernel-native
autoUpdate: true
copyNetwork: true
copySwupd: true
keepImage: true
preCheckDone: true
legacyBios: true
swapFileSize: 64MiB
hypervisor: kvm

2020/08/29 21:06:35 [DBG] sync user is PKEXEC_UID=#1000
2020/08/29 21:06:35 [DBG] Gnome Proxy Mode: none
2020/08/29 21:06:35 [DBG] [Previous line repeated 4 times]
2020/08/29 21:06:35 [DBG] cmd.Env: []
2020/08/29 21:06:35 [INF] Saving Installation results

Then, checking the configs under R as follows:

krisc@msr/usr/lib64/R/etc $ ls
javaconf  ldpaths  Makeconf  Renviron  repositories
krisc@msr/usr/lib64/R/etc $ cat ldpaths
: ${JAVA_HOME=}
: ${R_JAVA_LD_LIBRARY_PATH=}
if test -n "/usr/local/lib64"; then
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib:/usr/local/lib64}
else
: ${R_LD_LIBRARY_PATH=${R_HOME}/lib}
fi
if test -n "${R_JAVA_LD_LIBRARY_PATH}"; then
  R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${R_JAVA_LD_LIBRARY_PATH}"
fi
## This is DYLD_FALLBACK_LIBRARY_PATH on Darwin (macOS) and
## LD_LIBRARY_PATH elsewhere.
## However, on macOS >=10.11 (if SIP is enabled, the default), the
## environment value will not be passed to a script such as R.sh, so
## would not seen here.
if test -z "${LD_LIBRARY_PATH}"; then
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
else
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
fi
export LD_LIBRARY_PATH

and...

krisc@msr/usr/lib64/R/etc $ cat Makeconf
# etc/Makeconf.  Generated from Makeconf.in by configure.
#
# ${R_HOME}/etc/Makeconf
#
# R was configured using the following call
# (not including env. vars and site configuration)
# configure  '--build=x86_64-generic-linux-gnu' '--host=x86_64-generic-linux-gnu' '--target=x86_64-clr-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/bin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-static' '--with-system-zlib' '--with-system-bzlib' '--with-system-pcre' '--with-system-xz' '--enable-BLAS-shlib' '--enable-R-shlib' '--with-blas=-lopenblas' '--with-cairo' '--enable-lto' '--disable-long-double' 'build_alias=x86_64-generic-linux-gnu' 'host_alias=x86_64-generic-linux-gnu' 'target_alias=x86_64-clr-linux-gnu' 'SHLIB_LDFLAGS=-g' 'SHLIB_CXXLDFLAGS=-g' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig' 'CC=gcc' 'CFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC' 'FCFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction ' 'CXX=g++' 'CXXFLAGS=-O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction '

## This fails if it contains spaces, or if it is quoted
include $(R_SHARE_DIR)/make/vars.mk

AR = gcc-ar
BLAS_LIBS = -L"$(R_HOME)/lib$(R_ARCH)" -lRblas
C_VISIBILITY = -fvisibility=hidden
CC = gcc
CFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC $(LTO)
CPICFLAGS = -fpic
CPPFLAGS = -I/usr/local/include
CXX = g++ -std=gnu++11
## Not used by anything in R, in particular not for the .cc.d rule
## but used via R CMD config by several packages
CXXCPP = $(CXX) -E
CXXFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXXPICFLAGS = -fpic
CXX11 = g++
CXX11FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX11PICFLAGS = -fpic
CXX11STD = -std=gnu++11
CXX14 = g++
CXX14FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX14PICFLAGS = -fpic
CXX14STD = -std=gnu++14
CXX17 = g++
CXX17FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX17PICFLAGS = -fpic
CXX17STD = -std=gnu++17
CXX20 = g++
CXX20FLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
CXX20PICFLAGS = -fpic
CXX20STD = -std=gnu++20
CXX_VISIBILITY = -fvisibility=hidden
DYLIB_EXT = .so
DYLIB_LD = $(CC)
DYLIB_LDFLAGS = -g -shared -fopenmp $(CFLAGS) $(CPICFLAGS)
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
F_VISIBILITY = -fvisibility=hidden
## FC is the compiler used for all Fortran as from R 3.6.0
FC = gfortran
FCFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
FCLIBS_XTRA = 
FFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  $(LTO)
FLIBS =  -lgfortran -lm -lquadmath
FPICFLAGS = -fpic
FOUNDATION_CPPFLAGS = 
FOUNDATION_LIBS = 
JAR = 
JAVA = 
JAVAC = 
JAVAH = 
## JAVA_HOME might be used in the next three.  
## They are for packages 'JavaGD' and 'rJava'
JAVA_HOME = 
JAVA_CPPFLAGS = 
JAVA_LIBS = 
JAVA_LD_LIBRARY_PATH = 
LAPACK_LIBS = -L"$(R_HOME)/lib$(R_ARCH)" -lRlapack
LDFLAGS = -L/usr/local/lib64
## we only need this is if it is external, as otherwise link to R
LIBINTL= 
LIBM = -lm
LIBR0 = -L"$(R_HOME)/lib$(R_ARCH)"
LIBR1 = -lR
LIBR = -L"$(R_HOME)/lib$(R_ARCH)" -lR
LIBS =  -lpcre2-8 -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n
## needed by R CMD config
LIBnn = lib64
LIBTOOL = $(SHELL) "$(R_HOME)/bin/libtool"
LTO = -flto
## needed to build applications linking to static libR
MAIN_LD = $(CC)
MAIN_LDFLAGS = -Wl,--export-dynamic -fopenmp
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
MKINSTALLDIRS = "$(R_HOME)/bin/mkinstalldirs"
OBJC = 
OBJCFLAGS =  $(LTO)
OBJC_LIBS = 
OBJCXX = 
R_ARCH = 
RANLIB = gcc-ranlib
SAFE_FFLAGS = -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -msse2 -mfpmath=sse
SED = /usr/bin/sed
SHELL = /bin/sh
SHLIB_CFLAGS = 
SHLIB_CXXFLAGS = 
SHLIB_CXXLD = $(CXX)
SHLIB_CXXLDFLAGS = -g -shared
SHLIB_CXX11LD = $(CXX11) $(CXX11STD)
SHLIB_CXX11LDFLAGS = -g -shared
SHLIB_CXX14LD = $(CXX14) $(CXX14STD)
SHLIB_CXX14LDFLAGS = -g -shared
SHLIB_CXX17LD = $(CXX17) $(CXX17STD)
SHLIB_CXX17LDFLAGS = -g -shared
SHLIB_CXX20LD = $(CXX20) $(CXX20STD)
SHLIB_CXX20LDFLAGS = -g -shared
SHLIB_EXT = .so
SHLIB_FFLAGS = 
SHLIB_LD = $(CC)
SHLIB_LDFLAGS = -g -shared $(CFLAGS) $(CPICFLAGS)
SHLIB_LIBADD = 
## We want to ensure libR is picked up from $(R_HOME)/lib
## before e.g. /usr/local/lib if a version is already installed.
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FFLAGS = -fopenmp
STRIP_STATIC_LIB = strip --strip-debug
STRIP_SHARED_LIB = strip --strip-unneeded
TCLTK_CPPFLAGS = -I/usr/include -I/usr/include 
TCLTK_LIBS = -L/usr/lib64 -ltcl8.6 -L/usr/lib64 -ltk8.6 -lX11 -lXss -lXext
YACC = bison -y

## Legacy settings: these might be used in a src/Makefile
SHLIB_FCLD = $(FC)
SHLIB_FCLDFLAGS = -g -shared

## for linking to libR.a
STATIC_LIBR = # -Wl,--whole-archive "$(R_HOME)/lib$(R_ARCH)/libR.a" -Wl,--no-whole-archive $(BLAS_LIBS) $(FLIBS)  $(LIBINTL) -lreadline  $(LIBS)

## These are recorded as macros for legacy use in packages
## set on AIX, formerly for old glibc (-D__NO_MATH_INLINES)
R_XTRA_CFLAGS = 
##  was formerly set on HP-UX
R_XTRA_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG
## currently unset
R_XTRA_CXXFLAGS = 
## used for gfortran in R > 3.6.0
R_XTRA_FFLAGS = -fno-optimize-sibling-calls

## CXX98 is no longer supported, but packages may use it.
SHLIB_CXX98LD = @SHLIB_CXX98LD@
SHLIB_CXX98LDFLAGS = @SHLIB_CXX98LDFLAGS@

## SHLIB_CFLAGS SHLIB_CXXFLAGS SHLIB_FFLAGS are apparently currently unused
## SHLIB_CXXFLAGS is undocumented, there is no SHLIB_FCFLAGS
ALL_CFLAGS =  $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
ALL_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG $(PKG_CPPFLAGS) $(CLINK_CPPFLAGS) $(CPPFLAGS) 
ALL_CXXFLAGS =  $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
ALL_FFLAGS = -fno-optimize-sibling-calls $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
## can be overridden by R CMD SHLIB
P_FCFLAGS = $(PKG_FFLAGS)
ALL_FCFLAGS = -fno-optimize-sibling-calls $(P_FCFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FCFLAGS)
## LIBR here as a couple of packages use this without SHLIB_LINK
ALL_LIBS = $(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)# $(LIBINTL)

.SUFFIXES:
.SUFFIXES: .c .cc .cpp .d .f .f90 .f95 .m .mm .M .o

.c.o:
    $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
.c.d:
    @echo "making $@ from $<"
    @$(CC) -MM $(ALL_CPPFLAGS) $< > $@
.m.d:
    @echo > $@
.cc.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cpp.o:
    $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cc.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.cpp.d:
    @echo "making $@ from $<"
    @$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.m.o:
    $(OBJC) $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -c $< -o $@
.mm.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.M.o:
    $(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.f.o:
    $(FC) $(ALL_FFLAGS) -c $< -o $@
## @FCFLAGS_f9x@ are flags needed to recognise the extensions
.f95.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@
.f90.o:
    $(FC) $(ALL_FCFLAGS) -c  $< -o $@

Next, running the required R CMD javareconf

krisc@msr/usr/lib64/R/etc $ R CMD javareconf -e
Java interpreter : /usr/bin/java
Java version     : 1.8.0-u252
Java home path   : /usr/lib/jvm/java-1.8.0-openjdk/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -I"/usr/lib64/R/include" -DNDEBUG -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include/linux  -I/usr/local/include   -fpic  -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC -flto -c conftest.c -o conftest.o
conftest.c: In function ‘main’:
conftest.c:6:1: warning: ‘/var/tmp/pgo/#tmp#Rjavareconf.F3V4VA#conftest.gcda’ profile count data file not found [-Wmissing-profile]
    6 | }
      | ^
gcc -g -shared -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12 -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction -fPIC -flto -fpic -L/usr/lib64/R/lib -L/usr/local/lib64 -o conftest.so conftest.o -L/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server -ljvm -L/usr/lib64/R/lib -lR

The following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Running: /bin/bash

and going to install rJava

krisc@msr/usr/lib64/R/etc $ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.8.0-u252
Java home path   : /usr/lib/jvm/java-1.8.0-openjdk/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -I"/usr/lib64/R/include" -DNDEBUG -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include/linux  -I/usr/local/include   -fpic  -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12  -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction  -fPIC -flto -c conftest.c -o conftest.o
conftest.c: In function ‘main’:
conftest.c:6:1: warning: ‘/var/tmp/pgo/#tmp#Rjavareconf.Rldgp7#conftest.gcda’ profile count data file not found [-Wmissing-profile]
    6 | }
      | ^
gcc -g -shared -O2 -g -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -Wl,-z,now,-z,relro,-z,max-page-size=0x1000,-z,separate-code -Wno-error -ftree-vectorize -ftree-slp-vectorize -Wl,--enable-new-dtags -fcf-protection=return -Wl,--build-id=sha1 -Wa,-mbranches-within-32B-boundaries -m64 -march=westmere -mtune=haswell -fasynchronous-unwind-tables -fno-omit-frame-pointer -Wp,-D_REENTRANT -O3 -falign-functions=32 -fno-semantic-interposition -flto=12 -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction -fPIC -flto -fpic -L/usr/lib64/R/lib -L/usr/local/lib64 -o conftest.so conftest.o -L/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server -ljvm -L/usr/lib64/R/lib -lR

JAVA_HOME        : /usr/lib/jvm/java-1.8.0-openjdk/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib64/R
Done.

krisc@msr/usr/lib64/R/etc $ sudo Rscript -e "install.packages(c('rJava'), repos='https://cloud.r-project.org/')"
trying URL 'https://cloud.r-project.org/src/contrib/rJava_0.9-13.tar.gz'
Content type 'application/x-gzip' length 664898 bytes (649 KB)
==================================================
downloaded 649 KB

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -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... 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 for string.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 an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver    : '/usr/bin/jar'
compiler    : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags   : '-I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include -I/usr/lib/jvm/java-1.8.0-openjdk/jre/../include/linux'
java libs   : '-L/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... yes
checking whether -Xrs is supported... yes
checking whether -Xrs will be used... yes
checking whether JVM will be loaded dynamically... no
checking whether JNI programs can be compiled... yes
checking whether JNI programs run... yes
checking JNI data types... ok
checking whether JRI should be compiled (autodetect)... yes
checking whether debugging output should be enabled... no
checking whether memory profiling is desired... no
checking whether threads support is requested... no
checking whether callbacks support is requested... no
checking whether JNI cache support is requested... no
checking whether headless init is enabled... no
checking whether JRI is requested... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
=== configuring in jri (/tmp/RtmpftItAZ/R.INSTALL318862609a32/rJava/jri)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -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... yes
checking Java version... 1.8.0-u252
checking Java compatibility version (integer)... 8
checking whether /usr/bin/javah actually works... no
checking whether javah was replaced by javac -h... no
configure: error: one or more Java tools are missing.

*** JDK is incomplete! Please make sure you have a complete JDK. JRE is *not* sufficient.
configure: error: ./configure failed for jri
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/lib64/R/library/rJava’

The downloaded source packages are in
    ‘/tmp/Rtmpnw76zh/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages(c("rJava"), repos = "https://cloud.r-project.org/") :
  installation of package ‘rJava’ had non-zero exit status

So, without some workaround for the JNI / Headers issue, I remain puzzled at how one could successfully use spark with R, or get spark-submit to avoid throwing an error. The early posts from @lebensterben show it's possible to get spark installed, but I'm not sure sparklyr, etc., would function correctly, only install. Then, attempting to change configs with PATH/multiple LD_LIBRARY_PATHS gets into the errors mentioned up front in initial post here. The JVM has to load dynamically for spark to work, (confirm/reject/amend?)? And that doesn't seem possibly the way the R bundles setup out of the box, (confirm/reject/amend?)? And the basic tools for user configuration post bundle install won't fix it, correct?

lebensterben commented 4 years ago

Hi, I've fixed the issue with a workaround. But I now agree that this is mis-configured.

su
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk
R CMD javareconf
exit

Then you'd be able to install rJava. Note that you can set other path for JAVA_HOME.

fhirworx commented 4 years ago

Thanks much. That gets us there for inside Rstudio server, which was my initial goal.

Here's some background if @AthenasJimenez or @miguelinux are able to weigh in, as discussion of this item is loosely related.

The relevant excerpt from above link is: _"I didn't investigate why LD_LIBRARYPATH was needed, just observed that it was for rsession to start correctly. If rsession was built and shipped natively by Linux distributions, it'd probably have the right embedded linker path so the runtime path wouldn't be necessary."

Other R packages will continue to fail install or have issues if accessed by any IDE. For example, IRKernel is required by jupyter/zeppelin to interpret R. The compiler flag issue creates issues there, too. Even with my setup/configs (see here) , I can't get those to stay up and running. Working backwards, this mal-configured piece seems needing attention first.

But, for the broader ClearLinuxOS community, is it accurate to think that this probably makes lots with R slower than it should/needs to be? I.e., fixing the LD_LIBRARY_PATH issue would speed things up, since it wouldn't be pointing at / looking for a non-existent "/usr/local..."?

It creates havoc with anything related to jupyter, zeppelin, etc. etc...

lebensterben commented 4 years ago

I think we should patch those lines and either not checking java-1.8.0-openjdk or decrease its order of precedence. https://github.com/clearlinux/usrbinjava/blob/924d209803bcbab74ac780de5377aad45213187d/src/main.c#L50-L67

fhirworx commented 4 years ago

And update the R bundles to include the properly configured CMAKE prefix, too, yes?

fhirworx commented 3 years ago

I think we should patch those lines and either not checking java-1.8.0-openjdk or decrease its order of precedence. https://github.com/clearlinux/usrbinjava/blob/924d209803bcbab74ac780de5377aad45213187d/src/main.c#L50-L67

Any word about this -- I had moved focus to other learning opportunities, but it'd be great to have more stable means to leverage ClearLinxOS for use with the various use cases it used to support as "just working" (e.g., Apache Spark, etc.).