Git Product home page Git Product logo

Comments (4)

nferhat avatar nferhat commented on May 11, 2024 1

@vrinek anything new?

If you aren't willing to work on this (for whatever reason) I can try and package for nixpkgs myself

UPDATE: Hudkit compiles fine now?

from hudkit.

vrinek avatar vrinek commented on May 11, 2024 1

I haven't tried this since, well, last year. I'll close this issue, and feel free to reopen it if still relevant.

from hudkit.

anko avatar anko commented on May 11, 2024

Thanks for reporting. ✨

I read up a little bit. Both strtok_r and sigaction are POSIX extensions, which would explain these errors. GCC on Nix must have them available too, but some compilers in some environments apparently want to be told specifically to use them. I've added such annotations in commit 61e0077. Try now and let me know how it goes.

from hudkit.

vrinek avatar vrinek commented on May 11, 2024

Thank you for the quick response.

I tried both the latest master and 61e0077 and got mostly the same errors, plus some more:

❯ nix-shell --packages pkg-config gtk3 webkitgtk --run make
gcc -std=c11 main.c -o hudkit `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0`
In file included from /nix/store/ch44wa8qqss0dm04lnvf5n7mfh23kmrv-glibc-2.31-74-dev/include/bits/libc-header-start.h:33,
                 from /nix/store/ch44wa8qqss0dm04lnvf5n7mfh23kmrv-glibc-2.31-74-dev/include/limits.h:26,
                 from /nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/include-fixed/limits.h:194,
                 from /nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
                 from /nix/store/fvf3qjqa5qpcjjkq37pb6ypnk1mzhf5h-gcc-9.3.0/lib/gcc/x86_64-unknown-linux-gnu/9.3.0/include-fixed/limits.h:34,
                 from /nix/store/ai5054xzilz0q285c0ldabmkvhyyl6yq-glib-2.64.6/lib/glib-2.0/include/glibconfig.h:11,
                 from /nix/store/cajm8vsbc7726i955nbdz707ij62j9hz-glib-2.64.6-dev/include/glib-2.0/glib/gtypes.h:32,
                 from /nix/store/cajm8vsbc7726i955nbdz707ij62j9hz-glib-2.64.6-dev/include/glib-2.0/glib/galloca.h:32,
                 from /nix/store/cajm8vsbc7726i955nbdz707ij62j9hz-glib-2.64.6-dev/include/glib-2.0/glib.h:30,
                 from /nix/store/cj5dsrxs0pnz3kahpdqlkvj24ir0255z-gtk+3-3.24.21-dev/include/gtk-3.0/gdk/gdkconfig.h:8,
                 from /nix/store/cj5dsrxs0pnz3kahpdqlkvj24ir0255z-gtk+3-3.24.21-dev/include/gtk-3.0/gdk/gdk.h:30,
                 from /nix/store/cj5dsrxs0pnz3kahpdqlkvj24ir0255z-gtk+3-3.24.21-dev/include/gtk-3.0/gtk/gtk.h:30,
                 from main.c:4:
/nix/store/ch44wa8qqss0dm04lnvf5n7mfh23kmrv-glibc-2.31-74-dev/include/features.h:314:53: error: operator '&&' has no right operand
  314 |      || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \
      |                                                     ^~
/nix/store/ch44wa8qqss0dm04lnvf5n7mfh23kmrv-glibc-2.31-74-dev/include/features.h:319:48: error: operator '&&' has no right operand
  319 | #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
      |                                                ^~
main.c: In function ‘main’:
main.c:452:32: warning: implicit declaration of function ‘strtok_r’; did you mean ‘strtok’? [-Wimplicit-function-declaration]
  452 |             for (char *entry = strtok_r(
      |                                ^~~~~~~~
      |                                strtok
main.c:452:32: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
main.c:452:13: error: declaration of non-variable ‘strtok_r’ in ‘for’ loop initial declaration
  452 |             for (char *entry = strtok_r(
      |             ^~~
main.c:455:27: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  455 |                     entry = strtok_r(NULL, ",", &strtok_savepoint)) {
      |                           ^
main.c:713:12: error: variable ‘usr1_action’ has initializer but incomplete type
  713 |     struct sigaction usr1_action = {
      |            ^~~~~~~~~
main.c:714:10: error: ‘struct sigaction’ has no member named ‘sa_handler’
  714 |         .sa_handler = on_signal_sigusr1
      |          ^~~~~~~~~~
main.c:714:23: warning: excess elements in struct initializer
  714 |         .sa_handler = on_signal_sigusr1
      |                       ^~~~~~~~~~~~~~~~~
main.c:714:23: note: (near initialization for ‘usr1_action’)
main.c:713:22: error: storage size of ‘usr1_action’ isn’t known
  713 |     struct sigaction usr1_action = {
      |                      ^~~~~~~~~~~
main.c:716:5: warning: implicit declaration of function ‘sigaction’ [-Wimplicit-function-declaration]
  716 |     sigaction(SIGUSR1, &usr1_action, NULL);
      |     ^~~~~~~~~
make: *** [makefile:2: hudkit] Error 1

I'll try to find some info on what look like nix-specific issues at the top of the output.

from hudkit.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.