Skip to content

Error installing semacode on Ruby 2.4.1 #3

@AndrewRayCode

Description

@AndrewRayCode

The specific error seems to be:

$ rvm list
rvm rubies

=> ruby-2.4.1 [ x86_64 ]

$ gem install semacode -v '0.7.4'

It fails to install, with the error:

semacode.c:243:44: error: no member named 'len' in 'struct RString'

Full stack trace:

 gem install semacode -v '0.7.4'

    ERROR:  Error installing semacode:
        ERROR: Failed to build gem native extension.

        current directory: /Users/andy/.rvm/gems/ruby-2.4.1/gems/semacode-0.7.4/ext
    /Users/andy/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20170822-15344-2ocgoi.rb extconf.rb
    creating Makefile

    current directory: /Users/andy/.rvm/gems/ruby-2.4.1/gems/semacode-0.7.4/ext
    make "DESTDIR=" clean

    current directory: /Users/andy/.rvm/gems/ruby-2.4.1/gems/semacode-0.7.4/ext
    make "DESTDIR="
    compiling iec16022ecc200.c
    iec16022ecc200.c:45:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    10, 10, 10, 10, 3, 3, 5,     //
    ^~~~~~~~~~~~~~~~~~~~~~~
    {                      }
    iec16022ecc200.c:46:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        12, 12, 12, 12, 5, 5, 7,  //
        ^~~~~~~~~~~~~~~~~~~~~~~
        {                      }
    iec16022ecc200.c:47:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        14, 14, 14, 14, 8, 8, 10, //
        ^~~~~~~~~~~~~~~~~~~~~~~~
        {                       }
    iec16022ecc200.c:48:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        16, 16, 16, 16, 12, 12, 12,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:49:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        18, 18, 18, 18, 18, 18, 14,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:50:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        20, 20, 20, 20, 22, 22, 18,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:51:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        22, 22, 22, 22, 30, 30, 20,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:52:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        24, 24, 24, 24, 36, 36, 24,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:53:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        26, 26, 26, 26, 44, 44, 28,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:54:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        32, 32, 16, 16, 62, 62, 36,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:55:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        36, 36, 18, 18, 86, 86, 42,       //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        {                         }
    iec16022ecc200.c:56:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        40, 40, 20, 20, 114, 114, 48,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:57:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        44, 44, 22, 22, 144, 144, 56,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:58:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        48, 48, 24, 24, 174, 174, 68,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:59:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        52, 52, 26, 26, 204, 102, 42,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:60:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        64, 64, 16, 16, 280, 140, 56,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:61:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        72, 72, 18, 18, 368, 92, 36,      //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                          }
    iec16022ecc200.c:62:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        80, 80, 20, 20, 456, 114, 48,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:63:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        88, 88, 22, 22, 576, 144, 56,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:64:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        96, 96, 24, 24, 696, 174, 68,     //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                           }
    iec16022ecc200.c:65:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        104, 104, 26, 26, 816, 136, 56,   //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                             }
    iec16022ecc200.c:66:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        120, 120, 20, 20, 1050, 175, 68,  //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                              }
    iec16022ecc200.c:67:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        132, 132, 22, 22, 1304, 163, 62,  //
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                              }
    iec16022ecc200.c:68:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        144, 144, 24, 24, 1558, 156, 62,  // 156*4+155*2
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {                              }
    iec16022ecc200.c:69:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        0                         // terminate
        ^
        {}
    iec16022ecc200.c:284:80: warning: data argument not used by format string [-Wformat-extra-args]
                        rb_raise(rb_eArgError,  "cannot encode character in X12", c);
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    iec16022ecc200.c:288:22: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    out[p++] = 1;
                        ^~~~
    iec16022ecc200.c:289:22: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    out[p++] = 30;
                        ^~~~
    iec16022ecc200.c:293:22: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    out[p++] = ((w - e) + 3) % 40;
                        ^~~~
    iec16022ecc200.c:299:80: warning: data argument not used by format string [-Wformat-extra-args]
                        rb_raise(rb_eArgError,  "cannot encode character in X12", c);
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    iec16022ecc200.c:304:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        out[p++] = 0;
                            ^~~~
    iec16022ecc200.c:305:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        out[p++] = c;
                            ^~~~
    iec16022ecc200.c:311:28: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            out[p++] = 1;
                            ^~~~
    iec16022ecc200.c:312:28: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            out[p++] = (w - s2);
                            ^~~~
    iec16022ecc200.c:318:31: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            out[p++] = 2;
                                ^~~~
    iec16022ecc200.c:319:31: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            out[p++] = (w - s3);
                                ^~~~
    iec16022ecc200.c:323:89: warning: data argument not used by format string [-Wformat-extra-args]
                            rb_raise(rb_eRuntimeError,  "this should not be happening!", c);
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    iec16022ecc200.c:330:22: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    out[p++] = 0; // shift 1 pad at end
                        ^~~~
    iec16022ecc200.c:239:26: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
    if (strlen (encoding) < sl)
        ~~~~~~~~~~~~~~~~~ ^ ~~
    iec16022ecc200.c:478:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    0, 1, 1, 1, 1, 2,            // From E_ASCII
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:479:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    1, 0, 2, 2, 2, 3,            // From E_C40
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:480:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    1, 2, 0, 2, 2, 3,            // From E_TEXT
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:481:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    1, 2, 2, 0, 2, 3,            // From E_X12
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:482:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    1, 2, 2, 2, 0, 3,            // From E_EDIFACT
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:483:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    0, 1, 1, 1, 1, 0,            // From E_BINARY
    ^~~~~~~~~~~~~~~~
    {               }
    iec16022ecc200.c:498:9: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'void *' [-Wint-conversion]
    VALUE rb_str = NULL;
            ^        ~~~~
    iec16022ecc200.c:509:14: warning: returning 'const char [1]' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        return "";                // no length
                ^~
    iec16022ecc200.c:530:28: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_ASCII][e]) < bl || !bl))
                            ^~
    iec16022ecc200.c:530:54: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_ASCII][e]) < bl || !bl))
                                                        ^~
    iec16022ecc200.c:530:81: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_ASCII][e]) < bl || !bl))
                                                                                    ^~
    iec16022ecc200.c:538:16: warning: array subscript is of type 'char' [-Wchar-subscripts]
            enc[p][b].s += enc[p + sl][b].s;
                ^~
    iec16022ecc200.c:538:36: warning: array subscript is of type 'char' [-Wchar-subscripts]
            enc[p][b].s += enc[p + sl][b].s;
                                    ^~
    iec16022ecc200.c:568:31: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_C40][e]) < bl || !bl))
                                ^~
    iec16022ecc200.c:568:57: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_C40][e]) < bl || !bl))
                                                            ^~
    iec16022ecc200.c:568:82: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_C40][e]) < bl || !bl))
                                                                                    ^~
    iec16022ecc200.c:581:19: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                    ^~
    iec16022ecc200.c:581:39: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                                        ^~
    iec16022ecc200.c:612:31: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_TEXT][e]) < bl || !bl))
                                ^~
    iec16022ecc200.c:612:57: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_TEXT][e]) < bl || !bl))
                                                            ^~
    iec16022ecc200.c:612:83: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_TEXT][e]) < bl || !bl))
                                                                                    ^~
    iec16022ecc200.c:625:19: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                    ^~
    iec16022ecc200.c:625:39: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                                        ^~
    iec16022ecc200.c:649:31: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_X12][e]) < bl || !bl))
                                ^~
    iec16022ecc200.c:649:57: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_X12][e]) < bl || !bl))
                                                            ^~
    iec16022ecc200.c:649:82: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + switchcost[E_X12][e]) < bl || !bl))
                                                                                    ^~
    iec16022ecc200.c:662:19: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                    ^~
    iec16022ecc200.c:662:39: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + sl][b].s;
                                        ^~
    iec16022ecc200.c:675:48: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (e != E_EDIFACT && enc[p + 1][e].t && ((t = 2 + enc[p + 1][e].t + switchcost[E_ASCII][e]) < bl || !bl))       // E_ASCII as allowed for unlatch
                                                ^~
    iec16022ecc200.c:675:77: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (e != E_EDIFACT && enc[p + 1][e].t && ((t = 2 + enc[p + 1][e].t + switchcost[E_ASCII][e]) < bl || !bl))       // E_ASCII as allowed for unlatch
                                                                                ^~
    iec16022ecc200.c:675:104: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (e != E_EDIFACT && enc[p + 1][e].t && ((t = 2 + enc[p + 1][e].t + switchcost[E_ASCII][e]) < bl || !bl))       // E_ASCII as allowed for unlatch
                                                                                                        ^~
    iec16022ecc200.c:689:51: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    if (e != E_EDIFACT && enc[p + 2][e].t && ((t = 3 + enc[p + 2][e].t + switchcost[E_ASCII][e]) < bl || !bl))    // E_ASCII as allowed for unlatch
                                                    ^~
    iec16022ecc200.c:689:80: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    if (e != E_EDIFACT && enc[p + 2][e].t && ((t = 3 + enc[p + 2][e].t + switchcost[E_ASCII][e]) < bl || !bl))    // E_ASCII as allowed for unlatch
                                                                                ^~
    iec16022ecc200.c:689:107: warning: array subscript is of type 'char' [-Wchar-subscripts]
                    if (e != E_EDIFACT && enc[p + 2][e].t && ((t = 3 + enc[p + 2][e].t + switchcost[E_ASCII][e]) < bl || !bl))    // E_ASCII as allowed for unlatch
                                                                                                            ^~
    iec16022ecc200.c:703:54: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        if (e != E_EDIFACT && enc[p + 3][e].t && ((t = 3 + enc[p + 3][e].t + switchcost[E_ASCII][e]) < bl || !bl)) // E_ASCII as allowed for unlatch
                                                        ^~
    iec16022ecc200.c:703:83: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        if (e != E_EDIFACT && enc[p + 3][e].t && ((t = 3 + enc[p + 3][e].t + switchcost[E_ASCII][e]) < bl || !bl)) // E_ASCII as allowed for unlatch
                                                                                    ^~
    iec16022ecc200.c:703:110: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        if (e != E_EDIFACT && enc[p + 3][e].t && ((t = 3 + enc[p + 3][e].t + switchcost[E_ASCII][e]) < bl || !bl)) // E_ASCII as allowed for unlatch
                                                                                                                ^~
    iec16022ecc200.c:718:39: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            if (enc[p + 4][e].t && ((t = 3 + enc[p + 4][e].t + switchcost[E_EDIFACT][e]) < bl || !bl))
                                        ^~
    iec16022ecc200.c:718:68: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            if (enc[p + 4][e].t && ((t = 3 + enc[p + 4][e].t + switchcost[E_EDIFACT][e]) < bl || !bl))
                                                                    ^~
    iec16022ecc200.c:718:97: warning: array subscript is of type 'char' [-Wchar-subscripts]
                            if (enc[p + 4][e].t && ((t = 3 + enc[p + 4][e].t + switchcost[E_EDIFACT][e]) < bl || !bl))
                                                                                                    ^~
    iec16022ecc200.c:737:19: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + bs][b].s;
                    ^~
    iec16022ecc200.c:737:39: warning: array subscript is of type 'char' [-Wchar-subscripts]
                enc[p][b].s += enc[p + bs][b].s;
                                        ^~
    iec16022ecc200.c:742:24: warning: array subscript is of type 'char' [-Wchar-subscripts]
            if (enc[p + 1][e].t
                        ^~
    iec16022ecc200.c:743:33: warning: array subscript is of type 'char' [-Wchar-subscripts]
                && ((t = enc[p + 1][e].t + switchcost[E_BINARY][e] + ((e == E_BINARY && enc[p + 1][e].t == 249) ? 1 : 0)) < bl || !bl))
                                    ^~
    iec16022ecc200.c:743:61: warning: array subscript is of type 'char' [-Wchar-subscripts]
                && ((t = enc[p + 1][e].t + switchcost[E_BINARY][e] + ((e == E_BINARY && enc[p + 1][e].t == 249) ? 1 : 0)) < bl || !bl))
                                                                ^~
    iec16022ecc200.c:743:96: warning: array subscript is of type 'char' [-Wchar-subscripts]
                && ((t = enc[p + 1][e].t + switchcost[E_BINARY][e] + ((e == E_BINARY && enc[p + 1][e].t == 249) ? 1 : 0)) < bl || !bl))
                                                                                                ^~
    iec16022ecc200.c:751:16: warning: array subscript is of type 'char' [-Wchar-subscripts]
            enc[p][b].s += enc[p + 1][b].s;
                ^~
    iec16022ecc200.c:751:35: warning: array subscript is of type 'char' [-Wchar-subscripts]
            enc[p][b].s += enc[p + 1][b].s;
                                    ^~
    iec16022ecc200.c:764:23: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p][e].t && ((t = enc[p][e].t + switchcost[cur][e]) < m || t == m && e == cur || !m))
                        ^~
    iec16022ecc200.c:764:44: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p][e].t && ((t = enc[p][e].t + switchcost[cur][e]) < m || t == m && e == cur || !m))
                                            ^~
    iec16022ecc200.c:764:62: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p][e].t && ((t = enc[p][e].t + switchcost[cur][e]) < m || t == m && e == cur || !m))
                                                                ^~~~
    iec16022ecc200.c:764:67: warning: array subscript is of type 'char' [-Wchar-subscripts]
                if (enc[p][e].t && ((t = enc[p][e].t + switchcost[cur][e]) < m || t == m && e == cur || !m))
                                                                    ^~
    iec16022ecc200.c:770:20: warning: array subscript is of type 'char' [-Wchar-subscripts]
            m = enc[p][b].s;
                    ^~
    iec16022ecc200.c:772:27: warning: array subscript is of type 'char' [-Wchar-subscripts]
                *lenp = enc[p][b].t;
                            ^~
    iec16022ecc200.c:774:35: warning: array subscript is of type 'char' [-Wchar-subscripts]
                encoding[p++] = encchr[b];
                                    ^~
    iec16022ecc200.c:498:9: warning: unused variable 'rb_str' [-Wunused-variable]
    VALUE rb_str = NULL;
            ^
    iec16022ecc200.c:785:35: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
            int barcodelen = strlen(barcode) + 1;
                ~~~~~~~~~~   ~~~~~~~~~~~~~~~~^~~
    iec16022ecc200.c:908:12: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        grid = ALLOC_N(char, W * H);
            ^ ~~~~~~~~~~~~~~~~~~~~
    97 warnings generated.
    compiling reedsol.c
    compiling semacode.c
    semacode.c:61:3: warning: implicit declaration of function 'iec16022init' is invalid in C99 [-Wimplicit-function-declaration]
    iec16022init(&semacode->width, &semacode->height, message);
    ^
    semacode.c:96:28: warning: 'bzero' call operates on objects of type 'semacode_t' (aka 'struct semacode_t') while the size is based on a different type 'semacode_t *' (aka 'struct semacode_t *') [-Wsizeof-pointer-memaccess]
        bzero(semacode, sizeof(semacode));
            ~~~~~~~~         ^~~~~~~~
    semacode.c:96:28: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
        bzero(semacode, sizeof(semacode));
                            ^~~~~~~~
    semacode.c:129:27: error: no member named 'len' in 'struct RString'
    encode_string(semacode, StringValueLen(message), StringValuePtr(message));
                            ^~~~~~~~~~~~~~~~~~~~~~~
    ./semacode.h:26:56: note: expanded from macro 'StringValueLen'
    #define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    semacode.c:239:20: warning: equality comparison result unused [-Wunused-comparison]
        semacode->data == NULL;
        ~~~~~~~~~~~~~~~^~~~~~~
    semacode.c:239:20: note: use '=' to turn this equality comparison into an assignment
        semacode->data == NULL;
                    ^~
                    =
    semacode.c:243:44: error: no member named 'len' in 'struct RString'
    DATA_PTR(self) = encode_string(semacode, StringValueLen(message), StringValuePtr(message));
                                            ^~~~~~~~~~~~~~~~~~~~~~~
    ./semacode.h:26:56: note: expanded from macro 'StringValueLen'
    #define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    3 warnings and 2 errors generated.
    make: *** [semacode.o] Error 1

    make failed, exit code 2

    Gem files will remain installed in /Users/andy/.rvm/gems/ruby-2.4.1/gems/semacode-0.7.4 for inspection.
    Results logged to /Users/andy/.rvm/gems/ruby-2.4.1/extensions/x86_64-darwin-16/2.4.0/semacode-0.7.4/gem_make.out

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