rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.66k stars 1.09k forks source link

getpeereid - not found #9600

Closed johebll closed 3 years ago

johebll commented 3 years ago

Hello,

possibly related to: "getpeereid - not found #5185"

System details

RStudio Edition : Server
RStudio Version : current master-branch; rstudio-1.4.1717
OS Version      : CentOS Linux release 7.8.2003 (Core)
R Version       : 4.1.0

Steps to reproduce the problem

1) Download source 2) Satisfy dependencies by eecuting the relevant scripts under /dependencies 3) cmake

Describe the problem in detail

cmake fails with the following messages:

  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configured to build GWT
-- Using ant: /usr/bin/ant
-- Configured to install GWT
-- Machine architecture: x86_64
-- CMake build type: Release
fatal: Not a git repository (or any of the parent directories): .git
-- Using RStudio tools root: /opt/rstudio-tools/x86_64
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Found Boost: /usr/include/boost169/ (found suitable exact version "1.69.0")  
-- Using RStudio-provided Boost 1.69.0
-- No Crashpad libraries found under /opt/rstudio-tools/x86_64/crashpad/crashpad/out/Default/obj. Crashpad integration disabled.
-- SOCI libraries found under /usr/lib
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k")  
-- Performing Test HAVE_SCANDIR_POSIX
-- Performing Test HAVE_SCANDIR_POSIX - Success
-- Looking for SA_NOCLDWAIT
-- Looking for SA_NOCLDWAIT - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for inotify_init1
-- Looking for inotify_init1 - found
-- Looking for getpeereid
-- Looking for getpeereid - not found
-- Looking for setresuid
-- Looking for setresuid - found
-- Performing Test PAM_MESSAGE_CONST
-- Performing Test PAM_MESSAGE_CONST - Success
-- Found PAM: /usr/lib64/libpam.so;/usr/lib64/libdl.so
-- Configured to build SERVER
-- Found LibR: /opt/R/4.1.0  
-- Found R: /opt/R/4.1.0
-- Configuring incomplete, errors occurred!

The related cmake error log:

CMakeError.log
Determining if the function getpeereid exists failed with the following output:
Change Dir: /root/R-Studio-Server/rstudio-server-source_rstudio-1.4.1717/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_ac280/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_ac280.dir/build.make CMakeFiles/cmTC_ac280.dir/build
gmake[1]: Entering directory `/root/R-Studio-Server/rstudio-server-source_rstudio-1.4.1717/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ac280.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=getpeereid -fPIE   -o CMakeFiles/cmTC_ac280.dir/CheckFunctionExists.c.o   -c /usr/share/cmake3/Modules/CheckFunctionExists.c
Linking C executable cmTC_ac280
/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_ac280.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=getpeereid   -pie -Wl,-z,relro,-z,now  CMakeFiles/cmTC_ac280.dir/CheckFunctionExists.c.o  -o cmTC_ac280 
CMakeFiles/cmTC_ac280.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `getpeereid'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_ac280] Error 1
gmake[1]: Leaving directory `/root/R-Studio-Server/rstudio-server-source_rstudio-1.4.1717/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_ac280/fast] Error 2

It looks like a problem internal to the code?

Describe the behavior you expected

cmake should complete.

kevinushey commented 3 years ago
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5

Your compiler is probably too old to compile RStudio. We use EPEL + a newer gcc on CentOS 7 to get builds running.

johebll commented 3 years ago

Hello Kevin, thank you very much for offering help! I just doublechecked, but unfortunately my "4.8.5-44.el7" is the latest and greatest EPEL has to offer :-( Update doesn't find any news. That fairly well is in line with the upstream standard: "RHEL7 : gcc 4.8.x".

Today i tested to compile "Rserver 1.3.1093-0" as a "workaround", on the same system, but is get stuck with the exact same error:

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: Not a git repository (or any of the parent directories): .git
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Found Boost: /opt/rstudio-tools/x86_64/boost/boost_1_69_0/include (found suitable version "1.69.0", minimum required is "1.69.0")  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Boost: /opt/rstudio-tools/x86_64/boost/boost_1_69_0/include (found suitable version "1.69.0", minimum required is "1.69.0") found components: atomic chrono date_time filesystem iostreams program_options random regex system thread 
-- Using Boost.Signals version 2
-- No Crashpad libraries found under /opt/rstudio-tools/crashpad/crashpad/out/Default/obj. Crashpad integration disabled.
-- Performing Test HAVE_SCANDIR_POSIX
-- Performing Test HAVE_SCANDIR_POSIX - Success
-- Looking for SA_NOCLDWAIT
-- Looking for SA_NOCLDWAIT - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for inotify_init1
-- Looking for inotify_init1 - found
-- Looking for getpeereid
-- Looking for getpeereid - not found
-- Looking for setresuid
-- Looking for setresuid - found
-- Performing Test PAM_MESSAGE_CONST
-- Performing Test PAM_MESSAGE_CONST - Success
-- Found PAM: /usr/lib64/libpam.so;/usr/lib64/libdl.so
-- Configured to build SERVER
-- Found LibR: /opt/R/4.1.0/lib/R  
-- Found R: /opt/R/4.1.0/lib/R
CMake Error at cpp/session/CMakeLists.txt:23 (message):
  Dictionaries not found (re-run install-dependencies script to install)

And this is the related errorlog:

Run Build Command(s):/usr/bin/gmake cmTC_62510/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_62510.dir/build.make CMakeFiles/cmTC_62510.dir/build
gmake[1]: Entering directory `/root/DOWNLOADS/R-Studio-Server/rstudio-server-source_rstudio-1.3.1093-0-gaee4453_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_62510.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=getpeereid -fPIE   -o CMakeFiles/cmTC_62510.dir/CheckFunctionExists.c.o   -c /usr/share/cmake3/Modules/CheckFunctionExists.c
Linking C executable cmTC_62510
/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_62510.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=getpeereid   -pie -Wl,-z,relro,-z,now  CMakeFiles/cmTC_62510.dir/CheckFunctionExists.c.o  -o cmTC_62510 
CMakeFiles/cmTC_62510.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `getpeereid'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_62510] Error 1
gmake[1]: Leaving directory `/root/DOWNLOADS/R-Studio-Server/rstudio-server-source_rstudio-1.3.1093-0-gaee4453_build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_62510/fast] Error 2

It seems like this is not a very specific message? Would it help to bump up the debug level? If i'd knew how, i'd try that...

Best, and thank you again

johebll commented 3 years ago

Hello Kevin, just realised that you apparently use gcc outside of the repo. Which gcc version do you have good experiences with so far? I'd try it then with that as a minimal level... Thank you again, Best

johebll commented 3 years ago

Hello Kevin, you've been right: using

I'll try that now also for the 1.4 release. Thank you very much for your help! Best