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

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

Open
drupol opened this issue Aug 18, 2023 · 2 comments
Open

Comments

@drupol
Copy link

drupol commented Aug 18, 2023

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.

@leilei-
Copy link
Member

leilei- commented Aug 26, 2023

OpenArena does not compile separate renderer modules. USE_RENDERER_DLOPEN=0 should omit them from copyfiles and compile renderer_oa into the client binary.

(btw oa does not support the opengl2 renderer module, so please don't force that)

@drupol
Copy link
Author

drupol commented Aug 26, 2023

Hi,

USE_RENDERED_DLOPEN is disabled by default.

Also, when reading the makefile, we can clearly see that it will still try to copy files.

Any other clue?

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

No branches or pull requests

2 participants