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
rtags: 2.3 -> 2.8 #21909
Conversation
@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. |
You need to update |
@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 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/optional/optionals/
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this added?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
4c71793
to
c762a54
Compare
There was a problem hiding this 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!
Hmm... something is wrong with the build of rdm.cpp. I am getting a strange compile error on OSX:
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? |
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. |
I've opened an issue on Andersbakken/rtags #891 |
@periklis is this package good to merge or do you want to wait for upstream response regarding a fix for your problem? |
@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? |
@periklis yes. If it breaks OS X, we should wait. |
4ae2781
to
568b000
Compare
@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. |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)