Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile #20

Open
WeebNetsu opened this issue Nov 11, 2024 · 0 comments
Open

Fails to compile #20

WeebNetsu opened this issue Nov 11, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@WeebNetsu
Copy link
Owner

/home/netsu/.cache/nim/simple_d/@m..@s..@s..@s..@s.nimble@spkgs2@smpv-0.2.0-fbc2669bdcef1a6251f8024341506b57848f1340@smpv.nim.c: In function ‘command__OOZOOZOOZOOZOnimbleZpkgs2Zmpv450O2O045fbc2669bdcef1a6251f8024341506b57848f1340Zmpv_u5319’:
/home/netsu/.cache/nim/simple_d/@m..@s..@s..@s..@s.nimble@spkgs2@smpv-0.2.0-fbc2669bdcef1a6251f8024341506b57848f1340@smpv.nim.c:260:36: error: passing argument 2 of ‘mpv_command’ from incompatible pointer type [-Wincompatible-pointer-types]
  260 |         T3_ = mpv_command(ctx_p0, (&cmd[((NI)0)]));
      |                                   ~^~~~~~~~~~~~~~
      |                                    |
      |                                    char **
In file included from /home/netsu/.cache/nim/simple_d/@m..@s..@s..@s..@s.nimble@spkgs2@smpv-0.2.0-fbc2669bdcef1a6251f8024341506b57848f1340@smpv.nim.c:9:
/usr/include/mpv/client.h:908:58: note: expected ‘const char **’ but argument is of type ‘char **’
  908 | MPV_EXPORT int mpv_command(mpv_handle *ctx, const char **args);
      |                                             ~~~~~~~~~~~~~^~~~
Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread   -I/home/netsu/.choosenim/toolchains/nim-2.2.0/lib -I/home/netsu/Documents/Code/nim-mpv/examples -o /home/netsu/.cache/nim/simple_d/@m..@s..@s..@s..@s.nimble@spkgs2@smpv-0.2.0-fbc2669bdcef1a6251f8024341506b57848f1340@smpv.nim.c.o /home/netsu/.cache/nim/simple_d/@m..@s..@s..@s..@s.nimble@spkgs2@smpv-0.2.0-fbc2669bdcef1a6251f8024341506b57848f1340@smpv.nim.c' failed with exit code: 1

From what I could gather, it is related to

proc command*(ctx: ptr handle, args: varargs[string]) =
    let cmd = allocCStringArray(@args)
    defer: deallocCStringArray(cmd)
    check_error ctx.command(cmd[0].addr)

Maybe outdated code, I see that nimterop is no longer being developed, so could be that an update to gcc may cause this issue to happen... We could look into https://github.com/PMunch/futhark ?

@WeebNetsu WeebNetsu added bug Something isn't working help wanted Extra attention is needed labels Nov 11, 2024
@WeebNetsu WeebNetsu pinned this issue Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant