Package Details: mfterm-git r144.c05f2ee-1

Git Clone URL: https://aur.archlinux.org/mfterm-git.git (read-only, click to copy)
Package Base: mfterm-git
Description: Terminal for working with Mifare Classic 1-4k tags
Upstream URL: https://github.com/4ZM/mfterm
Keywords: libnfc mfterm nfc
Licenses: GPL
Submitter: llorephie
Maintainer: llorephie
Last Packager: llorephie
Votes: 0
Popularity: 0.000000
First Submitted: 2017-04-18 16:14 (UTC)
Last Updated: 2023-10-14 21:16 (UTC)

Latest Comments

llorephie commented on 2023-10-14 21:18 (UTC)

Thanks for fix suggestion, PKGBUILD updated. Additionaly applied '-Wno-error=stringop-truncation'

Currently I'm not using this, feel free to request orphan.

dreieck commented on 2023-10-14 20:54 (UTC)

The following needs to be added to build():

  CFLAGS+=' -Wno-error=deprecated-declarations -Wno-error=lto-type-mismatch -Wno-error=stringop-overread -Wno-error=stringop-overflow='
  export CFLAGS

Otherwise there are build errors:

gcc -DHAVE_CONFIG_H -I.    -g -Wall -Wconversion -std=c99 -Werror -march=native -mtune=native -Ofast -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -fstack-clash-protection -fcf-protection -flto=auto -MT mac.o -MD -MP -MF .deps/mac.Tpo -c -o mac.o mac.c
mac.c: In function ‘compute_mac’:
mac.c:48:3: error: ‘DES_set_key_unchecked’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   48 |   DES_set_key_unchecked(&des_key, &schedule);
      |   ^~~~~~~~~~~~~~~~~~~~~
In file included from mac.c:20:
/usr/include/openssl/des.h:192:6: note: declared here
  192 | void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);
      |      ^~~~~~~~~~~~~~~~~~~~~
mac.c:54:3: error: ‘DES_ncbc_encrypt’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   54 |   DES_ncbc_encrypt(padded_input, output, length, &schedule, &ivec, 1);
      |   ^~~~~~~~~~~~~~~~
/usr/include/openssl/des.h:93:6: note: declared here
   93 | void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,
      |      ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:595: mac.o] Error 1
gcc -g -Wall -Wconversion -std=c99 -Werror -march=native -mtune=native -Ofast -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -fstack-clash-protection -fcf-protection -flto=auto -Wno-error=deprecated-declarations  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -o mfterm mfterm.o term_cmd.o util.o tag.o mifare.o mifare_ctrl.o dictionary.o spec_syntax.o mac.o libdp.a libsp.a -lreadline -lnfc -lcrypto -lnfc 
spec_parser.y:35:7: error: type of ‘sp_lex’ does not match original declaration [-Werror=lto-type-mismatch]
   35 |   int sp_lex(void);
      |       ^
libsp_a-spec_tokenizer.c:1004:1: note: type mismatch in parameter 1
 1004 |  */
      | ^
libsp_a-spec_tokenizer.c:1004:1: note: ‘sp_lex’ was previously declared here
dictionary_parser.l:43:18: error: type of ‘read_key’ does not match original declaration [-Werror=lto-type-mismatch]
   43 |                  read_key(key_token, dp_text);
      |                  ^
tag.c:377:10: note: return value type mismatch
  377 | uint8_t* read_key(uint8_t* key, const char* str) {
      |          ^
tag.c:377:10: note: ‘read_key’ was previously declared here
tag.c:377:10: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
spec_parser.y:217:31: error: type of ‘strtol’ does not match original declaration [-Werror=lto-type-mismatch]
  217 | : DEC_NUM { $$ = strtol($1, NULL, 10); free($1); }
      |                               ^
/usr/include/stdlib.h:177:17: note: return value type mismatch
  177 | extern long int strtol (const char *__restrict __nptr,
      |                 ^
/usr/include/stdlib.h:177:17: note: type ‘long int’ should match type ‘int’
/usr/include/stdlib.h:177:17: note: ‘strtol’ was previously declared here
/usr/include/stdlib.h:177:17: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
gcc -g -Wall -Wconversion -std=c99 -Werror -march=native -mtune=native -Ofast -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -fstack-clash-protection -fcf-protection -flto=auto -Wno-error=deprecated-declarations -Wno-error=lto-type-mismatch  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -o mfterm mfterm.o term_cmd.o util.o tag.o mifare.o mifare_ctrl.o dictionary.o spec_syntax.o mac.o libdp.a libsp.a -lreadline -lnfc -lcrypto -lnfc 
spec_parser.y:35:7: warning: type of ‘sp_lex’ does not match original declaration [-Wlto-type-mismatch]
   35 |   int sp_lex(void);
      |       ^
libsp_a-spec_tokenizer.c:1004:1: note: type mismatch in parameter 1
 1004 |  */
      | ^
libsp_a-spec_tokenizer.c:1004:1: note: ‘sp_lex’ was previously declared here
dictionary_parser.l:43:18: warning: type of ‘read_key’ does not match original declaration [-Wlto-type-mismatch]
   43 |                  read_key(key_token, dp_text);
      |                  ^
tag.c:377:10: note: return value type mismatch
  377 | uint8_t* read_key(uint8_t* key, const char* str) {
      |          ^
tag.c:377:10: note: ‘read_key’ was previously declared here
tag.c:377:10: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
spec_parser.y:217:31: warning: type of ‘strtol’ does not match original declaration [-Wlto-type-mismatch]
  217 | : DEC_NUM { $$ = strtol($1, NULL, 10); free($1); }
      |                               ^
/usr/include/stdlib.h:177:17: note: return value type mismatch
  177 | extern long int strtol (const char *__restrict __nptr,
      |                 ^
/usr/include/stdlib.h:177:17: note: type ‘long int’ should match type ‘int’
/usr/include/stdlib.h:177:17: note: ‘strtol’ was previously declared here
/usr/include/stdlib.h:177:17: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
mac.c: In function ‘compute_mac.constprop’:
mac.c:58:15: error: ‘__builtin_memcpy’ reading 8 bytes from a region of size 0 [-Werror=stringop-overread]
   58 |     output[i] = output[length - 8 + i];
      |               ^
mac.c:78:24: note: at offset 16 into source object ‘output’ of size 8
   78 |   static unsigned char output[8];
      |                        ^
mac.c:60:15: error: ‘__builtin_memset’ writing 16 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
   60 |     output[i] = 0;
      |               ^
mac.c:78:24: note: at offset 8 into destination object ‘output’ of size 8
   78 |   static unsigned char output[8];
      |                        ^
lto1: all warnings being treated as errors
make[3]: *** [/tmp/ccJVqCzJ.mk:2: /tmp/ccwIS2Oe.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed

Regards and thanks for maintaining!

dreieck commented on 2023-10-14 20:38 (UTC)

Please add provides=('mfterm') and conflicts=('mfterm').
Thanks for maintaining!