smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

build libzmq with libsodium support #319

Closed smanders closed 3 years ago

smanders commented 3 years ago

once libsodium has been added https://github.com/smanders/externpro/issues/317

smanders commented 3 years ago

some libzmq unit tests fail with sodium as part of the build

smanders@bppro21-09:/bpvol/externpro/_bldn/xpbase/Build/libzmq_Release (xp21.04)
$ cd xpbase/Build/libzmq_Release/
$ make test

results summary

Total Test time (real) =  90.86 sec

The following tests did not run:
         73 - test_connect_null_fuzzer (Skipped)
         74 - test_bind_null_fuzzer (Skipped)
         75 - test_connect_fuzzer (Skipped)
         76 - test_bind_fuzzer (Skipped)
         78 - test_connect_curve_fuzzer (Skipped)
         79 - test_bind_curve_fuzzer (Skipped)
         80 - test_z85_decode_fuzzer (Skipped)
         97 - test_address_tipc (Skipped)
         98 - test_pair_tipc (Skipped)
         99 - test_reqrep_device_tipc (Skipped)
        100 - test_reqrep_tipc (Skipped)
        102 - test_sub_forward_tipc (Skipped)
        103 - test_connect_delay_tipc (Skipped)
        104 - test_shutdown_stress_tipc (Skipped)

The following tests FAILED:
         30 - test_security_zap (ILLEGAL)
         51 - test_heartbeats (ILLEGAL)
         64 - test_sodium (ILLEGAL)
         77 - test_security_curve (ILLEGAL)
        112 - unittest_curve_encoding (ILLEGAL)
Errors while running CTest
make: *** [test] Error 8

these tests pass when building libzmq without sodium

$ cd /bpvol/externpro/_bldrepo/xpbase/Source/libzmq_repo/
$ mkdir _bld
$ cd _bld
$ cmake -DBUILD_SHARED:BOOL=OFF ..
$ make -j5 -k
$ make test

results summary

100% tests passed, 0 tests failed out of 128

Total Test time (real) = 192.69 sec

The following tests did not run:
         73 - test_connect_null_fuzzer (Skipped)
         74 - test_bind_null_fuzzer (Skipped)
         75 - test_connect_fuzzer (Skipped)
         76 - test_bind_fuzzer (Skipped)
         78 - test_connect_curve_fuzzer (Skipped)
         79 - test_bind_curve_fuzzer (Skipped)
         80 - test_z85_decode_fuzzer (Skipped)
         97 - test_address_tipc (Skipped)
         98 - test_pair_tipc (Skipped)
         99 - test_reqrep_device_tipc (Skipped)
        100 - test_reqrep_tipc (Skipped)
        102 - test_sub_forward_tipc (Skipped)
        103 - test_connect_delay_tipc (Skipped)
        104 - test_shutdown_stress_tipc (Skipped)
smanders commented 3 years ago

the question is whether the issue is with sodium or with the unit test code

I wouldn't be surprised if the failure is because of the unit test code, since it appears the maintainers aren't actively building libzmq with sodium (via cmake, at least), since I found that I needed to patch their test cmake to fix link errors https://github.com/zeromq/libzmq/commit/96a1bdc890192d78e2461a54bdd8588e246bdae6

but there are some things I should probably try to figure out if there are issues with how sodium has been built (see issue https://github.com/smanders/externpro/issues/317 which introduces cmake build support to sodium)

smanders commented 3 years ago

current libzmq patch https://github.com/zeromq/libzmq/compare/v4.3.4...smanders:xp4.3.4

smanders commented 3 years ago

completed with commit referenced above a separate task will determine if the unit test failure needs to be addressed with changes to sodium and/or libzmq