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

cquery: stuck in an old version because of macOS 10.12 requirement #44486

Closed
Kaali opened this issue Aug 5, 2018 · 4 comments
Closed

cquery: stuck in an old version because of macOS 10.12 requirement #44486

Kaali opened this issue Aug 5, 2018 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin

Comments

@Kaali
Copy link

Kaali commented Aug 5, 2018

Issue description

I tried to bump cquery version to the newest release (v20180718). But cannot do it because it uses C++14 features (shared_timed_mutex) only available from macOS 10.12.

Steps to reproduce

Apply this diff:

diff --git a/pkgs/development/tools/misc/cquery/default.nix b/pkgs/development/tools/misc/cquery/default.nix
index 0b86deb5205..ce0179ad372 100644
--- a/pkgs/development/tools/misc/cquery/default.nix
+++ b/pkgs/development/tools/misc/cquery/default.nix
@@ -5,8 +5,8 @@ let
   src = fetchFromGitHub {
     owner = "cquery-project";
     repo = "cquery";
-    rev = "34b357bc5e873d52d2aa41287c6e138244cea109";
-    sha256 = "0i34v30cl73485bzpbis539x0iq9whpv0403ca5a9h6vqwnvdn7c";
+    rev = "b523aa928acf8ffb3de6b22c79db7366a9672489";
+    sha256 = "0c8rgnyvd3nnwm17z4imwibmqb8i9kbnh0z2xj66kyahahg5faff";
     fetchSubmodules = true;
   };
 
@@ -15,7 +15,7 @@ let
 in
 stdenv.mkDerivation rec {
   name    = "cquery-${version}";
-  version = "2018-05-01";
+  version = "2018-07-18";
 
   inherit src;
 

and try to build on macOS.

Results in the following output:

[ 15%] Building CXX object CMakeFiles/cquery.dir/src/command_line.cc.o
In file included from /tmp/nix-build-cquery-2018-07-18.drv-0/source/src/command_line.cc:7:
/tmp/nix-build-cquery-2018-07-18.drv-0/source/src/import_manager.h:30:8: error: 'shared_timed_mutex' is unavailable: introduced in macOS 10.12
  std::shared_timed_mutex dependency_mutex_;
       ^
/nix/store/d4mnrvmh7l5hz6gskbn8h11g2wfjpvqx-libc++-6.0.1/include/c++/v1/shared_mutex:204:58: note: 'shared_timed_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
                                                         ^
In file included from /tmp/nix-build-cquery-2018-07-18.drv-0/source/src/command_line.cc:7:
/tmp/nix-build-cquery-2018-07-18.drv-0/source/src/import_manager.h:34:8: error: 'shared_timed_mutex' is unavailable: introduced in macOS 10.12
  std::shared_timed_mutex initial_import_mutex_;
       ^
/nix/store/d4mnrvmh7l5hz6gskbn8h11g2wfjpvqx-libc++-6.0.1/include/c++/v1/shared_mutex:204:58: note: 'shared_timed_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
                                                         ^

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

 - system: `"x86_64-darwin"`
 - host os: `Darwin 17.7.0, macOS 10.13.6`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.1pre6338_45bcf541`
 - channels(kaali): `""`
 - channels(root): `""`
 - nixpkgs: `/Users/kaali/Devel/nix/nixpkgs`

Related to this issue: #37407
Maintainer ping: @tobim

@tobim
Copy link
Contributor

tobim commented Aug 5, 2018

I'm aware of this problem. I wanted to wait till jacobdufault/cquery#643 is merged.

You can try setting CMAKE_OSX_DEPLOYMENT_TARGET=10.12 if it's urgent, but beware that the wrapper is currently broken and needs a fix as well.

It'll be a few days before I'll get around to fixing this.

@Kaali
Copy link
Author

Kaali commented Aug 6, 2018

I'm not in a hurry. Thanks for your effort.

@prusnak prusnak added the 6.topic: darwin Running or building packages on Darwin label May 9, 2020
@stale
Copy link

stale bot commented Nov 5, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 5, 2020
@jiegec
Copy link
Contributor

jiegec commented Jul 8, 2022

cquery has been removed because it is abandoned by upstream. Consider switching to clangd or ccls instead.

@jiegec jiegec closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

4 participants