yaml / yamlscript

Programming in YAML
MIT License
362 stars 31 forks source link

Update the Raku binding #122

Closed ingydotnet closed 3 months ago

ingydotnet commented 3 months ago

Need to look in these places for the shared lib:

Also the error message for when the libyamlscript shared lib can't be found should be:

Shared library file 'libyamlscript.so.0.1.48' not found
Try: curl -sSL yamlscript.org/install | VERSION=0.1.48 LIB=1 bash
See: https://github.com/yaml/yamlscript/wiki/Installing-YAMLScript

Like in here:

$ PYTHONPATH=python/lib python -c 'import yamlscript'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ingy/src/yamlscript/python/lib/yamlscript/__init__.py", line 72, in <module>
    libyamlscript = ctypes.CDLL(find_libyamlscript_path())
  File "/home/ingy/src/yamlscript/python/lib/yamlscript/__init__.py", line 62, in find_libyamlscript_path
    raise Exception(
Exception: Shared library file 'libyamlscript.so.0.1.48' not found
Try: curl -sSL yamlscript.org/install | VERSION=0.1.48 LIB=1 bash
See: https://github.com/yaml/yamlscript/wiki/Installing-YAMLScript

Raku currently does:

$ RAKULIB=raku/lib raku -MYAMLScript -e 'say YAMLScript.new()'
Cannot locate native library 'libyamlscript.so.0.1.48': libyamlscript.so.0.1.48: cannot open shared object file: No such file or directory
  in method setup at /home/ingy/.rakudo-moar-2024.03-01-linux-x86_64-gcc/share/perl6/core/sources/89C4D283B1C71945499C6CEA5F2F32C766722DD3 (NativeCall) line 319
  in method setup at /home/ingy/.rakudo-moar-2024.03-01-linux-x86_64-gcc/share/perl6/core/sources/89C4D283B1C71945499C6CEA5F2F32C766722DD3 (NativeCall) line 366
  in sub raku-nativecall at /home/ingy/.rakudo-moar-2024.03-01-linux-x86_64-gcc/share/perl6/core/sources/FB9150CEC41F3F21B6C3B222F14FBD81A98AC494 (NativeCall::Dispatcher) line 45
  in submethod BUILD at /home/ingy/src/yamlscript/raku/lib/YAMLScript.rakumod (YAMLScript) line 25
  in block <unit> at -e line 1
ingydotnet commented 3 months ago

Complete