Skip to content

issue building in nixpkgs #14

@theotheroracle

Description

@theotheroracle

i'm trying to build the gem in nixpkgs, but unfortunately i'm getting this error

current directory: /nix/store/jmbwfb3rbc78f9ffb8d6vyh6igcl4a2h-ruby3.1.4-kostya-sigar-2.0.10/lib/ruby/gems/3.1.0/gems/kostya-sigar-2.0.10/bindings/ruby
/nix/store/g40kf6l748aijx2xamn0qnckwzy45wr5-ruby-3.1.4/bin/ruby extconf.rb
Ruby platform=x86_64-linux
checking for sys/sysmacros.h... yes
../../src/sigar.c -> sigar.c
../../src/sigar_cache.c -> sigar_cache.c
../../src/sigar_fileinfo.c -> sigar_fileinfo.c
../../src/sigar_format.c -> sigar_format.c
../../src/sigar_getline.c -> sigar_getline.c
../../src/sigar_ptql.c -> sigar_ptql.c
../../src/sigar_signal.c -> sigar_signal.c
../../src/sigar_util.c -> sigar_util.c
../../src/os/linux/linux_sigar.c -> linux_sigar.c
creating Makefile

current directory: /nix/store/jmbwfb3rbc78f9ffb8d6vyh6igcl4a2h-ruby3.1.4-kostya-sigar-2.0.10/lib/ruby/gems/3.1.0/gems/kostya-sigar-2.0.10/bindings/ruby
make DESTDIR\= sitearchdir\=./.gem.20230723-26-y3z5eu sitelibdir\=./.gem.20230723-26-y3z5eu clean

current directory: /nix/store/jmbwfb3rbc78f9ffb8d6vyh6igcl4a2h-ruby3.1.4-kostya-sigar-2.0.10/lib/ruby/gems/3.1.0/gems/kostya-sigar-2.0.10/bindings/ruby
make DESTDIR\= sitearchdir\=./.gem.20230723-26-y3z5eu sitelibdir\=./.gem.20230723-26-y3z5eu
compiling linux_sigar.c
linux_sigar.c: In function 'sigar_os_proc_list_get':
linux_sigar.c:604:5: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations]
  604 |     while (readdir_r(dirp, &dbuf, &ent) == 0) {
      |     ^~~~~
In file included from linux_sigar.c:19:
/nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/dirent.h:185:12: note: declared here
  185 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
linux_sigar.c: In function 'sigar_proc_port_get':
linux_sigar.c:2492:5: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations]
 2492 |     while (readdir_r(dirp, &dbuf, &ent) == 0) {
      |     ^~~~~
/nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/dirent.h:185:12: note: declared here
  185 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
linux_sigar.c:2533:9: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations]
 2533 |         while (readdir_r(fd_dirp, &fd_dbuf, &fd_ent) == 0) {
      |         ^~~~~
/nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/dirent.h:185:12: note: declared here
  185 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
linux_sigar.c: In function 'sigar_cpu_list_get':
linux_sigar.c:440:11: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
  440 |     (void)fgets(cpu_total, sizeof(cpu_total), fp);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'get_iostat_procp':
linux_sigar.c:1349:11: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1349 |     (void)fgets(buffer, sizeof(buffer), fp); /* skip header */
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'sigar_net_route_list_get':
linux_sigar.c:1721:11: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1721 |     (void)fgets(buffer, sizeof(buffer), fp); /* skip header */
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'sigar_net_interface_stat_get':
linux_sigar.c:1764:5: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1764 |     fgets(buffer, sizeof(buffer), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c:1765:5: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1765 |     fgets(buffer, sizeof(buffer), fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'proc_net_read':
linux_sigar.c:1929:5: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 1929 |     fgets(buffer, sizeof(buffer), fp); /* skip header */
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'sigar_arp_list_get':
linux_sigar.c:2410:11: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
 2410 |     (void)fgets(buffer, sizeof(buffer), fp); /* skip header */
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'get_linux_vendor_info.isra':
linux_sigar.c:2783:22: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-truncation=]
 2783 |                  "%s %s",
      |                      ^~
In file included from /nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/stdio.h:906,
                 from linux_sigar.c:20:
In function 'snprintf',
    inlined from 'get_linux_vendor_info.isra' at linux_sigar.c:2781:9:
/nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/bits/stdio2.h:54:10: note: '__builtin___snprintf_chk' output between 2 and 512 bytes into a destination of size 256
   54 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
linux_sigar.c: In function 'xen_vendor_parse':
linux_sigar.c:2710:25: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 246 [-Wformat-truncation=]
 2710 |              "XenServer %s",
      |                         ^~
In function 'snprintf',
    inlined from 'xen_vendor_parse' at linux_sigar.c:2708:5:
/nix/store/0ccvlygpc7p5zyfsyz8mmg9ycqkvrcp2-glibc-2.37-8-dev/include/bits/stdio2.h:54:10: note: '__builtin___snprintf_chk' output between 11 and 266 bytes into a destination of size 256
   54 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
compiling rbsigar.c
rbsigar.c:652:10: fatal error: ./rbsigar_generated.rx: No such file or directory
  652 | #include "./rbsigar_generated.rx"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:247: rbsigar.o] Error 1

make failed, exit code 2

does this package have any native dependencies that it's not able to build with ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions