BelledonneCommunications / bctoolbox

Linphone.org mirror for bctoolbox (git://git.linphone.org/bctoolbox.git)
http://linphone.org
GNU General Public License v3.0
25 stars 33 forks source link

Build Error when building on MacOS #21

Closed RaphaelMaschinsen closed 1 year ago

RaphaelMaschinsen commented 1 year ago

I'm building on MacOS 11.7 (The CXX compiler identification is AppleClang 13.0.0.13000029). After running cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_TESTS=NO -DENABLE_TESTS_COMPONENT=NO make fails with:

/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1038:45: error: unused parameter 'ssl_ctx' [-Werror,-Wunused-parameter]
void bctbx_ssl_set_mtu(bctbx_ssl_context_t *ssl_ctx, uint16_t mtu) {
                                            ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1038:63: error: unused parameter 'mtu' [-Werror,-Wunused-parameter]
void bctbx_ssl_set_mtu(bctbx_ssl_context_t *ssl_ctx, uint16_t mtu) {
                                                              ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1041:91: error: unused parameter 'ssl_ctx' [-Werror,-Wunused-parameter]
bctbx_dtls_srtp_profile_t bctbx_ssl_get_dtls_srtp_protection_profile(bctbx_ssl_context_t *ssl_ctx) {
                                                                                          ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1404:66: error: unused parameter 'ssl_ctx' [-Werror,-Wunused-parameter]
int32_t bctbx_ssl_get_dtls_srtp_key_material(bctbx_ssl_config_t *ssl_ctx, uint8_t *output, size_t *output_length) {
                                                                 ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1404:84: error: unused parameter 'output' [-Werror,-Wunused-parameter]
int32_t bctbx_ssl_get_dtls_srtp_key_material(bctbx_ssl_config_t *ssl_ctx, uint8_t *output, size_t *output_length) {
                                                                                   ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1409:80: error: unused parameter 'ssl_config' [-Werror,-Wunused-parameter]
int32_t bctbx_ssl_config_set_dtls_srtp_protection_profiles(bctbx_ssl_config_t *ssl_config,
                                                                               ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1410:93: error: unused parameter 'profiles' [-Werror,-Wunused-parameter]
                                                           const bctbx_dtls_srtp_profile_t *profiles,
                                                                                            ^
/Users/raphaelmijnssen/Code/bctoolbox/src/crypto/mbedtls.c:1411:67: error: unused parameter 'profiles_number' [-Werror,-Wunused-parameter]
                                                           size_t profiles_number) {
                                                                  ^
8 errors generated.
make[2]: *** [src/CMakeFiles/bctoolbox-static.dir/crypto/mbedtls.c.o] Error 1
make[1]: *** [src/CMakeFiles/bctoolbox-static.dir/all] Error 2
make: *** [all] Error 2

Those functions appear to be dummy functions / not yet implemented functions. Should those warnings be treated as errors?

RaphaelMaschinsen commented 1 year ago

Just tested under ArchLinux and the Build fails with the exact same errors. The Compiler is

-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
RaphaelMaschinsen commented 1 year ago

I fount the problem: The Cmake option 'ENABLE_STRICT' per default enabled. Disabling this option gets rid of mentioned errors.