NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.73k forks source link

RStudio doesn't build anymore #172313

Closed turion closed 2 years ago

turion commented 2 years ago

See https://hydra.nixos.org/build/176099719. Log tail:

``` qtPreHook unpacking sources unpacking source archive /nix/store/78kqfbj786m0yxj3sh5j2br0969prpr4-source source root is source patching sources applying patch /nix/store/l04kvqr5gdlgh3imxpniq6r274c6q61w-r-location.patch patching file src/cpp/core/r_util/REnvironmentPosix.cpp applying patch /nix/store/a70nybb2ri1z3jv1c5i7x7g3383ji41z-clang-location.patch patching file src/cpp/core/libclang/LibClang.cpp applying patch /nix/store/vr4wcxlhlf2mz6dwl1cbchab14x5d0iv-system-node.patch patching file src/gwt/build.xml configuring Warning: unknown option '-d' * checking for file 'rsconnect/DESCRIPTION' ... OK * preparing 'rsconnect': * checking DESCRIPTION meta-information ... OK * excluding invalid files Subdirectory 'R' contains invalid file names: '.editorconfig' * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories Removed empty directory 'rsconnect/examples' Removed empty directory 'rsconnect/pkgdown' * building 'rsconnect_0.8.25.tar.gz' fixing cmake files... cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/share/doc/RStudio -DCMAKE_INSTALL_INFODIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/include -DCMAKE_INSTALL_SBINDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/bg35nfwn6zd616facdywiysgpprfvsji-gcc-wrapper-11.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/rs684lgm8k7akkgbisb49z4vpxxc2zns-binutils-2.38/bin/ranlib -DCMAKE_AR=/nix/store/rs684lgm8k7akkgbisb49z4vpxxc2zns-binutils-2.38/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717 -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release -DRSTUDIO_USE_SYSTEM_SOCI=ON -DRSTUDIO_USE_SYSTEM_BOOST=ON -DRSTUDIO_USE_SYSTEM_YAML_CPP=ON -DPANDOC_VERSION=2.17.1.1 -DCMAKE_INSTALL_PREFIX=/nix/store/ig99wwkh7ka6msd7fdhyl67yx4lz5q1n-RStudio-1.4.1717/lib/rstudio -DQT_QMAKE_EXECUTABLE=/nix/store/jvkkwa0sfyca1wpyvrgvpbsa34l0w60l-hook/bin/qmake -- The C compiler identification is GNU 11.3.0 -- The CXX compiler identification is GNU 11.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /nix/store/bg35nfwn6zd616facdywiysgpprfvsji-gcc-wrapper-11.3.0/bin/gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /nix/store/bg35nfwn6zd616facdywiysgpprfvsji-gcc-wrapper-11.3.0/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Machine architecture: x86_64 -- CMake build type: Release -- Using RStudio tools root: /opt/rstudio-tools/x86_64 -- Configured to build GWT -- Using ant: /nix/store/yl24cdsfxxm72m689kc1vsshb48lgc9z-ant-1.10.11/bin/ant -- Configured to install GWT -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Success -- Found Boost: /nix/store/1w5fsr9m28585fsbbppc8cc69x8cpi4v-boost-1.77.0-dev/lib/cmake/Boost-1.77.0/BoostConfig.cmake (found suitable version "1.77.0", minimum required is "1.69.0") -- Found Boost: /nix/store/1w5fsr9m28585fsbbppc8cc69x8cpi4v-boost-1.77.0-dev/lib/cmake/Boost-1.77.0/BoostConfig.cmake (found suitable version "1.77.0", minimum required is "1.69.0") found components: atomic chrono date_time filesystem iostreams program_options random regex system thread -- No Crashpad libraries found under /opt/rstudio-tools/x86_64/crashpad/crashpad/out/Default/obj. Crashpad integration disabled. -- SOCI libraries found under /nix/store/287wpc41n1lxixfx8mrrfvq168qi58pq-soci-4.0.2/lib -- Found OpenSSL: /nix/store/hkb5vrx22dbnpryalcl41240f83llvss-openssl-1.1.1o/lib/libcrypto.so (found version "1.1.1o") -- 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 -- Configured to build DESKTOP -- Found LibR: /nix/store/cs12xc2njghl2h3wnma9bmgv9pxpnqsa-R-4.1.3/lib/R -- Found R: /nix/store/cs12xc2njghl2h3wnma9bmgv9pxpnqsa-R-4.1.3/lib/R -- Found Qt: /nix/store/jvkkwa0sfyca1wpyvrgvpbsa34l0w60l-hook/bin/qmake -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: BUILD_TESTING CMAKE_EXPORT_NO_PACKAGE_REGISTRY CMAKE_INSTALL_BINDIR CMAKE_INSTALL_DOCDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_INFODIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_LIBEXECDIR CMAKE_INSTALL_LOCALEDIR CMAKE_INSTALL_MANDIR CMAKE_INSTALL_OLDINCLUDEDIR CMAKE_INSTALL_SBINDIR CMAKE_POLICY_DEFAULT_CMP0025 -- Build files have been written to: /build/source/build cmake: enabled parallel building building build flags: -j2 -l2 SHELL=/nix/store/07ln9bxp9k8nds669r24fsywf4d1jlly-bash-5.1-p16/bin/bash Buildfile: /build/source/src/gwt/build.xml ext: [jscomp] Compiling 62 file(s) with 93 extern(s) [jscomp] 0 error(s), 0 warning(s) javac: [mkdir] Created dir: /build/source/src/gwt/bin [javac] Compiling 3 source files to /build/source/src/gwt/bin [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Compiling 2446 source files to /build/source/src/gwt/bin [copy] Copying 1594 files to /build/source/src/gwt/bin gwtc: panmirror: [mkdir] Created dir: /build/source/src/gwt/www/js/panmirror [exec] node:internal/modules/cjs/loader:936 [exec] throw err; [exec] ^ [exec] [exec] Error: Cannot find module 'fuse-box/sparky' [exec] Require stack: [exec] - /build/source/src/gwt/panmirror/src/editor/fuse.js [exec] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) [exec] at Function.Module._load (node:internal/modules/cjs/loader:778:27) [exec] at Module.require (node:internal/modules/cjs/loader:1005:19) [exec] at require (node:internal/modules/cjs/helpers:102:18) [exec] at Object. (/build/source/src/gwt/panmirror/src/editor/fuse.js:16:27) [exec] at Module._compile (node:internal/modules/cjs/loader:1105:14) [exec] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) [exec] at Module.load (node:internal/modules/cjs/loader:981:32) [exec] at Function.Module._load (node:internal/modules/cjs/loader:822:12) [exec] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) { [exec] code: 'MODULE_NOT_FOUND', [exec] requireStack: [ '/build/source/src/gwt/panmirror/src/editor/fuse.js' ] [exec] } [exec] Result: 1 [java] Compiling module org.rstudio.studio.RStudio ```

I'm currently bisecting on x86_64-linux.

Notify maintainers

@ciil @cfhammill

turion commented 2 years ago

Bisecting is very hard because there are a lot of commits where even some dependencies don't build. I'm trying https://github.com/timokau/nix-bisect, but it has bugs.

damhiya commented 2 years ago

It seems mongodb has similar problem. [https://github.com/NixOS/nixpkgs/issues/171928]()

MrTarantoga commented 2 years ago

I have investigated the same problem during the change the branch from 21.11 to 22.05.

I assume the error is related to the new compiler version (gcc 11 and later) will not compile the rstudio version. I've tried myself to fix this error, but the R version that is linked to rstudio is also too new, this will have some errors during changed headers of the new R version.

The only solution would be to raise to the current rstudio version. I have prepared the update here. But currently I am not able to start rstudio correctly:

TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/xdg:/home/goetz/.nix-profile/etc/xdg:/etc/profiles/per-user/goetz/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg:/nix/store/15fs19rshpzj57hw130n76w0fqhmxpsm-gnome-settings-daemon-42.2/etc/xdg/rstudio/logging.conf'. Logging to '/home/goetz/.local/share/rstudio/log/rdesktop.log'. Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. 2022-06-08T12:12:40.894937Z [rdesktop] ERROR system error 2 (No such file or directory) [path: /nix/store/s1jjw29757y4ilsrkb0n1ylayfl9m52x-RStudio-2022.02.3+492/lib/rstudio/bin/resources/stylesheets/rstudio-gnome-light.qss]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream >&) const src/cpp/shared_core/FilePath.cpp:1461; LOGGED FROM: void rstudio::desktop::applyDesktopTheme(QWidget*, bool) src/cpp/desktop/DesktopUtils.cpp:176 2022-06-08T12:12:41.358884Z [rdesktop] ERROR system error 2 (No such file or directory) [path: /nix/store/s1jjw29757y4ilsrkb0n1ylayfl9m52x-RStudio-2022.02.3+492/lib/rstudio/bin/resources/html/error.html]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream >&) const src/cpp/shared_core/FilePath.cpp:1461; LOGGED FROM: void rstudio::desktop::SessionLauncher::showLaunchErrorPage() src/cpp/desktop/DesktopSessionLauncher.cpp:379 2022-06-08T12:12:41.359539Z [rdesktop] ERROR system error 2 (No such file or directory) [path: /nix/store/s1jjw29757y4ilsrkb0n1ylayfl9m52x-RStudio-2022.02.3+492/lib/rstudio/bin/resources/html/loading.html]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream >&) const src/cpp/shared_core/FilePath.cpp:1461; LOGGED FROM: void rstudio::desktop::MainWindow::onLoadFinished(bool) src/cpp/desktop/DesktopMainWindow.cpp:714 "Uncaught TypeError: Cannot read property 'notifyRCrashed' of undefined" 2022-06-08T12:12:41.364791Z [rdesktop] ERROR system error 2 (No such file or directory) [path: /nix/store/s1jjw29757y4ilsrkb0n1ylayfl9m52x-RStudio-2022.02.3+492/lib/rstudio/bin/resources/html/loading.html]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream >&) const src/cpp/shared_core/FilePath.cpp:1461; LOGGED FROM: void rstudio::desktop::MainWindow::onLoadFinished(bool) src/cpp/desktop/DesktopMainWindow.cpp:714 2022-06-08T12:12:41.574135Z [rdesktop] ERROR system error 2 (No such file or directory) [path: /nix/store/s1jjw29757y4ilsrkb0n1ylayfl9m52x-RStudio-2022.02.3+492/lib/rstudio/bin/resources/html/loading.html]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream >&) const src/cpp/shared_core/FilePath.cpp:1461; LOGGED FROM: void rstudio::desktop::MainWindow::onLoadFinished(bool) src/cpp/desktop/DesktopMainWindow.cpp:714

Maybe the maintainer can help me?

turion commented 2 years ago

Unfortunately I don't understand this error at all. Do you maybe have some old settings files around? Possibly, can you move away all RStudio settings in your home directory and try again?

turion commented 2 years ago

Either way, feel free to open a pull request with your change, and we can discuss there.

MrTarantoga commented 2 years ago

Unfortunately I don't understand this error at all. Do you maybe have some old settings files around? Possibly, can you move away all RStudio settings in your home directory and try again?

I solved the error already. It was not related to rstudio, more my fault. I struggled with the working of nix.

MrTarantoga commented 2 years ago

Either way, feel free to open a pull request with your change, and we can discuss there.

I created already a pull request. But I'm not sure if I have understand the way of backporting the changes correctly. As I understand, it is mandatory to create a pull request for master and create another one for backporting the changes to the current release.

turion commented 2 years ago

Ah, I think you mean this here: https://github.com/NixOS/nixpkgs/pull/177021 (Your link goes somewhere else) Great! Let's continue there.

alarsyo commented 2 years ago

This can be closed I think!