linux-fscrypt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 1.4: test suite does not build
@ 2021-09-18 13:20 Tomasz Kłoczko
  2021-09-18 20:04 ` [fsverity-utils] " Eric Biggers
  0 siblings, 1 reply; 6+ messages in thread
From: Tomasz Kłoczko @ 2021-09-18 13:20 UTC (permalink / raw)
  To: linux-fscrypt

Hi,

Looks like it some issue with test suite because it does not link correctly

+ cd fsverity-utils-1.4
+ CFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections'
+ CXXFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections'
+ FFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS CC CXX FC AR NM RANLIB
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
Rebuilding due to new settings
/usr/bin/gcc -o lib/enable.o -c -Iinclude -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -fvisibility=hidden lib/enable.c
/usr/bin/gcc -o programs/test_hash_algs.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/test_hash_algs.c
/usr/bin/gcc -o programs/test_sign_digest.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/test_sign_digest.c
/usr/bin/gcc -o programs/cmd_measure.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/cmd_measure.c
/usr/bin/gcc -o programs/cmd_enable.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/cmd_enable.c
/usr/bin/gcc -o programs/cmd_sign.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/cmd_sign.c
/usr/bin/gcc -o programs/cmd_digest.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/cmd_digest.c
/usr/bin/gcc -o lib/utils.o -c -Iinclude -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -fvisibility=hidden lib/utils.c
/usr/bin/gcc -o programs/cmd_dump_metadata.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/cmd_dump_metadata.c
/usr/bin/gcc -o programs/fsverity.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/fsverity.c
/usr/bin/gcc -o lib/hash_algs.o -c -Iinclude -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -fvisibility=hidden lib/hash_algs.c
/usr/bin/gcc -o lib/compute_digest.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -fvisibility=hidden lib/compute_digest.c
/usr/bin/gcc -o programs/utils.o -c -Iinclude -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/utils.c
/usr/bin/gcc -o programs/test_compute_digest.o -c -Iinclude
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -Wall -Wundef
-Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections programs/test_compute_digest.c
/usr/bin/gcc -o lib/sign_digest.o -c -Iinclude -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -fvisibility=hidden lib/sign_digest.c
lib/sign_digest.c: In function 'load_pkcs11_private_key':
lib/sign_digest.c:351:9: warning: 'ENGINE_by_id' is deprecated: Since
OpenSSL 3.0 [-Wdeprecated-declarations]
  351 |         engine = ENGINE_by_id("dynamic");
      |         ^~~~~~
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
lib/sign_digest.c:356:9: warning: 'ENGINE_ctrl_cmd_string' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  356 |         if (!ENGINE_ctrl_cmd_string(engine, "SO_PATH",
      |         ^~
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:358:13: warning: 'ENGINE_ctrl_cmd_string' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  358 |             !ENGINE_ctrl_cmd_string(engine, "ID", "pkcs11", 0) ||
      |             ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:359:13: warning: 'ENGINE_ctrl_cmd_string' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  359 |             !ENGINE_ctrl_cmd_string(engine, "LIST_ADD", "1", 0) ||
      |             ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:360:13: warning: 'ENGINE_ctrl_cmd_string' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  360 |             !ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0) ||
      |             ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:361:13: warning: 'ENGINE_ctrl_cmd_string' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  361 |             !ENGINE_ctrl_cmd_string(engine, "MODULE_PATH",
      |             ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:479:5: note: declared here
  479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
const char *arg,
      |     ^~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:363:13: warning: 'ENGINE_init' is deprecated: Since
OpenSSL 3.0 [-Wdeprecated-declarations]
  363 |             !ENGINE_init(engine)) {
      |             ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:620:27: note: declared here
  620 | OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
      |                           ^~~~~~~~~~~
lib/sign_digest.c:365:17: warning: 'ENGINE_free' is deprecated: Since
OpenSSL 3.0 [-Wdeprecated-declarations]
  365 |                 ENGINE_free(engine);
      |                 ^~~~~~~~~~~
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
lib/sign_digest.c:368:9: warning: 'ENGINE_load_private_key' is
deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  368 |         *pkey_ret = ENGINE_load_private_key(engine,
sig_params->pkcs11_keyid,
      |         ^
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
lib/sign_digest.c:370:9: warning: 'ENGINE_finish' is deprecated: Since
OpenSSL 3.0 [-Wdeprecated-declarations]
  370 |         ENGINE_finish(engine);
      |         ^~~~~~~~~~~~~
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:628:27: note: declared here
  628 | OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
      |                           ^~~~~~~~~~~~~
lib/sign_digest.c:371:9: warning: 'ENGINE_free' is deprecated: Since
OpenSSL 3.0 [-Wdeprecated-declarations]
  371 |         ENGINE_free(engine);
      |         ^~~~~~~~~~~
In file included from lib/sign_digest.c:23:
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
/usr/bin/gcc-ar cr libfsverity.a lib/compute_digest.o lib/enable.o
lib/hash_algs.o lib/sign_digest.o lib/utils.o
/usr/bin/gcc -o test_hash_algs programs/test_hash_algs.o
programs/utils.o -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lcrypto
/usr/bin/ld: programs/test_hash_algs.o: in function `main':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:21:
undefined reference to `libfsverity_get_digest_size'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:22:
undefined reference to `libfsverity_get_hash_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:23:
undefined reference to `libfsverity_find_hash_alg_by_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:24:
undefined reference to `libfsverity_find_hash_alg_by_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:26:
undefined reference to `libfsverity_get_digest_size'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:27:
undefined reference to `libfsverity_get_hash_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:29:
undefined reference to `libfsverity_get_digest_size'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:31:
undefined reference to `libfsverity_get_hash_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:33:
undefined reference to `libfsverity_find_hash_alg_by_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:36:
undefined reference to `libfsverity_get_digest_size'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:38:
undefined reference to `libfsverity_get_hash_name'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_hash_algs.c:40:
undefined reference to `libfsverity_find_hash_alg_by_name'
/usr/bin/ld: programs/utils.o: in function `install_libfsverity_error_handler':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/utils.c:102:
undefined reference to `libfsverity_set_error_callback'
collect2: error: ld returned 1 exit status
make: *** [Makefile:194: test_hash_algs] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/gcc -o test_sign_digest programs/test_sign_digest.o
programs/utils.o -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lcrypto
/usr/bin/ld: programs/test_sign_digest.o: in function `main':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_sign_digest.c:41:
undefined reference to `libfsverity_sign_digest'
/usr/bin/ld: programs/utils.o: in function `install_libfsverity_error_handler':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/utils.c:102:
undefined reference to `libfsverity_set_error_callback'
collect2: error: ld returned 1 exit status
make: *** [Makefile:194: test_sign_digest] Error 1
/usr/bin/gcc -o test_compute_digest programs/test_compute_digest.o
programs/utils.o -Wall -Wundef -Wdeclaration-after-statement
-Wimplicit-fallthrough -Wmissing-field-initializers
-Wmissing-prototypes -Wstrict-prototypes -Wunused-parameter -Wvla -O2
-g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lcrypto
/usr/bin/ld: programs/test_compute_digest.o: in function `main':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:419:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:423:
undefined reference to `libfsverity_get_digest_size'
/usr/bin/ld: programs/test_compute_digest.o: in function `fix_digest_and_print':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:165:
undefined reference to `libfsverity_get_hash_name'
/usr/bin/ld: programs/test_compute_digest.o: in function `test_invalid_params':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:202:
undefined reference to `libfsverity_set_error_callback'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:204:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:210:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:211:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:212:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: /home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:217:
undefined reference to `libfsverity_compute_digest'
/usr/bin/ld: programs/test_compute_digest.o:/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/test_compute_digest.c:219:
more undefined references to `libfsverity_compute_digest' follow
/usr/bin/ld: programs/utils.o: in function `install_libfsverity_error_handler':
/home/tkloczko/rpmbuild/BUILD/fsverity-utils-1.4/programs/utils.c:102:
undefined reference to `libfsverity_set_error_callback'
collect2: error: ld returned 1 exit status
make: *** [Makefile:194: test_compute_digest] Error 1
/usr/bin/gcc -o fsverity programs/utils.o programs/cmd_digest.o
programs/cmd_sign.o programs/fsverity.o programs/cmd_dump_metadata.o
programs/cmd_enable.o programs/cmd_measure.o libfsverity.a -Wall
-Wundef -Wdeclaration-after-statement -Wimplicit-fallthrough
-Wmissing-field-initializers -Wmissing-prototypes -Wstrict-prototypes
-Wunused-parameter -Wvla -O2 -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fdata-sections
-ffunction-sections -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lcrypto

BTW I have two questions:
1) Is it possible to move the git repo to github or gitlab to provide
a better communication platform? (tickets and github provides email
notifications when a new release is tagged) or at least organise a
live mirror with enabled issue tracker?
2) Would you accept a patch providing build fsverity-utils build
framework using GNU autotools or meson?

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [fsverity-utils] 1.4: test suite does not build
  2021-09-18 13:20 1.4: test suite does not build Tomasz Kłoczko
@ 2021-09-18 20:04 ` Eric Biggers
  2021-09-20 20:05   ` Aleksander Adamowski
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Biggers @ 2021-09-18 20:04 UTC (permalink / raw)
  To: Aleksander Adamowski, Tomasz Kłoczko; +Cc: linux-fscrypt

On Sat, Sep 18, 2021 at 02:20:45PM +0100, Tomasz Kłoczko wrote:
> Hi,
> 
> Looks like it some issue with test suite because it does not link correctly
> 
> + cd fsverity-utils-1.4

It looks like you're actually building from the master branch, not 1.4?
1.4 doesn't have the code that is causing warnings below.

> lib/sign_digest.c: In function 'load_pkcs11_private_key':
> lib/sign_digest.c:351:9: warning: 'ENGINE_by_id' is deprecated: Since
> OpenSSL 3.0 [-Wdeprecated-declarations]
>   351 |         engine = ENGINE_by_id("dynamic");
>       |         ^~~~~~
> In file included from lib/sign_digest.c:23:
> /usr/include/openssl/engine.h:336:31: note: declared here
>   336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
>       |                               ^~~~~~~~~~~~
> lib/sign_digest.c:356:9: warning: 'ENGINE_ctrl_cmd_string' is
> deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
>   356 |         if (!ENGINE_ctrl_cmd_string(engine, "SO_PATH",
>       |         ^~
> In file included from lib/sign_digest.c:23:
> /usr/include/openssl/engine.h:479:5: note: declared here
>   479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name,
> const char *arg,
>       |     ^~~~~~~~~~~~~~~~~~~~~~
> lib/sign_digest.c:358:13: warning: 'ENGINE_ctrl_cmd_string' is
> deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
>   358 |             !ENGINE_ctrl_cmd_string(engine, "ID", "pkcs11", 0) ||

Aleksander, can you look into these?

- Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [fsverity-utils] 1.4: test suite does not build
  2021-09-18 20:04 ` [fsverity-utils] " Eric Biggers
@ 2021-09-20 20:05   ` Aleksander Adamowski
  2021-09-20 21:19     ` Eric Biggers
  0 siblings, 1 reply; 6+ messages in thread
From: Aleksander Adamowski @ 2021-09-20 20:05 UTC (permalink / raw)
  To: Eric Biggers, Tomasz Kłoczko; +Cc: linux-fscrypt

On Saturday, September 18, 2021 1:04 PM, Eric Biggers wrote:
> Aleksander, can you look into these?

These look like compiler warnings, why did they break the build?

The reason for the warnings is that the Engines API that we use with OpenSSL <=
1.1 has started to be deprecated with OpenSSL release 3.0.

The replacement that OpenSSL offers is called "Providers":
https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Engines-and-METHOD-APIs

Unfortunately, the Providers API is only available starting with version 3.0,
the same version that deprecates Engines:

https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_load.html

So, our options here are:

1. Tolerate deprecation warnings from the compiler until the OpenSSL version
that provides the new replacement API is widespread enough to stop supporting
OpenSSL versions <= 1.1 (I think this is the most reasonable approach, after
all that's how deprecation mechanisms are meant to be used).

2. Use a bunch of preprocessor conditional #ifdefs to support both OpenSSL
pre-3.0 with Engines and post-3.0 with Providers. This would make code pretty
messy IMHO, but should be doable. I can start working on a patch if we get
consensus; however, my opinion is that we should withhold from that until
OpenSSL 3 is the standard release on mainstream distros.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [fsverity-utils] 1.4: test suite does not build
  2021-09-20 20:05   ` Aleksander Adamowski
@ 2021-09-20 21:19     ` Eric Biggers
  2021-09-20 21:52       ` Aleksander Adamowski
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Biggers @ 2021-09-20 21:19 UTC (permalink / raw)
  To: Aleksander Adamowski; +Cc: Tomasz Kłoczko, linux-fscrypt

On Mon, Sep 20, 2021 at 08:05:25PM +0000, Aleksander Adamowski wrote:
> On Saturday, September 18, 2021 1:04 PM, Eric Biggers wrote:
> > Aleksander, can you look into these?
> 
> These look like compiler warnings, why did they break the build?
> 
> The reason for the warnings is that the Engines API that we use with OpenSSL <=
> 1.1 has started to be deprecated with OpenSSL release 3.0.
> 
> The replacement that OpenSSL offers is called "Providers":
> https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Engines-and-METHOD-APIs
> 
> Unfortunately, the Providers API is only available starting with version 3.0,
> the same version that deprecates Engines:
> 
> https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_load.html
> 
> So, our options here are:
> 
> 1. Tolerate deprecation warnings from the compiler until the OpenSSL version
> that provides the new replacement API is widespread enough to stop supporting
> OpenSSL versions <= 1.1 (I think this is the most reasonable approach, after
> all that's how deprecation mechanisms are meant to be used).
> 
> 2. Use a bunch of preprocessor conditional #ifdefs to support both OpenSSL
> pre-3.0 with Engines and post-3.0 with Providers. This would make code pretty
> messy IMHO, but should be doable. I can start working on a patch if we get
> consensus; however, my opinion is that we should withhold from that until
> OpenSSL 3 is the standard release on mainstream distros.
> 

Sorry, it looks like I misread Tomasz's email; the build break wasn't from those
warnings but rather from the test programs not being linked to libfsverity.
Tomasz, are you using the provided Makefile?  In the Makefile, the test programs
are linked correctly, so this isn't an issue.  How can I reproduce your issue?

Aleksander: there still shouldn't be any compiler warnings.  In my test script
(scripts/run-tests.sh) I actually use -Werror.  If there isn't a good way to
avoid these deprecation warnings (and I'd prefer not to have code that's
conditional on different OpenSSL versions), we can just add
-Wno-deprecated-declarations to the Makefile for now.

- Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [fsverity-utils] 1.4: test suite does not build
  2021-09-20 21:19     ` Eric Biggers
@ 2021-09-20 21:52       ` Aleksander Adamowski
  2021-09-22 18:57         ` Eric Biggers
  0 siblings, 1 reply; 6+ messages in thread
From: Aleksander Adamowski @ 2021-09-20 21:52 UTC (permalink / raw)
  To: Eric Biggers; +Cc: Tomasz Kłoczko, linux-fscrypt

On Mon, Sep 20, 2021 at 2:19 PM, Eric Biggers wrote:

> Aleksander: there still shouldn't be any compiler warnings.  In my test script
> (scripts/run-tests.sh) I actually use -Werror.  If there isn't a good way to
> avoid these deprecation warnings (and I'd prefer not to have code that's
> conditional on different OpenSSL versions), we can just add
> -Wno-deprecated-declarations to the Makefile for now.

I think -Wno-deprecated-declarations is the best option for now.

I took a few looks around and the community isn't ready for OpenSSL 3.0 just
yet with PKCS#11 support.

The release happened just 2 weeks ago.

Projects like libp11 (https://github.com/OpenSC/libp11), the PKCS#11 engine
implementation for OpenSSL, haven't yet caught up to that fact - there's no
trace of discussion about migrating to the Providers API anywhere on their
mailing lists or issue tracker.

The official OpenSSL release does not come with a PKCS#11 provider, and it only
acknowledges a potential future existence of such in a single sentence in their
design doc (https://www.openssl.org/docs/OpenSSL300Design.html):

"For example a PKCS#11 provider may opt out of caching because its algorithms
may become available and unavailable over time."

Since this is a completely new, redesigned API, I expect it to take some time
before alternatives to existing Engine-based implementations arise.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [fsverity-utils] 1.4: test suite does not build
  2021-09-20 21:52       ` Aleksander Adamowski
@ 2021-09-22 18:57         ` Eric Biggers
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Biggers @ 2021-09-22 18:57 UTC (permalink / raw)
  To: Aleksander Adamowski, Tomasz Kłoczko; +Cc: linux-fscrypt

On Mon, Sep 20, 2021 at 09:52:55PM +0000, Aleksander Adamowski wrote:
> On Mon, Sep 20, 2021 at 2:19 PM, Eric Biggers wrote:
> 
> > Aleksander: there still shouldn't be any compiler warnings.  In my test script
> > (scripts/run-tests.sh) I actually use -Werror.  If there isn't a good way to
> > avoid these deprecation warnings (and I'd prefer not to have code that's
> > conditional on different OpenSSL versions), we can just add
> > -Wno-deprecated-declarations to the Makefile for now.
> 
> I think -Wno-deprecated-declarations is the best option for now.
> 
> I took a few looks around and the community isn't ready for OpenSSL 3.0 just
> yet with PKCS#11 support.
> 
> The release happened just 2 weeks ago.
> 
> Projects like libp11 (https://github.com/OpenSC/libp11), the PKCS#11 engine
> implementation for OpenSSL, haven't yet caught up to that fact - there's no
> trace of discussion about migrating to the Providers API anywhere on their
> mailing lists or issue tracker.
> 
> The official OpenSSL release does not come with a PKCS#11 provider, and it only
> acknowledges a potential future existence of such in a single sentence in their
> design doc (https://www.openssl.org/docs/OpenSSL300Design.html):
> 
> "For example a PKCS#11 provider may opt out of caching because its algorithms
> may become available and unavailable over time."
> 
> Since this is a completely new, redesigned API, I expect it to take some time
> before alternatives to existing Engine-based implementations arise.

I've pushed out a change which adds -Wno-deprecated-declarations.

Tomasz, I'd still appreciate any details on what actually caused the test
programs to not build for you, as I can't reproduce it myself.

- Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-22 18:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 13:20 1.4: test suite does not build Tomasz Kłoczko
2021-09-18 20:04 ` [fsverity-utils] " Eric Biggers
2021-09-20 20:05   ` Aleksander Adamowski
2021-09-20 21:19     ` Eric Biggers
2021-09-20 21:52       ` Aleksander Adamowski
2021-09-22 18:57         ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).