Skip to content

macOS arm64: installer Makefile uses cp libys*.so* (Linux glob) — fails on macOS where library is *.dylib* #267

Closed

Description

@hediseeman

Environment

  • macOS 14 (Sonoma), arm64 (Apple Silicon)
  • yamlscript version: 0.2.8
  • Install command: curl https://yamlscript.org/install | VERSION=0.2.8 LIB=1 PREFIX="$HOME/.local" bash

What happened

The install script fails with:

cp: libys*.so*: No such file or directory
make: *** [install] Error 1

Root cause

The Makefile bundled inside libys-0.2.8-macos-aarch64.tar.xz contains:

else ifneq (,$(LIBYS))
	mkdir -p $(PREFIX)/lib
	cp -pP libys*.so* $(PREFIX)/lib/

The glob libys*.so* is Linux-specific. On macOS the library files are named with .dylib extensions:

libys.0.2.8.dylib
libys.dylib
libys.dylib.0
libys.dylib.0.2.8

The $(LIBYS) variable is set correctly via $(firstword $(wildcard libys.*)) — it detects libys.0.2.8.dylib — but the cp command then uses the hardcoded Linux glob and finds nothing.

Fix

Replace the cp line with a platform-aware glob, e.g.:

	cp -pP libys*.dylib* libys*.so* $(PREFIX)/lib/ 2>/dev/null || cp -pP libys*.dylib* $(PREFIX)/lib/

Or detect the extension from $(LIBYS) and use it consistently:

	cp -pP $(LIBYS)* $(PREFIX)/lib/

The simpler fix is the latter — $(LIBYS) already holds the correct filename for the platform; expanding it with * captures all symlinks.

Workaround

Manual extraction works:

curl -sL "https://github.com/yaml/yamlscript/releases/download/0.2.8/libys-0.2.8-macos-aarch64.tar.xz" \
  -o /tmp/libys.tar.xz
tar -xf /tmp/libys.tar.xz -C /tmp/
mkdir -p "$HOME/.local/lib"
cp -pP /tmp/libys-0.2.8-macos-aarch64/libys*.dylib* "$HOME/.local/lib/"

Then run Python with:

LD_LIBRARY_PATH="$HOME/.local/lib" python3 -c "import yamlscript; print(yamlscript.yamlscript_version)"
# → 0.2.8

PROP-1 verified after manual install: yaml.safe_load and yamlscript.YAMLScript().load produce structurally identical output on plain YAML files (no !ys-0 tag).

Activity

  1. kwolcott commented on Jun 2, 2026

    @kwolcott

    Looking forward to the fix for this...

  2. ingydotnet commented on Jun 12, 2026

    @ingydotnet
    Member

    I think this is fixed. Re-open if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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