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

libretro.mame2016: fix build with Make 4.3 #101949

Merged
merged 1 commit into from Oct 29, 2020

Conversation

@AluisioASG
Copy link
Contributor

@AluisioASG AluisioASG commented Oct 28, 2020

Motivation for this change

Builds currently fail with ar trying to operate on what are clearly two paths concatenated together. It stems from a backward-incompatible change in Make:

Previously appending using '+=' to an empty variable would result in a value starting with a space. Now the initial space is only added if the variable already contains some value. Similarly, appending an empty string does not add a trailing space.

This issue was first reported on mamedev/mame#6248, and affects libretro's 2016 snapshot as well. A fix that is reported to work with previous versions of Make was upstreamed to GENie, the build system, MAME, and now to libretro-mame2016 (pending), from which the patch comes.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

If this gets backported to 20.09, libretro can then be unmarked as broken, as far as I can tell.

@AluisioASG AluisioASG requested review from hrdinka, edwtjo and MP2E Oct 28, 2020
Builds currently fail with `ar` trying to operate on what are clearly
two paths concatenated together.  It stems from a backward-incompatible
change in Make:

> Previously appending using '+=' to an empty variable would result in
> a value starting with a space.  Now the initial space is only added
> if the variable already contains some value.  Similarly, appending an
> empty string does not add a trailing space.

This issue was first reported on the MAME repository proper
(mamedev/mame#6248), and affects libretro's
2016 snapshot as well.  A fix that is reported to work with previous
versions of Make was upstreamed to:
- GENie, the build system: bkaradzic/GENie#493
- MAME: mamedev/mame#6262
- libretro: libretro/mame2016-libretro#47

The fetched patch comes from the last of these.
@AluisioASG AluisioASG force-pushed the AluisioASG:aasg/libretro-mame2016 branch from 5d1261d to 8880179 Oct 28, 2020
@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Oct 28, 2020

Result of nixpkgs-review pr 101949 1 run on x86_64-darwin

@GrahamcOfBorg Where is the one darwin package?

@hrdinka hrdinka merged commit 67b292a into NixOS:master Oct 29, 2020
19 checks passed
19 checks passed
@github-actions
tests
Details
@github-actions
action
Details
@ofborg
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions
Wait for ofborg
Details
@ofborg
grahamcofborg-eval ^.^!
Details
@ofborg
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="8880179"; rev="8880179b653648abce4208654695d9276e9fd036"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ofborg
libretro.mame2016, libretro.mame2016.passthru.tests on aarch64-linux Success
Details
@ofborg
libretro.mame2016, libretro.mame2016.passthru.tests on x86_64-linux Success
Details
@hrdinka
Copy link
Contributor

@hrdinka hrdinka commented Oct 29, 2020

Thanks a lot for the fix 👍

@AluisioASG AluisioASG deleted the AluisioASG:aasg/libretro-mame2016 branch Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants