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

rtags: 2.3 -> 2.8 #21909

Merged
merged 1 commit into from Jan 22, 2017
Merged

rtags: 2.3 -> 2.8 #21909

merged 1 commit into from Jan 22, 2017

Conversation

periklis
Copy link
Contributor

@periklis periklis commented Jan 15, 2017

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.

@mention-bot
Copy link

@periklis, thanks for your PR! By analyzing the history of the files in this pull request, we identified @globin, @anderspapitto and @Ralith to be potential reviewers.

@Ralith
Copy link
Contributor

Ralith commented Jan 15, 2017

You need to update src.sha256 as well at minimum, or this won't build.

@periklis
Copy link
Contributor Author

@Ralith Thx, i missed that.


buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs ]
++ lib.optional stdenv.isDarwin apple_sdk.sdk;
++ lib.optional stdenv.isDarwin [ apple_sdk.sdk apple_sdk.frameworks.CoreServices ];
Copy link
Contributor

Choose a reason for hiding this comment

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

s/optional/optionals/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -16,11 +16,13 @@ stdenv.mkDerivation rec {
MACOSX_DEPLOYMENT_TARGET="10.9"
'';

NIX_CFLAGS_COMPILE = "-fexceptions";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the build process rtags needs exception support.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what "according to the build process" means. There's multiple issues here: -fexceptions is enabled by default, overriding NIX_CFLAGS_COMPILE is the wrong way to specify cflags, and package configures scripts are in general responsible for choosing their compilation options themselves--it's unlikely that NixOS-specific customizations are needed outside of extending search paths.

Copy link
Contributor

@Ralith Ralith Jan 16, 2017

Choose a reason for hiding this comment

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

On investigation, it looks like -fno-exceptions is coming from $(llvm-config --cxxflags) on line 11. If you add -fexceptions after that, and remove the NIX_CFLAGS_COMPILE line here, I'll approve these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx for the input, i am occasionally contributing to packages, so i am interrested to learn. You mean i should put FLAGS in CFLAGS or CXXFLAGS and not NIX_CFLAGS_COMPILE, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

The exact method will depend on the build system used by the package in question. In this case, it seems like we needed to work around an issue with the flags we were already passing in a very rtags-specific environment variable.

@periklis periklis force-pushed the topic_rtags branch 2 times, most recently from 4c71793 to c762a54 Compare January 16, 2017 20:51
Copy link
Contributor

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@periklis
Copy link
Contributor Author

Hmm... something is wrong with the build of rdm.cpp. I am getting a strange compile error on OSX:

[ 86%] Building CXX object src/CMakeFiles/rdm.dir/rdm.cpp.o
In file included from /private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/rdm.cpp:32:
/private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/RTags.h:978:5: warning: default label in switch which covers all enumeration values [-Wc
overed-switch-default]                                                                                                                                                              
    default:
    ^
/private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/rdm.cpp:318:11: error: use of undeclared identifier 'FileManagerWatch'; did you mean 'No
FileManagerWatch'?                                                                                                                                                                  
        { FileManagerWatch, "filemanager-watch", 'M', CommandLineParser::NoValue, "Use a file system watcher for filemanager." },
          ^~~~~~~~~~~~~~~~
          NoFileManagerWatch
/private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/rdm.cpp:184:5: note: 'NoFileManagerWatch' declared here
    NoFileManagerWatch,
    ^
/private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/rdm.cpp:585:14: error: use of undeclared identifier 'FileManagerWatch'; did you mean 'No
FileManagerWatch'?                                                                                                                                                                  
        case FileManagerWatch: {
             ^~~~~~~~~~~~~~~~
             NoFileManagerWatch
/private/var/folders/tv/h06nsg4s31b9lcd0_wl1rcjh0000gn/T/nix-build-rtags-2.8.drv-0/rtags/src/rdm.cpp:184:5: note: 'NoFileManagerWatch' declared here
    NoFileManagerWatch,
    ^
1 warning and 2 errors generated.

Afaik the preprocessor conditionals on https://github.com/Andersbakken/rtags/blob/master/src/rdm.cpp#L39 and https://github.com/Andersbakken/rtags/blob/master/src/rdm.cpp#L181 are quite strange combination to me. Any idea?

@Ralith
Copy link
Contributor

Ralith commented Jan 16, 2017

Looks like an upstream (i.e. rtags) bug at a glance; perhaps they're not testing releases on OSX. I don't have time to dig deeply into it right now, but you might try contacting the maintainer.

@periklis
Copy link
Contributor Author

I've opened an issue on Andersbakken/rtags #891

@Mic92
Copy link
Member

Mic92 commented Jan 18, 2017

@periklis is this package good to merge or do you want to wait for upstream response regarding a fix for your problem?

@periklis
Copy link
Contributor Author

@Mic92 If we merge, we will make our OSX users unhappy. If you don't bother i would like to wait for a response from upstream. Otherwise i would open an osx issue if that the way to go, what's your opinion?

@Mic92
Copy link
Member

Mic92 commented Jan 18, 2017

@periklis yes. If it breaks OS X, we should wait.

@periklis periklis force-pushed the topic_rtags branch 2 times, most recently from 4ae2781 to 568b000 Compare January 21, 2017 19:32
@periklis
Copy link
Contributor Author

@Mic92 The rtags maintainer fixed the bug in upstream and i pinned the release to that commit. I've asked for a release tag and will deliver that asap. Now we can merge this PR.

@globin globin merged commit 01fef92 into NixOS:master Jan 22, 2017
@periklis periklis deleted the topic_rtags branch July 25, 2018 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

6 participants