Open fabianhjr opened 3 years ago
I can't seem to reproduce this problem, although I'm not using NixOS. Can you please attach a complete build log from make NV_VERBOSE=1
?
These PNG file headers are supposed to be generated by this snippet in the Makefile
:
define BINARY_DATA_HEADER_RULE
$$(OUTPUTDIR)/$(notdir $(1)).h:
$(at_if_quiet){ \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_start[];\n"; \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_end[];\n"; \
} > $$@
endef
# Build $(IMAGE_HEADERS)
$(foreach png,$(IMAGE_FILES), \
$(eval $(call BINARY_DATA_HEADER_RULE,$(png))))
Sorry, you are right it was an issue on my end unu
Thanks for the help
Sorry to resurrect a closed issue, but this happened to me today as well. The issue was that running the build parallelized seems to cause this issue (on 32 cores at least). I encountered this on NixOS, so in case someone else is looking for a fix, add this to your overlay:
nvidiaPackages.stable.settings = prev.nvidiaPackages.stable.settings.overrideAttrs (old: { enableParallelBuilding = false; });
You're right, I reproduced this. The fix is to modify the code aaronp24 quoted like this:
define BINARY_DATA_HEADER_RULE
$$(OUTPUTDIR)/$(notdir $(1)).h:
+ $(at_if_quiet)$(MKDIR) $$(OUTPUTDIR)
$(at_if_quiet){ \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_start[];\n"; \
$$(PRINTF) "extern const char _binary_$(subst .,_,$(notdir $(1)))_end[];\n"; \
} > $$@
endef
# Build $(IMAGE_HEADERS)
$(foreach png,$(IMAGE_FILES), \
$(eval $(call BINARY_DATA_HEADER_RULE,$(png))))
Thanks for tracking this down, Robert! Reopening.
The fix is correct in principal, but canonical way to depend on a directory in this case is via GNU make's order-only-prerequisite: $$(OUTPUTDIR)/$(notdir $(1)).h: | $$(OUTPUTDIR)
I think, which DTRT in a declarative way, without manually calling $(MKDIR)
.
P.S. Of course, as long as there is a target for creating the $$(OUTPUTDIR)
somewhere to be seen.
Upon attempting to package the latest release for NixOS there is this issue:
From this line: https://github.com/NVIDIA/nvidia-settings/blob/cbb7bd5325f7ae91281e291b80dec4e29b66b3cb/src/gtk%2B-2.x/ctkbanner.c#L37