Opened 3 years ago

Closed 3 years ago

#63299 closed defect (fixed)

murk @0.3_2: build failure with openssl 1.1

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: murk

Description

I'm guessing this is probably due to a version incompatibility with openssl? (Warning: output is kinda long)

/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o checksum.o checksum.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o crypt.o crypt.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o read_buf.o read_buf.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o common.o common.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o cipher.o cipher.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o file.o file.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o murk.o murk.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o compress.o compress.c
/usr/bin/clang -arch x86_64 -c -g -Wall -I/opt/local/include -I/usr/local/include getopt/getopt_long.c
/usr/bin/clang -arch x86_64 -g -Wall -I/opt/local/include -I/usr/local/include   -c -o prog_config.o prog_config.c
/usr/bin/clang -arch x86_64 -c -g -Wall -I/opt/local/include -I/usr/local/include base64/base64.c
[make] Making bzip2 test program
/usr/bin/clang -arch x86_64 -o config/bzip_vars -g -Wall -I/opt/local/include -I/usr/local/include config/bzip_vars.c /opt/local/lib/libbz2.a 
[make] Building flockfile test program
/usr/bin/clang -arch x86_64 -o config/flockfile -g -Wall -I/opt/local/include -I/usr/local/include config/flockfile.c
getopt/getopt_long.c:411:26: warning: '&&' within '||' [-Wlogical-op-parentheses]
            optchar == (int)'-' && *place != '\0' ||
            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
getopt/getopt_long.c:411:26: note: place parentheses around the '&&' expression to silence this warning
            optchar == (int)'-' && *place != '\0' ||
                                ^
            (                                    )
getopt/getopt_long.c:104:19: warning: unused variable 'recargchar' [-Wunused-const-variable]
static const char recargchar[] = "option requires an argument -- %c";
                  ^
getopt/getopt_long.c:105:19: warning: unused variable 'recargstring' [-Wunused-const-variable]
static const char recargstring[] = "option requires an argument -- %s";
                  ^
getopt/getopt_long.c:106:19: warning: unused variable 'ambig' [-Wunused-const-variable]
static const char ambig[] = "ambiguous option -- %.*s";
                  ^
getopt/getopt_long.c:107:19: warning: unused variable 'noarg' [-Wunused-const-variable]
static const char noarg[] = "option doesn't take an argument -- %.*s";
                  ^
getopt/getopt_long.c:108:19: warning: unused variable 'illoptchar' [-Wunused-const-variable]
static const char illoptchar[] = "unknown option -- %c";
                  ^
getopt/getopt_long.c:109:19: warning: unused variable 'illoptstring' [-Wunused-const-variable]
static const char illoptstring[] = "unknown option -- %s";
                  ^
config/bzip_vars.c:83:8: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
   p = '\0';
       ^~~~
1 warning generated.
7 warnings generated.
checksum.c:94:19: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
      sum1 += buf[i];
                  ^
checksum.c:72:14: note: initialize the variable 'i' to silence this warning
   unsigned i;
             ^
              = 0
checksum.c:132:30: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
               entropy_bits, max_block_size); 
                             ^~~~~~~~~~~~~~
./common.h:74:44: note: expanded from macro 'VERBOSE_2'
             fprintf(stderr, format, arg1, arg2);           \
                             ~~~~~~        ^~~~
crypt.c:33:45: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
   if (0 == EVP_CipherFinal_ex(cipher->ctx, pout, (int *) &enc_len)) {
                                            ^~~~
/opt/local/include/openssl/evp.h:617:67: note: passing argument to parameter 'outm' here
__owur int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
                                                                  ^
crypt.c:81:34: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                           NULL, cipher->key, actual_iv,  1);
                                 ^~~~~~~~~~~
/opt/local/include/openssl/evp.h:611:55: note: passing argument to parameter 'key' here
                                 const unsigned char *key,
                                                      ^
crypt.c:81:47: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                           NULL, cipher->key, actual_iv,  1);
                                              ^~~~~~~~~
/opt/local/include/openssl/evp.h:612:55: note: passing argument to parameter 'iv' here
                                 const unsigned char *iv, int enc);
                                                      ^
crypt.c:105:43: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
   if (0 == EVP_CipherUpdate(cipher->ctx, to, 
                                          ^~
/opt/local/include/openssl/evp.h:613:65: note: passing argument to parameter 'out' here
__owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
                                                                ^
crypt.c:106:50: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                             (int *) &crypt_len, from, len)) {
                                                 ^~~~
/opt/local/include/openssl/evp.h:614:61: note: passing argument to parameter 'in' here
                            int *outl, const unsigned char *in, int inl);
                                                            ^
crypt.c:126:36: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                             NULL, cipher->key, iv,  0)) {
                                   ^~~~~~~~~~~
/opt/local/include/openssl/evp.h:611:55: note: passing argument to parameter 'key' here
                                 const unsigned char *key,
                                                      ^
crypt.c:126:49: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                             NULL, cipher->key, iv,  0)) {
                                                ^~
/opt/local/include/openssl/evp.h:612:55: note: passing argument to parameter 'iv' here
                                 const unsigned char *iv, int enc);
                                                      ^
crypt.c:142:15: error: variable has incomplete type 'EVP_MD_CTX' (aka 'struct evp_md_ctx_st')
   EVP_MD_CTX mdctx;
              ^
/opt/local/include/openssl/ossl_typ.h:92:16: note: forward declaration of 'struct evp_md_ctx_st'
typedef struct evp_md_ctx_st EVP_MD_CTX;
               ^
crypt.c:161:4: error: implicit declaration of function 'EVP_MD_CTX_cleanup' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   EVP_MD_CTX_cleanup(&mdctx);
   ^
cipher.c:41:18: error: invalid application of 'sizeof' to an incomplete type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
   cipher->ctx = XMALLOC(EVP_CIPHER_CTX, 1);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
./common.h:10:36: note: expanded from macro 'XMALLOC'
        ((type *) xmalloc ((num) * sizeof(type)))            
                                   ^     ~~~~~~
/opt/local/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'struct evp_cipher_ctx_st'
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
               ^
cipher.c:171:20: warning: passing 'char [9]' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   conf->salt,
                   ^~~~~~~~~~
/opt/local/include/openssl/evp.h:572:48: note: passing argument to parameter 'salt' here
                          const unsigned char *salt,
                                               ^
cipher.c:172:20: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   password, strlen(password), 
                   ^~~~~~~~
/opt/local/include/openssl/evp.h:573:48: note: passing argument to parameter 'data' here
                          const unsigned char *data, int datal, int count,
                                               ^
cipher.c:174:20: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   conf->cipher->key, conf->cipher->iv);
                   ^~~~~~~~~~~~~~~~~
/opt/local/include/openssl/evp.h:574:42: note: passing argument to parameter 'key' here
                          unsigned char *key, unsigned char *iv);
                                         ^
cipher.c:174:39: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   conf->cipher->key, conf->cipher->iv);
                                      ^~~~~~~~~~~~~~~~
/opt/local/include/openssl/evp.h:574:62: note: passing argument to parameter 'iv' here
                          unsigned char *key, unsigned char *iv);
                                                             ^
cipher.c:218:20: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   conf->keyword, keyword_len, 
                   ^~~~~~~~~~~~~
/opt/local/include/openssl/evp.h:573:48: note: passing argument to parameter 'data' here
                          const unsigned char *data, int datal, int count,
                                               ^
cipher.c:219:23: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   1, fake_key, fake_iv);
                      ^~~~~~~~
/opt/local/include/openssl/evp.h:574:42: note: passing argument to parameter 'key' here
                          unsigned char *key, unsigned char *iv);
                                         ^
cipher.c:219:33: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                   1, fake_key, fake_iv);
                                ^~~~~~~
/opt/local/include/openssl/evp.h:574:62: note: passing argument to parameter 'iv' here
                          unsigned char *key, unsigned char *iv);
                                                             ^
7 warnings and 1 error generated.
7 warnings and 2 errors generated.
2 warnings generated.
murk.c:106:33: warning: format specifies type 'unsigned int *' but the argument has type 'size_t *' (aka 'unsigned long *') [-Wformat]
            sscanf(optarg,"%u", &(conf.max_block_size));
                           ~~   ^~~~~~~~~~~~~~~~~~~~~~
                           %zu
make: *** [crypt.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [cipher.o] Error 1
file.c:115:18: warning: passing 'char [4]' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
   serial_uint32(lengthbuf, len);
                 ^~~~~~~~~
file.c:27:35: note: passing argument to parameter 'buf' here
void serial_uint32(unsigned char *buf, unsigned val)
                                  ^
murk.c:126:13: warning: array index 30 is past the end of the array (which contains 30 elements) [-Warray-bounds]
            cipher_name[CIPHER_TYPE_MAXLEN] = 0;
            ^           ~~~~~~~~~~~~~~~~~~
murk.c:74:4: note: array 'cipher_name' declared here
   char cipher_name[CIPHER_TYPE_MAXLEN];
   ^
murk.c:130:13: warning: array index 30 is past the end of the array (which contains 30 elements) [-Warray-bounds]
            digest_name[CIPHER_TYPE_MAXLEN] = 0;
            ^           ~~~~~~~~~~~~~~~~~~
murk.c:75:4: note: array 'digest_name' declared here
   char digest_name[CIPHER_TYPE_MAXLEN];
   ^
file.c:189:32: warning: passing 'unsigned char [4]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                               dump_crc, 4, 
                               ^~~~~~~~
./common.h:93:35: note: expanded from macro 'LASSERT'
         if (-1 == (ret = (-1 == (call)) ? -1 : ret))       \
                                  ^~~~
./pipe.h:28:35: note: passing argument to parameter here
pipe_encrypt(struct pipe *, char *, size_t, char *, size_t, size_t *);
                                  ^
file.c:199:54: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      VERBOSE_2("block @ %#08x, encrypt size %#08x", block_len, enc_len); 
                         ~~~~~                       ^~~~~~~~~
                         %#08zx
./common.h:74:38: note: expanded from macro 'VERBOSE_2'
             fprintf(stderr, format, arg1, arg2);           \
                             ~~~~~~  ^~~~
file.c:199:65: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      VERBOSE_2("block @ %#08x, encrypt size %#08x", block_len, enc_len); 
                                             ~~~~~              ^~~~~~~
                                             %#08zx
./common.h:74:44: note: expanded from macro 'VERBOSE_2'
             fprintf(stderr, format, arg1, arg2);           \
                             ~~~~~~        ^~~~
file.c:265:37: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
         file_crc = unserial_uint32(buf2 + block);
                                    ^~~~~~~~~~~~
file.c:38:41: note: passing argument to parameter 'buf' here
unsigned unserial_uint32(unsigned char *buf)
                                        ^
file.c:279:54: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      VERBOSE_2("block @ %#08x, encrypt size %#08x", block, read_in);
                         ~~~~~                       ^~~~~
                         %#08zx
./common.h:74:38: note: expanded from macro 'VERBOSE_2'
             fprintf(stderr, format, arg1, arg2);           \
                             ~~~~~~  ^~~~
file.c:279:61: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
      VERBOSE_2("block @ %#08x, encrypt size %#08x", block, read_in);
                                             ~~~~~          ^~~~~~~
                                             %#08zx
./common.h:74:44: note: expanded from macro 'VERBOSE_2'
             fprintf(stderr, format, arg1, arg2);           \
                             ~~~~~~        ^~~~
file.c:322:7: warning: variable 'out_fh' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
      LASSERT( rbuf_new(rbuf, BUFFER_SIZE, inname)); 
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common.h:93:14: note: expanded from macro 'LASSERT'
         if (-1 == (ret = (-1 == (call)) ? -1 : ret))       \
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file.c:338:10: note: uninitialized use occurs here
   close(out_fh);
         ^~~~~~
file.c:322:7: note: remove the 'if' if its condition is always false
      LASSERT( rbuf_new(rbuf, BUFFER_SIZE, inname)); 
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common.h:93:10: note: expanded from macro 'LASSERT'
         if (-1 == (ret = (-1 == (call)) ? -1 : ret))       \
         ^
file.c:307:19: note: initialize the variable 'out_fh' to silence this warning
   int      out_fh;  
                  ^
                   = 0
file.c:374:7: warning: variable 'out_fh' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
      LASSERT( in_fh = open_file(inname, (O_RDONLY), 00644, STDIN_FILENO));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common.h:93:14: note: expanded from macro 'LASSERT'
         if (-1 == (ret = (-1 == (call)) ? -1 : ret))       \
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file.c:387:10: note: uninitialized use occurs here
   close(out_fh);
         ^~~~~~
file.c:374:7: note: remove the 'if' if its condition is always false
      LASSERT( in_fh = open_file(inname, (O_RDONLY), 00644, STDIN_FILENO));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common.h:93:10: note: expanded from macro 'LASSERT'
         if (-1 == (ret = (-1 == (call)) ? -1 : ret))       \
         ^
file.c:353:19: note: initialize the variable 'out_fh' to silence this warning
            out_fh;  
                  ^
                   = 0
3 warnings generated.
9 warnings generated.
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_murk/murk/work/murk-0.3'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_murk/murk/work/murk-0.3" && /usr/bin/make -j16 -w all CC="/usr/bin/clang -arch x86_64" 
Exit code: 2

Attachments (1)

murk_main.log (59.2 KB) - added by cooljeanius (Eric Gallager) 3 years ago.
main.log for murk

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by cooljeanius (Eric Gallager)

Attachment: murk_main.log added

main.log for murk

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: murk @0.3_2: multiple compilation errorsmurk @0.3_2: build failure with openssl 1.1

Yes, this software is from 2005 so it predates openssl 1.1 by over a decade.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 4c73bed4b6a5538c6d68f7128604890423b5dbda/macports-ports (master):

murk: Use openssl 1.0; link with bz2 dynamically

Closes: #63299

Note: See TracTickets for help on using tickets.