Bug 248829 - shells/bash-completion: Does not cross-build (with qemu-user-static)
Summary: shells/bash-completion: Does not cross-build (with qemu-user-static)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-22 12:23 UTC by Christian Ullrich
Modified: 2024-12-29 14:14 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch (659 bytes, patch)
2020-08-22 12:23 UTC, Christian Ullrich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2020-08-22 12:23:09 UTC
Created attachment 217439 [details]
Patch

When cross-building with qemu-user-static, shells/bash-completion fails in stage (this is from poudriere building for aarch64):

===>  Staging for bash-completion-2.11,2
===>   bash-completion-2.11,2 depends on executable: bash - found
===>   Generating temporary packing list
gmake[2]: Entering directory '/wrkdirs/usr/ports/shells/bash-completion/work/bash-completion-2.11'
Making install in completions
Error loading gmake
gmake[2]: *** [Makefile:480: install-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/shells/bash-completion/work/bash-completion-2.11'
*** Error code 2


This is because "make install" invokes gmake in the "completions" directory, which contains a file named "gmake". The file is not executable and would not be considered normally, but qemu-user-static does not care and attempts to use it anyway.

Fix: Override MAKE_CMD in the port Makefile with the full path to gmake instead of the bare name that USES=gmake sets it to.

An alternative would be to exclude the gmake completions entirely.
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-08-30 20:24:36 UTC
Committed. Thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-08-30 20:24:56 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Aug 30 20:23:02 UTC 2020
New revision: 547121
URL: https://svnweb.freebsd.org/changeset/ports/547121

Log:
  Fix cross-build with qemu-user-static

  PR:		248829
  Submitted by:	Christian Ullrich <chris@chrullrich.net>

Changes:
  head/shells/bash-completion/Makefile
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2024-12-29 14:14:23 UTC
Completely fixed in ports 624b8729fc49aa22cca173aa1a6b69b65fa96f5a.