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 install in ruby:3.0.3-bullseye Docker image #79

Open
SumOys opened this issue Jan 3, 2022 · 1 comment
Open

Fails to install in ruby:3.0.3-bullseye Docker image #79

SumOys opened this issue Jan 3, 2022 · 1 comment

Comments

@SumOys
Copy link

SumOys commented Jan 3, 2022

If I run the following command:

docker run --rm -it docker.io/library/ruby:3.0.3-bullseye gem install fast_excel

I get the following error as the installer attempts to compile libxlsxwriter/third_party/minizip.

Fetching fast_excel-0.4.0.gem
Fetching ffi-1.15.4.gem
Building native extensions. This could take a while...
Successfully installed ffi-1.15.4
Building native extensions. This could take a while...
ERROR:  Error installing fast_excel:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/fast_excel-0.4.0
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r ./siteconf20220103-1-kw768g.rb extconf.rb

current directory: /usr/local/bundle/gems/fast_excel-0.4.0
make DESTDIR\= clean
make[1]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/src'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/src'
# @make clean -C test/unit
# @make clean -C test/functional/src
# @make clean -C examples
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/tmpfileplus'
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/tmpfileplus'
make[1]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'

current directory: /usr/local/bundle/gems/fast_excel-0.4.0
make DESTDIR\=
# @echo "Compiling ext/text_width ..."
# rake compile
Compiling libxlsxwriter ...
make[1]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make[2]: Entering directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
In file included from ioapi.h:46,
                 from ioapi.c:29:
/usr/include/zlib.h:98:5: error: unknown type name ‘alloc_func’
   98 |     alloc_func zalloc;  /* used to allocate the internal state */
      |     ^~~~~~~~~~
/usr/include/zlib.h:99:5: error: unknown type name ‘free_func’
   99 |     free_func  zfree;   /* used to free the internal state */
      |     ^~~~~~~~~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:135:51: note: in expansion of macro ‘OF’
  135 | typedef voidpf   (ZCALLBACK *open_file_func)      OF((voidpf opaque, const char* filename, int mode));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:136:51: note: in expansion of macro ‘OF’
  136 | typedef uLong    (ZCALLBACK *read_file_func)      OF((voidpf opaque, voidpf stream, void* buf, uLong size));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:137:51: note: in expansion of macro ‘OF’
  137 | typedef uLong    (ZCALLBACK *write_file_func)     OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:138:51: note: in expansion of macro ‘OF’
  138 | typedef int      (ZCALLBACK *close_file_func)     OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:139:51: note: in expansion of macro ‘OF’
  139 | typedef int      (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:141:51: note: in expansion of macro ‘OF’
  141 | typedef long     (ZCALLBACK *tell_file_func)      OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:142:51: note: in expansion of macro ‘OF’
  142 | typedef long     (ZCALLBACK *seek_file_func)      OF((voidpf opaque, voidpf stream, uLong offset, int origin));
      |                                                   ^~
In file included from ioapi.c:29:
ioapi.h:148:5: error: unknown type name ‘open_file_func’
  148 |     open_file_func      zopen_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:149:5: error: unknown type name ‘read_file_func’
  149 |     read_file_func      zread_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:150:5: error: unknown type name ‘write_file_func’
  150 |     write_file_func     zwrite_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:151:5: error: unknown type name ‘tell_file_func’
  151 |     tell_file_func      ztell_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:152:5: error: unknown type name ‘seek_file_func’
  152 |     seek_file_func      zseek_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:153:5: error: unknown type name ‘close_file_func’
  153 |     close_file_func     zclose_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:154:5: error: unknown type name ‘testerror_file_func’
  154 |     testerror_file_func zerror_file;
      |     ^~~~~~~~~~~~~~~~~~~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:158:51: note: in expansion of macro ‘OF’
  158 | typedef ZPOS64_T (ZCALLBACK *tell64_file_func)    OF((voidpf opaque, voidpf stream));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:159:51: note: in expansion of macro ‘OF’
  159 | typedef long     (ZCALLBACK *seek64_file_func)    OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
      |                                                   ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:160:51: note: in expansion of macro ‘OF’
  160 | typedef voidpf   (ZCALLBACK *open64_file_func)    OF((voidpf opaque, const void* filename, int mode));
      |                                                   ^~
In file included from ioapi.c:29:
ioapi.h:164:5: error: unknown type name ‘open64_file_func’
  164 |     open64_file_func    zopen64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:165:5: error: unknown type name ‘read_file_func’
  165 |     read_file_func      zread_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:166:5: error: unknown type name ‘write_file_func’
  166 |     write_file_func     zwrite_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:167:5: error: unknown type name ‘tell64_file_func’
  167 |     tell64_file_func    ztell64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:168:5: error: unknown type name ‘seek64_file_func’
  168 |     seek64_file_func    zseek64_file;
      |     ^~~~~~~~~~~~~~~~
ioapi.h:169:5: error: unknown type name ‘close_file_func’
  169 |     close_file_func     zclose_file;
      |     ^~~~~~~~~~~~~~~
ioapi.h:170:5: error: unknown type name ‘testerror_file_func’
  170 |     testerror_file_func zerror_file;
      |     ^~~~~~~~~~~~~~~~~~~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:174:28: note: in expansion of macro ‘OF’
  174 | void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
      |                            ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:175:26: note: in expansion of macro ‘OF’
  175 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
      |                          ^~
In file included from ioapi.c:29:
ioapi.h:181:5: error: unknown type name ‘open_file_func’
  181 |     open_file_func      zopen32_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:182:5: error: unknown type name ‘tell_file_func’
  182 |     tell_file_func      ztell32_file;
      |     ^~~~~~~~~~~~~~
ioapi.h:183:5: error: unknown type name ‘seek_file_func’
  183 |     seek_file_func      zseek32_file;
      |     ^~~~~~~~~~~~~~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:194:21: note: in expansion of macro ‘OF’
  194 | voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
      |                     ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:195:22: note: in expansion of macro ‘OF’
  195 | long    call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
      |                      ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.h:196:23: note: in expansion of macro ‘OF’
  196 | ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
      |                       ^~
ioapi.c: In function ‘call_zopen64’:
ioapi.c:33:46: warning: comparison between pointer and integer
   33 |     if (pfilefunc->zfile_func64.zopen64_file != NULL)
      |                                              ^~
ioapi.c:34:17: error: invalid type argument of unary ‘*’ (have ‘int’)
   34 |         return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:37:17: error: invalid type argument of unary ‘*’ (have ‘int’)
   37 |         return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function ‘call_zseek64’:
ioapi.c:43:46: warning: comparison between pointer and integer
   43 |     if (pfilefunc->zfile_func64.zseek64_file != NULL)
      |                                              ^~
ioapi.c:44:17: error: invalid type argument of unary ‘*’ (have ‘int’)
   44 |         return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:51:21: error: invalid type argument of unary ‘*’ (have ‘int’)
   51 |             return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function ‘call_ztell64’:
ioapi.c:57:46: warning: comparison between pointer and integer
   57 |     if (pfilefunc->zfile_func64.zseek64_file != NULL)
      |                                              ^~
ioapi.c:58:17: error: invalid type argument of unary ‘*’ (have ‘int’)
   58 |         return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c:61:29: error: invalid type argument of unary ‘*’ (have ‘int’)
   61 |         uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
ioapi.c: In function ‘fill_zlib_filefunc64_32_def_from_filefunc32’:
ioapi.c:71:48: warning: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
   71 |     p_filefunc64_32->zfile_func64.zopen64_file = NULL;
      |                                                ^
ioapi.c:76:48: warning: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
   76 |     p_filefunc64_32->zfile_func64.ztell64_file = NULL;
      |                                                ^
ioapi.c:77:48: warning: assignment to ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
   77 |     p_filefunc64_32->zfile_func64.zseek64_file = NULL;
      |                                                ^
ioapi.c: At top level:
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:87:42: note: in expansion of macro ‘OF’
   87 | static voidpf  ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
      |                                          ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:88:42: note: in expansion of macro ‘OF’
   88 | static uLong   ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
      |                                          ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:89:43: note: in expansion of macro ‘OF’
   89 | static uLong   ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
      |                                           ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:90:45: note: in expansion of macro ‘OF’
   90 | static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
      |                                             ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:91:44: note: in expansion of macro ‘OF’
   91 | static long    ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
      |                                            ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:92:43: note: in expansion of macro ‘OF’
   92 | static int     ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
      |                                           ^~
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_Z_OF’
ioapi.c:93:43: note: in expansion of macro ‘OF’
   93 | static int     ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
      |                                           ^~
ioapi.c: In function ‘fill_fopen_filefunc’:
ioapi.c:237:36: warning: assignment to ‘int’ from ‘void * (*)(void *, const char *, int)’ makes integer from pointer without a cast [-Wint-conversion]
  237 |     pzlib_filefunc_def->zopen_file = fopen_file_func;
      |                                    ^
ioapi.c:238:36: warning: assignment to ‘int’ from ‘uLong (*)(void *, void *, void *, uLong)’ {aka ‘long unsigned int (*)(void *, void *, void *, long unsigned int)’} makes integer from pointer without a cast [-Wint-conversion]
  238 |     pzlib_filefunc_def->zread_file = fread_file_func;
      |                                    ^
ioapi.c:239:37: warning: assignment to ‘int’ from ‘uLong (*)(void *, void *, const void *, uLong)’ {aka ‘long unsigned int (*)(void *, void *, const void *, long unsigned int)’} makes integer from pointer without a cast [-Wint-conversion]
  239 |     pzlib_filefunc_def->zwrite_file = fwrite_file_func;
      |                                     ^
ioapi.c:240:36: warning: assignment to ‘int’ from ‘long int (*)(void *, void *)’ makes integer from pointer without a cast [-Wint-conversion]
  240 |     pzlib_filefunc_def->ztell_file = ftell_file_func;
      |                                    ^
ioapi.c:241:36: warning: assignment to ‘int’ from ‘long int (*)(void *, void *, uLong,  int)’ {aka ‘long int (*)(void *, void *, long unsigned int,  int)’} makes integer from pointer without a cast [-Wint-conversion]
  241 |     pzlib_filefunc_def->zseek_file = fseek_file_func;
      |                                    ^
ioapi.c:242:37: warning: assignment to ‘int’ from ‘int (*)(void *, void *)’ makes integer from pointer without a cast [-Wint-conversion]
  242 |     pzlib_filefunc_def->zclose_file = fclose_file_func;
      |                                     ^
ioapi.c:243:37: warning: assignment to ‘int’ from ‘int (*)(void *, void *)’ makes integer from pointer without a cast [-Wint-conversion]
  243 |     pzlib_filefunc_def->zerror_file = ferror_file_func;
      |                                     ^
ioapi.c: In function ‘fill_fopen64_filefunc’:
ioapi.c:249:38: warning: assignment to ‘int’ from ‘void * (*)(void *, const void *, int)’ makes integer from pointer without a cast [-Wint-conversion]
  249 |     pzlib_filefunc_def->zopen64_file = fopen64_file_func;
      |                                      ^
ioapi.c:250:36: warning: assignment to ‘int’ from ‘uLong (*)(void *, void *, void *, uLong)’ {aka ‘long unsigned int (*)(void *, void *, void *, long unsigned int)’} makes integer from pointer without a cast [-Wint-conversion]
  250 |     pzlib_filefunc_def->zread_file = fread_file_func;
      |                                    ^
ioapi.c:251:37: warning: assignment to ‘int’ from ‘uLong (*)(void *, void *, const void *, uLong)’ {aka ‘long unsigned int (*)(void *, void *, const void *, long unsigned int)’} makes integer from pointer without a cast [-Wint-conversion]
  251 |     pzlib_filefunc_def->zwrite_file = fwrite_file_func;
      |                                     ^
ioapi.c:252:38: warning: assignment to ‘int’ from ‘ZPOS64_T (*)(void *, void *)’ {aka ‘long long unsigned int (*)(void *, void *)’} makes integer from pointer without a cast [-Wint-conversion]
  252 |     pzlib_filefunc_def->ztell64_file = ftell64_file_func;
      |                                      ^
ioapi.c:253:38: warning: assignment to ‘int’ from ‘long int (*)(void *, void *, ZPOS64_T,  int)’ {aka ‘long int (*)(void *, void *, long long unsigned int,  int)’} makes integer from pointer without a cast [-Wint-conversion]
  253 |     pzlib_filefunc_def->zseek64_file = fseek64_file_func;
      |                                      ^
ioapi.c:254:37: warning: assignment to ‘int’ from ‘int (*)(void *, void *)’ makes integer from pointer without a cast [-Wint-conversion]
  254 |     pzlib_filefunc_def->zclose_file = fclose_file_func;
      |                                     ^
ioapi.c:255:37: warning: assignment to ‘int’ from ‘int (*)(void *, void *)’ makes integer from pointer without a cast [-Wint-conversion]
  255 |     pzlib_filefunc_def->zerror_file = ferror_file_func;
      |                                     ^
make[2]: *** [Makefile:43: ioapi.o] Error 1
make[2]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter/third_party/minizip'
make[1]: *** [Makefile:23: all] Error 2
make[1]: Leaving directory '/usr/local/bundle/gems/fast_excel-0.4.0/libxlsxwriter'
make: *** [Makefile:16: all] Error 2

make failed, exit code 2

If I use the same container to build the latest version of libxlsxwriter, it builds fine, so maybe this is an outdated dependency?

docker run -it -v $PWD:/src -v /run/docker.sock:/run/docker.sock docker.io/library/ruby:3.0.3-bullseye /bin/bash
root@3ae5a9c9eb2f:/# git clone https://github.com/jmcnamara/libxlsxwriter.git
Cloning into 'libxlsxwriter'...
remote: Enumerating objects: 15525, done.
remote: Counting objects: 100% (2247/2247), done.
remote: Compressing objects: 100% (597/597), done.
remote: Total 15525 (delta 1707), reused 2136 (delta 1642), pack-reused 13278
Receiving objects: 100% (15525/15525), 24.14 MiB | 8.02 MiB/s, done.
Resolving deltas: 100% (12213/12213), done.
root@3ae5a9c9eb2f:/# cd libxlsxwriter/
root@3ae5a9c9eb2f:/libxlsxwriter# make
make[1]: Entering directory '/libxlsxwriter/third_party/minizip'
make[1]: Leaving directory '/libxlsxwriter/third_party/minizip'
make[1]: Entering directory '/libxlsxwriter/third_party/tmpfileplus'
make[1]: Leaving directory '/libxlsxwriter/third_party/tmpfileplus'
make[1]: Entering directory '/libxlsxwriter/third_party/md5'
make[1]: Leaving directory '/libxlsxwriter/third_party/md5'
make[1]: Entering directory '/libxlsxwriter/src'
make[1]: Leaving directory '/libxlsxwriter/src'
@SumOys
Copy link
Author

SumOys commented Jan 4, 2022

This should probably be closed as non-reproducible. I got the above Docker command to work on Void Linux and Debian. It only fails on Gentoo on Docker 20.10.9 and 20.10.12-r1. Gentoo being Gentoo, it could just be my machine/build. I did boot my machine with the Void Linux kernel to ensure it wasn't a kernel issue. I ended up wiping my work laptop and replacing Gentoo with Void. 🤷

This issue also isn't present with the current release of libxlswriter, so if it ever gets updated in the fast_excel dependencies, this issue would go away as well.

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

1 participant