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

java: fix dtrace detection #27719

Merged
merged 1 commit into from Jul 29, 2017
Merged

java: fix dtrace detection #27719

merged 1 commit into from Jul 29, 2017

Conversation

sigma
Copy link
Contributor

@sigma sigma commented Jul 28, 2017

Motivation for this change

Building openjdk on my Linux box failed because the build process wrongly took the existence of /usr/include/sys/sdt.h as a sign that dtrace should be enabled. Which then failed because sys/sdt.h cannot be found during build.

hotspot/make/linux/makefiles/dtrace.make contains:

# But it does have a SystemTap dtrace compatible sys/sdt.h
ifneq ($(ALT_SDT_H),)
  SDT_H_FILE = $(ALT_SDT_H)
else
  SDT_H_FILE = /usr/include/sys/sdt.h
endif
DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))
REASON = "$(SDT_H_FILE) not found"

ifneq ($(DTRACE_ENABLED),)
  CFLAGS += -DDTRACE_ENABLED
endif

It's not a problem on NixOS because /usr/include/sys/sdt.h doesn't exist there. So let's not even try to find that file, it shouldn't be used anyway.

Things done

Please check what applies. Note that these are not hard requirements but mereley serve as information for reviewers.

  • 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 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92 Mic92 merged commit 23d8fd4 into NixOS:master Jul 29, 2017
@sigma sigma deleted the pr/java-fix branch October 1, 2017 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants