davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
402 stars 33 forks source link

Missing libzstd error in Rescript 11 #477

Open ashton opened 5 months ago

ashton commented 5 months ago

Hey!

I'm trying to build an old project of mine, after upgrading it to Rescript 11, I had to change some things but everything seemed fine until I got this error:

FAILED: src/Menu.ast
dyld[63114]: Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <380A6F45-B4C8-3B8B-BB0A-B8206C4C5FBE> /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx
  Reason: tried: '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

  We've found a bug for you!
  /Users/matheus.ashton/dev/pessoal/rsus/src/Menu.res

  Error while running external preprocessor
Command line: /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx4f9aaeMenu.res' '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppxdb85ecMenu.res'

rescript: [2/117] tests/App_test.ast
FAILED: tests/App_test.ast
dyld[63112]: Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <380A6F45-B4C8-3B8B-BB0A-B8206C4C5FBE> /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx
  Reason: tried: '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

  We've found a bug for you!
  /Users/matheus.ashton/dev/pessoal/rsus/tests/App_test.res

  Error while running external preprocessor
Command line: /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppxcfabc8App_test.res' '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx510cfcApp_test.res'

rescript: [3/117] tests/Bindings.ast
FAILED: tests/Bindings.ast
dyld[63116]: Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <380A6F45-B4C8-3B8B-BB0A-B8206C4C5FBE> /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx
  Reason: tried: '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

  We've found a bug for you!
  /Users/matheus.ashton/dev/pessoal/rsus/tests/Bindings.res

  Error while running external preprocessor
Command line: /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx396429Bindings.res' '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx7550e9Bindings.res'

rescript: [4/117] src/Router.ast
FAILED: src/Router.ast
dyld[63113]: Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <380A6F45-B4C8-3B8B-BB0A-B8206C4C5FBE> /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx
  Reason: tried: '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

  We've found a bug for you!
  /Users/matheus.ashton/dev/pessoal/rsus/src/Router.res

  Error while running external preprocessor
Command line: /Users/matheus.ashton/dev/pessoal/rsus/node_modules/@davesnx/styled-ppx/ppx '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx4369b8Router.res' '/var/folders/v8/g9vlmy453gjbyx4w4fbmdzdw0000gn/T/ppx3347fdRouter.res'

I'm building it with rescript 11.1.1 node 18.20.2 on a Mac M1 Pro OSX Ventura.

Is this library a dependency? Do I really have to install it locally?

davesnx commented 5 months ago

Do you have a repository I can look into? We don't use zstd in styled-ppx and I'm unsure where this comes from.

ashton commented 5 months ago

https://github.com/ashton/pet-manager

Now that I've checked, you don't support rescript v11 yet, could be something related to it?

davesnx commented 5 months ago

v11 support is in beta, so if it's related to it I'm happy to take a look