Skip to content

Makefile copyFiles target tries to install files that does not exists #83

@drupol

Description

@drupol

Hello,

I'm trying to provide a package openarena for Nix and I'm trying to build it from the sources.
The compilation works fine, but the process fails during the copyFiles target.

Here's the error log, when it fails:

openarena> install -s -m 0755 build/release-linux-x86_64/openarena.x86_64 /nix/store/d5qm21v2sqjhg5ykg090m85zpa5azgfv-openarena-0.8.8/bin/openarena.x86_64
openarena> install -s -m 0755 build/release-linux-x86_64/openarena_opengl1.x86_64 /nix/store/d5qm21v2sqjhg5ykg090m85zpa5azgfv-openarena-0.8.8/bin/openarena_opengl1.x86_64
openarena> install: cannot stat 'build/release-linux-x86_64/openarena_opengl1.x86_64': No such file or directory
openarena> make: *** [Makefile:2920: copyfiles] Error 1

Here's the relevant part of the Makefile:

ifneq ($(BUILD_CLIENT),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)$(FULLBINEXT)
  ifneq ($(USE_RENDERER_DLOPEN),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl1_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl1_$(SHLIBNAME)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_software_$(SHLIBNAME) $(COPYBINDIR)/renderer_software_$(SHLIBNAME)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_openarena1_$(SHLIBNAME) $(COPYBINDIR)/renderer_openarena1_$(SHLIBNAME)
    ifneq ($(BUILD_RENDERER_OPENGL2),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl2_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl2_$(SHLIBNAME)
    endif
  else
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_opengl1$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_opengl1$(FULLBINEXT)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_software$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_software$(FULLBINEXT)
    ifneq ($(BUILD_RENDERER_OPENGL2),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_opengl2$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_opengl2$(FULLBINEXT)
    endif
  endif
endif

Basically, it tries to install this file build/release-linux-x86_64/openarena_opengl1.x86_64 but this never gets compiled.

In comparison with ioq3, here's the relevant part of their Makefile:

ifneq ($(BUILD_CLIENT),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)$(FULLBINEXT)
  ifneq ($(USE_RENDERER_DLOPEN),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl1_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl1_$(SHLIBNAME)
    ifneq ($(BUILD_RENDERER_OPENGL2),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl2_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl2_$(SHLIBNAME)
    endif
  else
    ifneq ($(BUILD_RENDERER_OPENGL2),0)
	$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)_opengl2$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)_opengl2$(FULLBINEXT)
    endif
  endif
endif

I have no issue with ioq3 Makefile, compilation and installation works fine.

When comparing both files, I have the feeling that it's an erroneous copy paste that happened there. But I might be totally wrong. I opened a PR with a patch that fix the issue, let me know if this is OK.

The problematic changes (4e532ed#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R2772) has been introduced in commit 4e532ed in PR #23 from @sago007 (gently pinging the author here, maybe you might help).

Could you please let me know what I could do to fix the issue? This is actually preventing me from making a package for the Nix ecosystem.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions