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

Error while installing gem eye in ruby:3.0.6-alpine3.16 - rbsigar_generated.rx: No such file or directory #243

Closed
phoenix-gi opened this issue Feb 5, 2024 · 2 comments

Comments

@phoenix-gi
Copy link

I trying to install gem eye inside ruby:3.0.6-alpine3.16.

But I get this error, which says that problem while installing kostya-sigar:

#6 11.96 Building native extensions. This could take a while...
#6 15.24 ERROR:  Error installing eye:
#6 15.24        ERROR: Failed to build gem native extension.
#6 15.24 
#6 15.24     current directory: /usr/local/bundle/gems/kostya-sigar-2.0.10/bindings/ruby
#6 15.24 /usr/local/bin/ruby extconf.rb
#6 15.24 Ruby platform=x86_64-linux-musl
#6 15.24 checking for sys/sysmacros.h... yes
#6 15.24 ../../src/sigar.c -> sigar.c
#6 15.24 ../../src/sigar_cache.c -> sigar_cache.c
#6 15.24 ../../src/sigar_fileinfo.c -> sigar_fileinfo.c
#6 15.24 ../../src/sigar_format.c -> sigar_format.c
#6 15.24 ../../src/sigar_getline.c -> sigar_getline.c
#6 15.24 ../../src/sigar_ptql.c -> sigar_ptql.c
#6 15.24 ../../src/sigar_signal.c -> sigar_signal.c
#6 15.24 ../../src/sigar_util.c -> sigar_util.c
#6 15.24 ../../src/os/linux/linux_sigar.c -> linux_sigar.c
#6 15.24 creating Makefile
#6 15.24 
#6 15.24 current directory: /usr/local/bundle/gems/kostya-sigar-2.0.10/bindings/ruby
#6 15.24 make DESTDIR\= sitearchdir\=./.gem.20240205-1-el4tns sitelibdir\=./.gem.20240205-1-el4tns clean
#6 15.24 
#6 15.24 current directory: /usr/local/bundle/gems/kostya-sigar-2.0.10/bindings/ruby
#6 15.24 make DESTDIR\= sitearchdir\=./.gem.20240205-1-el4tns sitelibdir\=./.gem.20240205-1-el4tns
#6 15.24 compiling linux_sigar.c
#6 15.24 linux_sigar.c: In function 'sigar_mem_get':
#6 15.24 linux_sigar.c:322:55: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   322 |     mem->total  = sigar_meminfo(buffer, MEMINFO_PARAM("MemTotal"));
#6 15.24       |                                                       ^~~~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c:323:55: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   323 |     mem->free   = sigar_meminfo(buffer, MEMINFO_PARAM("MemFree"));
#6 15.24       |                                                       ^~~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c:326:51: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   326 |     buffers = sigar_meminfo(buffer, MEMINFO_PARAM("Buffers"));
#6 15.24       |                                                   ^~~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c:327:51: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   327 |     cached  = sigar_meminfo(buffer, MEMINFO_PARAM("Cached"));
#6 15.24       |                                                   ^~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c: In function 'sigar_swap_get':
#6 15.24 linux_sigar.c:354:56: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   354 |     swap->total  = sigar_meminfo(buffer, MEMINFO_PARAM("SwapTotal"));
#6 15.24       |                                                        ^~~~~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c:355:56: warning: passing argument 2 of 'sigar_meminfo' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   355 |     swap->free   = sigar_meminfo(buffer, MEMINFO_PARAM("SwapFree"));
#6 15.24       |                                                        ^~~~~~~~~~
#6 15.24 linux_sigar.c:285:26: note: in definition of macro 'MEMINFO_PARAM'
#6 15.24   285 | #define MEMINFO_PARAM(a) a ":", SSTRLEN(a ":")
#6 15.24       |                          ^
#6 15.24 linux_sigar.c:288:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   288 |                                                  char *attr, int len)
#6 15.24       |                                                  ~~~~~~^~~~
#6 15.24 linux_sigar.c: In function 'sigar_proc_cumulative_disk_io_get':
#6 15.24 linux_sigar.c:779:72: warning: passing argument 2 of 'get_named_proc_token' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   779 |     proc_cumulative_disk_io->bytes_read = get_named_proc_token(buffer, "\nread_bytes");
#6 15.24       |                                                                        ^~~~~~~~~~~~~~
#6 15.24 linux_sigar.c:759:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   759 |                                                  char *token) {
#6 15.24       |                                                  ~~~~~~^~~~~
#6 15.24 linux_sigar.c:780:75: warning: passing argument 2 of 'get_named_proc_token' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24   780 |     proc_cumulative_disk_io->bytes_written = get_named_proc_token(buffer, "\nwrite_bytes");
#6 15.24       |                                                                           ^~~~~~~~~~~~~~~
#6 15.24 linux_sigar.c:759:56: note: expected 'char *' but argument is of type 'const char *'
#6 15.24   759 |                                                  char *token) {
#6 15.24       |                                                  ~~~~~~^~~~~
#6 15.24 linux_sigar.c: In function 'sigar_disk_usage_get':
#6 15.24 linux_sigar.c:1449:24: warning: comparison of integer expressions of different signedness: 'sigar_uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
#6 15.24  1449 |         if (disk->time == SIGAR_FIELD_NOTIMPL) {
#6 15.24       |                        ^~
#6 15.24 linux_sigar.c:1457:25: warning: comparison of integer expressions of different signedness: 'sigar_uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
#6 15.24  1457 |         if (disk->qtime == SIGAR_FIELD_NOTIMPL) {
#6 15.24       |                         ^~
#6 15.24 In file included from linux_sigar.c:30:
#6 15.24 linux_sigar.c: In function 'sigar_cpu_info_list_get':
#6 15.24 ../../include/sigar_util.h:147:18: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
#6 15.24   147 |     (sigar->ncpu < sigar->lcpu) ? sigar->ncpu : \
#6 15.24       |                  ^
#6 15.24 linux_sigar.c:1662:31: note: in expansion of macro 'sigar_cpu_socket_count'
#6 15.24  1662 |         info->total_sockets = sigar_cpu_socket_count(sigar);
#6 15.24       |                               ^~~~~~~~~~~~~~~~~~~~~~
#6 15.24 linux_sigar.c: In function 'sigar_nfs_v2_get':
#6 15.24 linux_sigar.c:2238:29: warning: passing argument 2 of 'sigar_proc_nfs_gets' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2238 |                             "proc2", buffer, sizeof(buffer));
#6 15.24       |                             ^~~~~~~
#6 15.24 linux_sigar.c:2210:50: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2210 | static int sigar_proc_nfs_gets(char *file, char *tok,
#6 15.24       |                                            ~~~~~~^~~
#6 15.24 In file included from linux_sigar.c:30:
#6 15.24 linux_sigar.c: In function 'sigar_nfs_client_v2_get':
#6 15.24 ../../include/sigar_util.h:60:22: warning: passing argument 1 of 'sigar_nfs_v2_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24    60 | #define PROC_FS_ROOT "/proc/"
#6 15.24       |                      ^~~~~~~~
#6 15.24 linux_sigar.c:2271:29: note: in expansion of macro 'PROC_FS_ROOT'
#6 15.24  2271 |     return sigar_nfs_v2_get(PROC_FS_ROOT "net/rpc/nfs",
#6 15.24       |                             ^~~~~~~~~~~~
#6 15.24 linux_sigar.c:2233:35: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2233 | static int sigar_nfs_v2_get(char *file, sigar_nfs_v2_t *nfs)
#6 15.24       |                             ~~~~~~^~~~
#6 15.24 In file included from linux_sigar.c:30:
#6 15.24 linux_sigar.c: In function 'sigar_nfs_server_v2_get':
#6 15.24 ../../include/sigar_util.h:60:22: warning: passing argument 1 of 'sigar_nfs_v2_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24    60 | #define PROC_FS_ROOT "/proc/"
#6 15.24       |                      ^~~~~~~~
#6 15.24 linux_sigar.c:2278:29: note: in expansion of macro 'PROC_FS_ROOT'
#6 15.24  2278 |     return sigar_nfs_v2_get(PROC_FS_ROOT "net/rpc/nfsd",
#6 15.24       |                             ^~~~~~~~~~~~
#6 15.24 linux_sigar.c:2233:35: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2233 | static int sigar_nfs_v2_get(char *file, sigar_nfs_v2_t *nfs)
#6 15.24       |                             ~~~~~~^~~~
#6 15.24 linux_sigar.c: In function 'sigar_nfs_v3_get':
#6 15.24 linux_sigar.c:2287:29: warning: passing argument 2 of 'sigar_proc_nfs_gets' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2287 |                             "proc3", buffer, sizeof(buffer));
#6 15.24       |                             ^~~~~~~
#6 15.24 linux_sigar.c:2210:50: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2210 | static int sigar_proc_nfs_gets(char *file, char *tok,
#6 15.24       |                                            ~~~~~~^~~
#6 15.24 In file included from linux_sigar.c:30:
#6 15.24 linux_sigar.c: In function 'sigar_nfs_client_v3_get':
#6 15.24 ../../include/sigar_util.h:60:22: warning: passing argument 1 of 'sigar_nfs_v3_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24    60 | #define PROC_FS_ROOT "/proc/"
#6 15.24       |                      ^~~~~~~~
#6 15.24 linux_sigar.c:2324:29: note: in expansion of macro 'PROC_FS_ROOT'
#6 15.24  2324 |     return sigar_nfs_v3_get(PROC_FS_ROOT "net/rpc/nfs",
#6 15.24       |                             ^~~~~~~~~~~~
#6 15.24 linux_sigar.c:2282:35: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2282 | static int sigar_nfs_v3_get(char *file, sigar_nfs_v3_t *nfs)
#6 15.24       |                             ~~~~~~^~~~
#6 15.24 In file included from linux_sigar.c:30:
#6 15.24 linux_sigar.c: In function 'sigar_nfs_server_v3_get':
#6 15.24 ../../include/sigar_util.h:60:22: warning: passing argument 1 of 'sigar_nfs_v3_get' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24    60 | #define PROC_FS_ROOT "/proc/"
#6 15.24       |                      ^~~~~~~~
#6 15.24 linux_sigar.c:2331:29: note: in expansion of macro 'PROC_FS_ROOT'
#6 15.24  2331 |     return sigar_nfs_v3_get(PROC_FS_ROOT "net/rpc/nfsd",
#6 15.24       |                             ^~~~~~~~~~~~
#6 15.24 linux_sigar.c:2282:35: note: expected 'char *' but argument is of type 'const char *'
#6 15.24  2282 | static int sigar_nfs_v3_get(char *file, sigar_nfs_v3_t *nfs)
#6 15.24       |                             ~~~~~~^~~~
#6 15.24 linux_sigar.c: In function 'get_hw_type':
#6 15.24 linux_sigar.c:2341:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2341 |         return "ax25";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2343:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2343 |         return "ec";
#6 15.24       |                ^~~~
#6 15.24 linux_sigar.c:2345:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2345 |         return "ether";
#6 15.24       |                ^~~~~~~
#6 15.24 linux_sigar.c:2347:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2347 |         return "fddi";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2349:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2349 |         return "dlci";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2351:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2351 |         return "frad";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2353:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2353 |         return "hdlc";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2355:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2355 |         return "lapb";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2357:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2357 |         return "hippi";
#6 15.24       |                ^~~~~~~
#6 15.24 linux_sigar.c:2359:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2359 |         return "irda";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2361:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2361 |         return "loop";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2363:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2363 |         return "netrom";
#6 15.24       |                ^~~~~~~~
#6 15.24 linux_sigar.c:2365:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2365 |         return "ppp";
#6 15.24       |                ^~~~~
#6 15.24 linux_sigar.c:2367:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2367 |         return "rose";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2369:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2369 |         return "sit";
#6 15.24       |                ^~~~~
#6 15.24 linux_sigar.c:2371:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2371 |         return "slip";
#6 15.24       |                ^~~~~~
#6 15.24 linux_sigar.c:2373:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2373 |         return "cslip";
#6 15.24       |                ^~~~~~~
#6 15.24 linux_sigar.c:2375:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2375 |         return "slip6";
#6 15.24       |                ^~~~~~~
#6 15.24 linux_sigar.c:2377:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2377 |         return "cslip6";
#6 15.24       |                ^~~~~~~~
#6 15.24 linux_sigar.c:2379:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2379 |         return "adaptive";
#6 15.24       |                ^~~~~~~~~~
#6 15.24 linux_sigar.c:2381:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2381 |         return "tr";
#6 15.24       |                ^~~~
#6 15.24 linux_sigar.c:2383:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2383 |         return "tr";
#6 15.24       |                ^~~~
#6 15.24 linux_sigar.c:2385:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2385 |         return "tunnel";
#6 15.24       |                ^~~~~~~~
#6 15.24 linux_sigar.c:2387:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2387 |         return "x25";
#6 15.24       |                ^~~~~
#6 15.24 linux_sigar.c:2389:16: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#6 15.24  2389 |         return "unknown";
#6 15.24       |                ^~~~~~~~~
#6 15.24 linux_sigar.c: In function 'generic_vendor_parse':
#6 15.24 linux_sigar.c:2592:21: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
#6 15.24  2592 |             if (len > sizeof(info->vendor_version)) {
#6 15.24       |                     ^
#6 15.24 linux_sigar.c: At top level:
#6 15.24 cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
#6 15.24 cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
#6 15.24 cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
#6 15.24 compiling rbsigar.c
#6 15.24 rbsigar.c:652:10: fatal error: ./rbsigar_generated.rx: No such file or directory
#6 15.24   652 | #include "./rbsigar_generated.rx"
#6 15.24       |          ^~~~~~~~~~~~~~~~~~~~~~~~
#6 15.24 compilation terminated.
#6 15.24 make: *** [Makefile:246: rbsigar.o] Error 1
#6 15.24 
#6 15.24 make failed, exit code 2
#6 15.24 
#6 15.24 Gem files will remain installed in /usr/local/bundle/gems/kostya-sigar-2.0.10 for inspection.
#6 15.24 Results logged to /usr/local/bundle/extensions/x86_64-linux-musl/3.0.0/kostya-sigar-2.0.10/gem_make.out
------
executor failed running [/bin/sh -c gem update --system &&     gem install eye]: exit code: 1

Here is example Dockerfile which will help you reproduce the problem, run it with:

docker build .
FROM ruby:3.0.6-alpine3.16

RUN apk update && apk upgrade && apk add --update --no-cache build-base gcc libstdc++ bash tzdata icu-data-full ruby-dev file wget curl vim git openssh-client imagemagick-dev imagemagick postgresql-dev shared-mime-info curl-dev

RUN gem update --system && \
    gem install eye

What am I missing? How to fix that?

@kostya
Copy link
Owner

kostya commented Feb 5, 2024

hi, I think you need add perl, because rbsigar_generated.rx in gem 'kostya-sigar', generated by it.

@phoenix-gi
Copy link
Author

Thanks! Installing perl fixed this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants