buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.15k stars 31 forks source link

Unable to run buzz from releases #226

Open Its-Kenta opened 8 months ago

Its-Kenta commented 8 months ago

Downloaded 0.3.0 of Buzz and added it to PATH. On attempting to run buzz from terminal getting the following errors:

dyld[3378]: Library not loaded: @rpath/libbuzz.dylib
  Referenced from: <D29A2BE4-E295-3791-9EE8-E11808BE92CF> /Users/kenta/.langs/buzz/bin/buzz
  Reason: tried: '/Users/giann/git/buzz/zig-cache/o/831b7c6651fac287367bed2fde12371b/libbuzz.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/giann/git/buzz/zig-cache/o/831b7c6651fac287367bed2fde12371b/libbuzz.dylib' (no such file), '/Users/giann/git/buzz/zig-cache/o/831b7c6651fac287367bed2fde12371b/libbuzz.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/giann/git/buzz/zig-cache/o/831b7c6651fac287367bed2fde12371b/libbuzz.dylib' (no such file), '/usr/local/lib/libbuzz.dylib' (no such file), '/usr/lib/libbuzz.dylib' (no such file, not in dyld cache)
zsh: abort      buzz

Running macOS on Mac Studio M2 Max

giann commented 8 months ago

I recommend building buzz from source and from the main branch when possible. You can try creating a symlink to the dylib in /usr/local/lib to fix this.

Its-Kenta commented 8 months ago

Built it from source and works fine. My issue is resolved on this one, do you want to close it or leave it open for future cases to fix this at some point?

giann commented 8 months ago

Let it open. The buzz binary should be able to find the dylib by looking in its own directory.

vtereshkov commented 6 months ago

@giann

  1. The same path resolution problem is seen on Linux, even when buzz and libbuzz.so are put into the same folder:

    ./buzz: error while loading shared libraries: libbuzz.so: cannot open shared object file: No such file or directory

    I worked around it by first calling

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
  2. The release binaries are expecting a newer GLIBC version, so I merely cannot run buzz on Ubuntu 20:

    
    vtereshkov@Vasiliy-Acer:~/buzz-0.3.0-linux-x86_64/bin$ ./buzz 
    ./buzz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./buzz)
    ./buzz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./buzz)
    ./buzz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by libbuzz.so)
    ./buzz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by libbuzz.so)
    vtereshkov@Vasiliy-Acer:~/buzz-0.3.0-linux-x86_64/bin$ ldd --version
    ldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
giann commented 1 month ago

Related zig issues: