Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mendeley: 1.16.3 -> 1.17.7 - WIP #21093

Closed
wants to merge 1 commit into from
Closed

mendeley: 1.16.3 -> 1.17.7 - WIP #21093

wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Dec 12, 2016

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Since 1.17 Mendeley uses Qt5. And its become massive, growing from 33 MB to 130 MB.

@mention-bot
Copy link

@FRidh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @badi, @bjornfor and @vcunat to be potential reviewers.

@FRidh
Copy link
Member Author

FRidh commented Dec 12, 2016

@ttuegel any suggestions on how to make it find the vendored Qt5 libraries?

@ttuegel
Copy link
Member

ttuegel commented Dec 12, 2016

If you want to use the vendored libraries, you should remove Qt 5 from the buildInputs and either use patchelf to set the RPATH or make a wrapper to set LD_LIBRARY_PATH.

@FRidh
Copy link
Member Author

FRidh commented Dec 12, 2016

@ttuegel okay, I will try to use the system libraries first. I'm surprised it links against so many xorg libraries.

@FRidh
Copy link
Member Author

FRidh commented Dec 12, 2016

Getting close I think

This application failed to start because it could not find or load the Qt platform plugin "xcb".

I thought wrapQtProgram would solve finding plugins, but it didn't.

@ttuegel
Copy link
Member

ttuegel commented Dec 12, 2016

Right now your expression is still mixing our Qt with the vendor's. If you want to use our Qt, you need to change the library RPATH or LD_LIBRARY_PATH to point there, or else continue to use the vendor's libraries (and point RPATH or LD_LIBRARY_PATH there).

Copy link
Member

@ttuegel ttuegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend sticking with the vendor's Qt libraries unless you know they won't work. It is generally a lot of trouble to keep Qt versions in sync because there is no binary compatibility between versions. Also, Qt has a commercial license which allows vendors to make incompatible downstream patches.

,gcc, liborc, xorg, qt4, zlib
, ...}:
, alsaLib, dbus, expat, fontconfig, freetype, gcc, glib, libcap
, liborc, libxml2, libxslt, nss, nspr, sqlite, xorg, qt55, zlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use qt55.callPackage in all-packages.nix instead of importing qt55 into the expression. This ensures that everything which depends on Qt 5 is built with the same version.

zlib
qt55.qtbase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Along the same lines as above, use qtbase and qtdeclarative here.

@@ -51,7 +72,11 @@ stdenv.mkDerivation {
patchelf --set-interpreter $interpreter $out/bin/mendeleydesktop

librarypath="${stdenv.lib.makeLibraryPath deps}:$out/lib:$out/lib/qt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still points to the vendor's Qt libraries.

@FRidh
Copy link
Member Author

FRidh commented Dec 29, 2016

I got a bit further using the vendored libraries. It doesn't work quite yet though

$ nix-shell -p mendeley -I nixpkgs=.  --run mendeleydesktop
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
Qt WebEngine Plugins directory not found. Trying fallback directory... Plugins as for example video codecs MAY NOT work.
Crash handler wrote minidump /home/freddy/.local/share/data/Mendeley Ltd./Mendeley Desktop/minidumps/03c3c4b4-51d5-5777-6e569cb4-74af8af5.dmp
/run/user/1000/nix-shell.G__yfF/rc: line 1: 14428 Segmentation fault      mendeleydesktop

@FRidh FRidh changed the title mendeley: 1.16.3 -> 1.17.6 - WIP mendeley: 1.16.3 -> 1.17.7 - WIP Feb 13, 2017
@FRidh
Copy link
Member Author

FRidh commented Feb 22, 2017

@ttuegel any suggestions on how to get this working?

@ttuegel
Copy link
Member

ttuegel commented Feb 23, 2017

It looks like the vendored libraries have hardcoded paths, in particular

xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb

It looks like you will have to substitute a xkbcommon build from Nixpkgs, at least.

@FRidh
Copy link
Member Author

FRidh commented Feb 26, 2017

I see now I forgot to update the PR. I've added libxkbcommon and set a path for it as well.

$ $(nix-build -A mendeley)/bin/mendeleydesktop
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QSslSocket: cannot call unresolved function d2i_X509
QLayout: Attempting to add QLayout "" to ToolBarActionWidget "", which already has a layout
QLayout: Attempting to add QLayout "" to ToolBarActionWidget "", which already has a layout
Qt WebEngine Plugins directory not found. Trying fallback directory... Plugins as for example video codecs MAY NOT work.
Crash handler wrote minidump /home/freddy/.local/share/data/Mendeley Ltd./Mendeley Desktop/minidumps/0506ac28-1a2e-2bd5-70e6449e-59e666cc.dmp
Segmentation fault

@ttuegel
Copy link
Member

ttuegel commented Feb 27, 2017

That looks to me like missing OpenSSL. If that's not it, try searching for the symbol names.

@FRidh
Copy link
Member Author

FRidh commented Mar 7, 2017

Merged #23563

@FRidh FRidh closed this Mar 7, 2017
@FRidh FRidh deleted the mendeley branch March 7, 2017 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants