rstudio / rstudio

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

Unable to launch RStudio from terminal #9515

Closed taylorjtamu closed 2 years ago

taylorjtamu commented 3 years ago

System details

RStudio Edition : Desktop
RStudio Version :  1.4.1717
OS Version      :  Scientific Linux 7.9 
R Version       :  3.6.0

Steps to reproduce the problem

Install RStudio on the system with system packaged Qt 5.9 Attempt to run RStudio from the terminal

Describe the problem in detail

RStudio fails to launch from terminal, but does launch from GUI.

Upon attempting to launch from terminal it returns:

[jwtaylor@andersserver-02 ~]$ QT_DEBUG_PLUGINS=1 rstudio
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/bin/platforms" ...
Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/rstudio/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

[67841:67841:20210621,165114.799046:ERROR process_memory_range.cc:86] read out of range
[67841:67841:20210621,165114.799210:ERROR elf_image_reader.cc:558] missing nul-terminator
[67841:67842:20210621,165114.813597:ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)
Aborted (core dumped)

The relevant portion seems to be:

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/bin/platforms" ...
Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/rstudio/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

ldd /usr/lib/rstudio/plugins/platforms/libqxcb.so returns:

[jwtaylor@andersserver-02 ~]$ ldd /usr/lib/rstudio/plugins/platforms/libqxcb.so 
/usr/lib/rstudio/plugins/platforms/libqxcb.so: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/plugins/platforms/libqxcb.so)
    linux-vdso.so.1 =>  (0x00007ffdffbfd000)
    libQt5XcbQpa.so.5 => /usr/lib64/libQt5XcbQpa.so.5 (0x00007f9142a7c000)
    libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f914254e000)
    libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f914228f000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00007f9142079000)
    libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007f9141bc1000)
    libQt5DBus.so.5 => /usr/lib64/libQt5DBus.so.5 (0x00007f91429f5000)
    libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007f9141714000)
    libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f9141488000)
    libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f914126c000)
    libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f914106a000)
    libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f9140e42000)
    libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f9140c37000)
    libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f9140a25000)
    libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f91406e7000)
    libm.so.6 => /usr/lib64/libm.so.6 (0x00007f91403e5000)
    libxkbcommon-x11.so.0 => /usr/lib64/libxkbcommon-x11.so.0 (0x00007f91401dd000)
    libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007f913ff9d000)
    libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f913fd99000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f913fa91000)
    libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f913f87b000)
    libc.so.6 => /usr/lib64/libc.so.6 (0x00007f913f4ad000)
    libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f913f2ab000)
    libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f913ef95000)
    libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f913ed85000)
    libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f913eb7d000)
    libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f913e961000)
    libxcb-xkb.so.1 => /usr/lib64/libxcb-xkb.so.1 (0x00007f913e745000)
    libxcb-render-util.so.0 => /usr/lib64/libxcb-render-util.so.0 (0x00007f913e541000)
    libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007f913e333000)
    libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007f913e12c000)
    libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007f913df24000)
    libxcb-xinerama.so.0 => /usr/lib64/libxcb-xinerama.so.0 (0x00007f913dd21000)
    libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007f913db11000)
    libxcb-image.so.0 => /usr/lib64/libxcb-image.so.0 (0x00007f913d90c000)
    libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007f913d708000)
    libxcb-keysyms.so.1 => /usr/lib64/libxcb-keysyms.so.1 (0x00007f913d505000)
    libxcb-icccm.so.4 => /usr/lib64/libxcb-icccm.so.4 (0x00007f913d300000)
    libxcb-shape.so.0 => /usr/lib64/libxcb-shape.so.0 (0x00007f913d0fc000)
    libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f913ced2000)
    libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f913cccd000)
    libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f913cabd000)
    libpng15.so.15 => /usr/lib64/libpng15.so.15 (0x00007f913c892000)
    libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f913c5f4000)
    libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f913c3a4000)
    libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f913c173000)
    libicui18n.so.50 => /usr/lib64/libicui18n.so.50 (0x00007f913bd74000)
    libicuuc.so.50 => /usr/lib64/libicuuc.so.50 (0x00007f913b9fb000)
    libicudata.so.50 => /usr/lib64/libicudata.so.50 (0x00007f913a428000)
    libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007f913a1bc000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9142993000)
    libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007f9139f8a000)
    libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007f9139cd4000)
    libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f9139ad0000)
    libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f913986e000)
    libxcb-util.so.1 => /usr/lib64/libxcb-util.so.1 (0x00007f9139668000)
    libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f913943a000)
    libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f9139235000)
    librt.so.1 => /usr/lib64/librt.so.1 (0x00007f913902d000)
    libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007f9138e06000)
    liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f9138be0000)
    liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f91389d1000)
    libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x00007f9138750000)
    libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f913854b000)
    libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007f9138331000)
    libdw.so.1 => /usr/lib64/libdw.so.1 (0x00007f91380e0000)
    libattr.so.1 => /usr/lib64/libattr.so.1 (0x00007f9137edb000)
    libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007f9137cc3000)

From which this part seems directly relevant: /usr/lib/rstudio/plugins/platforms/libqxcb.so: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/plugins/platforms/libqxcb.so)

And ldd /bin/rstudio returns:

[jwtaylor@andersserver-02 ~]$ ldd /bin/rstudio 
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /bin/rstudio)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebEngine.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebEngineWidgets.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5QuickWidgets.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Sensors.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Svg.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5XmlPatterns.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebChannel.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Positioning.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Quick.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Qml.so.5)
    linux-vdso.so.1 =>  (0x00007f8f05fa0000)
    libQt5WebEngine.so.5 => /usr/lib/rstudio/lib/libQt5WebEngine.so.5 (0x00007f8f0557f000)
    libQt5WebEngineWidgets.so.5 => /usr/lib/rstudio/lib/libQt5WebEngineWidgets.so.5 (0x00007f8f05333000)
    libQt5PrintSupport.so.5 => /usr/lib64/libQt5PrintSupport.so.5 (0x00007f8f05f2d000)
    libQt5QuickWidgets.so.5 => /usr/lib/rstudio/lib/libQt5QuickWidgets.so.5 (0x00007f8f0511c000)
    libQt5Sensors.so.5 => /usr/lib/rstudio/lib/libQt5Sensors.so.5 (0x00007f8f04ed1000)
    libQt5Svg.so.5 => /usr/lib/rstudio/lib/libQt5Svg.so.5 (0x00007f8f04c71000)
    libQt5Xml.so.5 => /usr/lib64/libQt5Xml.so.5 (0x00007f8f05ef0000)
    libQt5XmlPatterns.so.5 => /usr/lib/rstudio/lib/libQt5XmlPatterns.so.5 (0x00007f8f04692000)
    libQt5DBus.so.5 => /usr/lib64/libQt5DBus.so.5 (0x00007f8f05e6a000)
    libQt5Sql.so.5 => /usr/lib64/libQt5Sql.so.5 (0x00007f8f05e25000)
    libQt5OpenGL.so.5 => /usr/lib64/libQt5OpenGL.so.5 (0x00007f8f05dca000)
    libicui18n.so.56 => /usr/lib/rstudio/lib/libicui18n.so.56 (0x00007f8f0418f000)
    libicuuc.so.56 => /usr/lib/rstudio/lib/libicuuc.so.56 (0x00007f8f03db1000)
    libicudata.so.56 => /usr/lib/rstudio/lib/libicudata.so.56 (0x00007f8f023cd000)
    libQt5WebEngineCore.so.5 => /usr/lib/rstudio/lib/libQt5WebEngineCore.so.5 (0x00007f8efb08e000)
    libQt5WebChannel.so.5 => /usr/lib/rstudio/lib/libQt5WebChannel.so.5 (0x00007f8efae6a000)
    libQt5Positioning.so.5 => /usr/lib/rstudio/lib/libQt5Positioning.so.5 (0x00007f8efabc7000)
    libQt5Quick.so.5 => /usr/lib/rstudio/lib/libQt5Quick.so.5 (0x00007f8efa4d1000)
    libQt5Qml.so.5 => /usr/lib/rstudio/lib/libQt5Qml.so.5 (0x00007f8ef9dee000)
    libQt5Network.so.5 => /usr/lib64/libQt5Network.so.5 (0x00007f8ef9c65000)
    libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5 (0x00007f8ef95fa000)
    libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007f8ef9142000)
    libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007f8ef8c95000)
    libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f8ef89e0000)
    libpq.so.5 => /usr/lib64/libpq.so.5 (0x00007f8ef87b1000)
    libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f8ef85ad000)
    libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f8ef8391000)
    libutil.so.1 => /usr/lib64/libutil.so.1 (0x00007f8ef818e000)
    libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007f8ef7f89000)
    librt.so.1 => /usr/lib64/librt.so.1 (0x00007f8ef7d81000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00007f8ef7b6b000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f8ef78f9000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f8ef7496000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f8ef718e000)
    libm.so.6 => /usr/lib64/libm.so.6 (0x00007f8ef6e8c000)
    libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f8ef6c76000)
    libc.so.6 => /usr/lib64/libc.so.6 (0x00007f8ef68a8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8f05d81000)
    libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f8ef661c000)
    libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007f8ef63cc000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00007f8ef61a4000)
    libnss3.so => /usr/lib64/libnss3.so (0x00007f8ef5e70000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f8ef5c40000)
    libplds4.so => /usr/lib64/libplds4.so (0x00007f8ef5a3c000)
    libplc4.so => /usr/lib64/libplc4.so (0x00007f8ef5837000)
    libnspr4.so => /usr/lib64/libnspr4.so (0x00007f8ef55f9000)
    libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f8ef53cf000)
    libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007f8ef51b5000)
    libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f8ef4ef6000)
    libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f8ef4cb4000)
    libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f8ef4976000)
    libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f8ef4774000)
    libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f8ef454c000)
    libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f8ef4349000)
    libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f8ef413e000)
    libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f8ef3f3b000)
    libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f8ef3d29000)
    libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f8ef3b23000)
    libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f8ef3913000)
    libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f8ef3708000)
    libXtst.so.6 => /usr/lib64/libXtst.so.6 (0x00007f8ef3502000)
    libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f8ef3202000)
    libpng15.so.15 => /usr/lib64/libpng15.so.15 (0x00007f8ef2fd7000)
    libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f8ef2d39000)
    libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007f8ef2b08000)
    libicui18n.so.50 => /usr/lib64/libicui18n.so.50 (0x00007f8ef2709000)
    libicuuc.so.50 => /usr/lib64/libicuuc.so.50 (0x00007f8ef2390000)
    libicudata.so.50 => /usr/lib64/libicudata.so.50 (0x00007f8ef0dbd000)
    libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007f8ef0b51000)
    libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f8ef094f000)
    libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f8ef0639000)
    libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f8ef0350000)
    libcom_err.so.2 => /usr/lib64/libcom_err.so.2 (0x00007f8ef014c000)
    libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f8eefeff000)
    libldap_r-2.4.so.2 => /usr/lib64/libldap_r-2.4.so.2 (0x00007f8eefca0000)
    libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f8eefa6d000)
    libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007f8eef83b000)
    libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007f8eef585000)
    libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007f8eef375000)
    libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f8eef171000)
    libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f8eeef43000)
    libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f8eeed3e000)
    libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007f8eeeb17000)
    liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f8eee8f1000)
    liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007f8eee6e2000)
    libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x00007f8eee461000)
    libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007f8eee25c000)
    libdw.so.1 => /usr/lib64/libdw.so.1 (0x00007f8eee00b000)
    libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f8eedda9000)
    libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f8eedb99000)
    libkeyutils.so.1 => /usr/lib64/libkeyutils.so.1 (0x00007f8eed995000)
    liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f8eed786000)
    libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007f8eed569000)
    libssl3.so => /usr/lib64/libssl3.so (0x00007f8eed30c000)
    libattr.so.1 => /usr/lib64/libattr.so.1 (0x00007f8eed107000)
    libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007f8eeceef000)
    libcrypt.so.1 => /usr/lib64/libcrypt.so.1 (0x00007f8eeccb8000)
    libfreebl3.so => /usr/lib64/libfreebl3.so (0x00007f8eecab5000)

From which this seems most relevant:

/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /bin/rstudio)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebEngine.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebEngineWidgets.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5QuickWidgets.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Sensors.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Svg.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5XmlPatterns.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5WebChannel.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Positioning.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Quick.so.5)
/bin/rstudio: /usr/lib64/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/rstudio/lib/libQt5Qml.so.5)

$LD_LIBRARY_PATH contains:

[jwtaylor@andersserver-02 ~]$ echo $LD_LIBRARY_PATH
/usr/local/root/lib::/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64:/software/root/lib

ls -l /usr/lib/rstudio/lib/

[jwtaylor@andersserver-02 ~]$ ls -l /usr/lib/rstudio/lib/
total 199704
-rwxr-xr-x. 1 root root  25051736 May 24 18:55 libicudata.so.56
-rwxr-xr-x. 1 root root   3804168 May 24 18:55 libicui18n.so.56
-rwxr-xr-x. 1 root root   2225896 May 24 18:55 libicuuc.so.56
-rwxr-xr-x. 1 root root   6905712 May 24 18:55 libQt5Core.so.5
-rwxr-xr-x. 1 root root    789968 May 24 18:55 libQt5DBus.so.5
-rwxr-xr-x. 1 root root   8146600 May 24 18:55 libQt5Gui.so.5
-rwxr-xr-x. 1 root root   2273752 May 24 18:55 libQt5Network.so.5
-rwxr-xr-x. 1 root root    520272 May 24 18:55 libQt5OpenGL.so.5
-rwxr-xr-x. 1 root root    820832 May 24 18:55 libQt5Positioning.so.5
-rwxr-xr-x. 1 root root    660984 May 24 18:55 libQt5PrintSupport.so.5
-rwxr-xr-x. 1 root root   6371408 May 24 18:55 libQt5Qml.so.5
-rwxr-xr-x. 1 root root   6675424 May 24 18:55 libQt5Quick.so.5
-rwxr-xr-x. 1 root root    124888 May 24 18:55 libQt5QuickWidgets.so.5
-rwxr-xr-x. 1 root root    394192 May 24 18:55 libQt5Sensors.so.5
-rwxr-xr-x. 1 root root    390384 May 24 18:55 libQt5Sql.so.5
-rwxr-xr-x. 1 root root    495608 May 24 18:55 libQt5Svg.so.5
-rwxr-xr-x. 1 root root   1416000 May 24 18:55 libQt5WaylandClient.so.5
-rwxr-xr-x. 1 root root   2183984 May 24 18:55 libQt5WaylandCompositor.so.5
-rwxr-xr-x. 1 root root    190448 May 24 18:55 libQt5WebChannel.so.5
-rwxr-xr-x. 1 root root 117533568 May 24 18:55 libQt5WebEngineCore.so.5
-rwxr-xr-x. 1 root root    648072 May 24 18:55 libQt5WebEngine.so.5
-rwxr-xr-x. 1 root root    431520 May 24 18:55 libQt5WebEngineWidgets.so.5
-rwxr-xr-x. 1 root root   8535696 May 24 18:55 libQt5Widgets.so.5
-rwxr-xr-x. 1 root root   2281792 May 24 18:55 libQt5XcbQpa.so.5
-rwxr-xr-x. 1 root root   5236560 May 24 18:55 libQt5XmlPatterns.so.5
-rwxr-xr-x. 1 root root    333864 May 24 18:55 libQt5Xml.so.5

What it looks like to me is that rstudio is attempting to link to the system installed libQt5Core.so.5 library instead of the one packaged with rstudio which is shown just above from ls /usr/lib/rstudio/lib/. $LD_LIBRARY_PATH is set, but only to standard locations and a single location we use for some nonstandard installations. I attempted testing with /usr/lib/rstudio/lib added manually to $LD_LIBRARY_PATH but that didn't change anything.

I did attempt to reinstall some relevant components of Qt5 through yum but since the repository version is 5.9 it didn't change anything.

Describe the behavior you expected

I expected RStudio to launch from terminal the same as it launches from the GUI.

kevinushey commented 3 years ago

Our package builds of RStudio should set the RPATH, so that the bundled libraries are preferred to whatever is set via LD_LIBRARY_PATH:

kevin@ubuntu:/usr/lib/rstudio/bin
$ objdump -x rstudio | grep RPATH
  RPATH                $ORIGIN/../lib

I wonder if the fact that you're trying to run RStudio via /bin/rstudio and not /usr/lib/rstudio/bin/rstudio is the issue?

taylorjtamu commented 3 years ago

I'm getting the same result when running /usr/lib/rstudio/bin/rstudio unfortunately. I can paste the full results if needed, but it's the same Qt debug as above resulting in:

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/bin/platforms" ...
Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/rstudio/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I went ahead also and did an objdump -x for both binaries (just to be thorough):

[jwtaylor@andersserver-02 bin]$ objdump -x /usr/lib/rstudio/bin/rstudio | grep RPATH
  RPATH                $ORIGIN/../lib
[jwtaylor@andersserver-02 bin]$ objdump -x /bin/rstudio | grep RPATH
  RPATH                $ORIGIN/../lib
kevinushey commented 3 years ago

I wonder if the issue is instead (as I think you pointed out) that the Qt libraries bundled with RStudio don't have a similar RPATH setting? In other words, from this output:

QFactoryLoader::QFactoryLoader() looking at "/usr/lib/rstudio/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/rstudio/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 330752
}

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/rstudio/bin/platforms" ...
Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/rstudio/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/rstudio/plugins/platforms/libqxcb.so: (/usr/lib64/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Because we're not directly loading libQt5XcbQpa.so, perhaps the RPATH is being side-stepped when finding and loading that library. I don't have a great solution for now other than "munge LD_LIBRARY_PATH before launching RStudio". :-/

taylorjtamu commented 3 years ago

That's what makes sense to me from what I was able to trace through. Unfortunate that the only real answer for the moment is messing with LD_LIBRARY_PATH but I understand that there's just limits on what can be done with a precompiled binary and library linking. I'll keep an eye out for replies to this, so let me know if further information is needed.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

colearendt commented 2 years ago

Would love to see this improved! Terminal-launch should definitely be included!

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically closed due to inactivity.