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

spectral: v2019-03-03 -> v2019-08-15 #65354

Merged
merged 1 commit into from Sep 15, 2019

Conversation

colemickens
Copy link
Member

Motivation for this change

Update spectral.

Works for me!

cc: @dtzWill

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 26, 2019

Can you remove the wrapper and use wrapQtAppsHook instead? See for example 51d7803

@colemickens
Copy link
Member Author

Done. I think. It works for me anyway.

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

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

I think this whole let block can be removed.

@colemickens
Copy link
Member Author

Yes, of course, thanks. Pushed again.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 27, 2019

The wrapper is working but I still can't run the application without installing it:

[nix-shell:~/.cache/nix-review/pr-65354-4]$ results/matrique/bin/spectral
DPI: 1
Cannot mix incompatible Qt library (version 0x50c00) with this library (version 0x50c03)
Aborted

@ttuegel do you know what's happening here?

];

in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

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

The preferred way to do this is use mkDerivation instead of stdenv.mkDerivation, so that you do not need to call wrapQtAppsHook directly. mkDerivation also sets some Qt-specific build flags. Please refer to the manual for more information.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, I checked the docs, it seems really confusing to name them the same thing. Plus, I assume mkDerivation isn't soley for Qt apps, or is it?

I can take a look at this later and try to get it working with the more succinct syntax. Thanks for pointing this out and linking the docs!

@ttuegel
Copy link
Member

ttuegel commented Jul 27, 2019

do you know what's happening here?

There is likely something incompatible installed in your user or system environment. What is QT_PLUGIN_PATH set to in your shell, and what are the contents of all the directories listed there?

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 27, 2019

@ttugel That's what I thought but the error persists even after unsetting QT_PLUGIN_PATH and QML_IMPORT_PATH.

@ttuegel
Copy link
Member

ttuegel commented Jul 27, 2019

@rnhmjoj Could you try to run it under strace and find out what file or library it's trying to open? There are several other ways it can attempt to load things from the environment. 🙁

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 29, 2019

So, I can see it's loading both qtbase 5.12.0 and 5.12.3. I think it found about it by looking inside my nix profile:

lstat("/nix/var/nix/profiles", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/nix/var/nix/profiles/per-user", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
lstat("/nix/var/nix/profiles/per-user/rnhmjoj", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/nix/var/nix/profiles/per-user/rnhmjoj/profile", {st_mode=S_IFLNK|0777, st_size=16, ...}) = 0
lstat("/nix/var/nix/profiles/per-user/rnhmjoj/profile-191-link", {st_mode=S_IFLNK|0777, st_size=60, ...}) = 0
lstat("/nix", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/nix/store", {st_mode=S_IFDIR|S_ISVTX|0775, st_size=5107712, ...}) = 0
lstat("/nix/store/2hk43911y2addhkcai4zblnihmwrvsj6-user-environment", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/2hk43911y2addhkcai4zblnihmwrvsj6-user-environment/lib", {st_mode=S_IFLNK|0777, st_size=65, ...}) = 0
lstat("/nix", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/nix/store", {st_mode=S_IFDIR|S_ISVTX|0775, st_size=5107712, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin/lib/qt-5.12", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin/lib/qt-5.12/plugins", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin/lib/qt-5.12/plugins/platforms", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
lstat("/nix/store/7bvh4ydpza5cfhd7rw7pfrgc2bhrqqni-qtbase-5.12.0-bin/lib/qt-5.12/plugins/platforms/libqminimal.so", {st_mode=S_IFREG|0555, st_size=149584, ...}) = 0

@colemickens colemickens changed the title spectral: v2019-03-03 -> v2019-05-22 spectral: v2019-03-03 -> v2019-08-15 Aug 15, 2019
@colemickens colemickens force-pushed the nixpkgs-spectral branch 2 times, most recently from 360e50a to ea07071 Compare August 15, 2019 22:04
@colemickens
Copy link
Member Author

Well, now I can't get it to build. I switched it to cmake, per upstream, and added qtkeychain but I still get:

...
...
                                                                                                                                
--                           
-- =============================================================================                                                  
--                        libqtolm Build Information             
-- =============================================================================                                                  
-- Version: 0.1.0, API version: 0.1                              
-- Build type: Release                                                                                                          
-- Using compiler: GNU 7.4.0                                                                                                    
-- Using Qt 5.12.0 at /nix/store                                                                                                
-- Could NOT find Git (missing: GIT_EXECUTABLE)                  
-- Using system libolm                                           
-- =============================================================================                                                  
--                                                              
--                                                                                                                              
-- =============================================================================
--                        Quotient Build Information                                                                            
-- =============================================================================                     
-- Version: 0.6.0, API version: 0.6                              
-- Build type: Release                                                                                                          
-- Using compiler: GNU 7.4.0                                     
-- Install Prefix: /nix/store/mxnhxxp2d3ggrvxgbkzg2dqm29lff6vk-spectral-unstable-2019-08-15                                       
-- Using Qt 5.12.0 at /nix/store                                 
-- Could NOT find Git (missing: GIT_EXECUTABLE)                  
-- Using in-tree libQtOlm                                        
-- =============================================================================                                                  
--                                                               
CMake Error at CMakeLists.txt:89 (find_package):                 
  By not providing "FindQt5Keychain.cmake" in CMAKE_MODULE_PATH this project                                                      
  has asked CMake to find a package configuration file provided by                                                                
  "Qt5Keychain", but CMake did not find one.                     

  Could not find a package configuration file provided by "Qt5Keychain" with                                                      
  any of the following names:                                    

    Qt5KeychainConfig.cmake                                      
    qt5keychain-config.cmake                                     

  Add the installation prefix of "Qt5Keychain" to CMAKE_PREFIX_PATH or set                                                        
  "Qt5Keychain_DIR" to a directory containing one of the above files.  If                                                         
  "Qt5Keychain" provides a separate development package or SDK, be sure it                                                        
  has been installed.                                            


-- Configuring incomplete, errors occurred!                      
See also "/build/spectral-086891e/build/CMakeFiles/CMakeOutput.log".                                                              
See also "/build/spectral-086891e/build/CMakeFiles/CMakeError.log".                                                               
builder for '/nix/store/j6i3gibakdr6316z7382k0n8rwi8lbl4-spectral-unstable-2019-08-15.drv' failed with exit code 1 

@florianjacob florianjacob mentioned this pull request Aug 16, 2019
10 tasks
@lboklin
Copy link

lboklin commented Sep 8, 2019

Re: Qt5Keychain
qtkeychain defaults to qt4 (withQt5 ? false) for some reason, so overriding qtkeychain like this

let qtkeychain-qt5 = qtkeychain.override {                                                                                                                                                  
      inherit qtbase qttools;                                                                                                                                                               
      withQt5 = true;                                                                                                                                                                       
    };
in stdenv.mkDerivation ...
  ...
  buildInputs = [ ... qtkeychain-qt5
  ....

fixes that issue.

Additionally you'll need to add olm to buildInputs.
I got it to build like this.

@colemickens
Copy link
Member Author

@lboklin I'm looking at this now, but I'm a bit confused, this is what's in pkgs/top-level/all-packages.nix:

qtkeychain = callPackage ../development/libraries/qtkeychain {
  withQt5 = true;                                                               
};                  

So I don't see why the change you suggested would be necessary or have any effect?

@lboklin
Copy link

lboklin commented Sep 14, 2019

@lboklin I'm looking at this now, but I'm a bit confused, this is what's in pkgs/top-level/all-packages.nix:

qtkeychain = callPackage ../development/libraries/qtkeychain {
  withQt5 = true;                                                               
};                  

So I don't see why the change you suggested would be necessary or have any effect?

That's in mkLibsForQt5, not actually the top-level definition for qtkeychain, which doesn't set withQt5 = true;.

@colemickens
Copy link
Member Author

This is working for me now. Thanks @lboklin !

@ttuegel ttuegel self-requested a review September 15, 2019 14:51
@ttuegel ttuegel merged commit 77783bc into NixOS:master Sep 15, 2019
@colemickens colemickens deleted the nixpkgs-spectral branch September 16, 2019 14:27
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Sep 24, 2019

This should be backported to 19.09, it's still broken.

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

4 participants