Skip to content

gpgme: fix build error with newer ln (double -sf flag) #29243

@shayanshirazi888

Description

@shayanshirazi888

Package Name

gpgme

Maintainer

OpenWrt Packages Team

OpenWrt Version

25 (SNAPSHOT)

OpenWrt Target/Subtarget

mipsel/24kc

Steps to Reproduce

  1. Use a modern Linux host (like Ubuntu 26.04) where ln is strict about duplicate flags.
  2. Update and install feeds: ./scripts/feeds update -a && ./scripts/feeds install -a.
  3. Select gpgme package or a package that depends on it.
  4. Run make package/feeds/packages/gpgme/compile V=s.

Actual Behaviour

The build fails during the staging/installation phase with the following error:
error: the argument '--force' cannot be used multiple times

This happens because the gpgme Makefile uses $(LN) -sf, and since $(LN) is already defined as ln -sf in the OpenWrt build system, the final command executed is ln -sf -sf.

Newer versions of coreutils or alternative ln implementations (like the Rust-based one) do not allow the same flag to be provided multiple times.

Fix:
In libs/gpgme/Makefile, remove the redundant -sf from the line:
$(LN) -sf $(STAGING_DIR)/host/bin/gpgme-config $(1)/usr/bin/gpgme-config
to
$(LN) $(STAGING_DIR)/host/bin/gpgme-config $(1)/usr/bin/gpgme-config

Confirmation Checklist

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions