Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] build failure on macos #3366

Closed
abhijeetbhagat opened this issue May 2, 2024 · 3 comments
Closed

[1.x] build failure on macos #3366

abhijeetbhagat opened this issue May 2, 2024 · 3 comments
Labels
multistream Related to Janus 1.x

Comments

@abhijeetbhagat
Copy link

What version of Janus is this happening on?
c04d583

Have you tested a more recent version of Janus too?
no

Was this working before?
no

Is there a gdb or libasan trace of the issue?
no

Additional context
building on macos with:

⟩ gcc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0

⟩ brew info libmicrohttpd
==> libmicrohttpd: stable 1.0.1 (bottled)

produces these errors:

transports/janus_http.c:507:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, const struct sockaddr *, socklen_t)' (aka 'int (*)(void *, const struct sockaddr *, unsigned int)') to parameter of type 'MHD_AcceptPolicyCallback' (aka 'enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_client_connect : &janus_http_client_connect,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2972:44: note: passing argument to parameter 'apc' here
                  MHD_AcceptPolicyCallback apc, void *apc_cls,
                                           ^
transports/janus_http.c:509:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' (aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') to parameter of type 'MHD_AccessHandlerCallback' (aka 'enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_handler : &janus_http_handler,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2973:45: note: passing argument to parameter 'dh' here
                  MHD_AccessHandlerCallback dh, void *dh_cls,
                                            ^
transports/janus_http.c:523:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, const struct sockaddr *, socklen_t)' (aka 'int (*)(void *, const struct sockaddr *, unsigned int)') to parameter of type 'MHD_AcceptPolicyCallback' (aka 'enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_client_connect : &janus_http_client_connect,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2972:44: note: passing argument to parameter 'apc' here
                  MHD_AcceptPolicyCallback apc, void *apc_cls,
                                           ^
transports/janus_http.c:525:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' (aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') to parameter of type 'MHD_AccessHandlerCallback' (aka 'enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_handler : &janus_http_handler,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2973:45: note: passing argument to parameter 'dh' here
                  MHD_AccessHandlerCallback dh, void *dh_cls,
                                            ^
transports/janus_http.c:546:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, const struct sockaddr *, socklen_t)' (aka 'int (*)(void *, const struct sockaddr *, unsigned int)') to parameter of type 'MHD_AcceptPolicyCallback' (aka 'enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_client_connect : &janus_http_client_connect,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2972:44: note: passing argument to parameter 'apc' here
                  MHD_AcceptPolicyCallback apc, void *apc_cls,
                                           ^
transports/janus_http.c:548:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' (aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') to parameter of type 'MHD_AccessHandlerCallback' (aka 'enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_handler : &janus_http_handler,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2973:45: note: passing argument to parameter 'dh' here
                  MHD_AccessHandlerCallback dh, void *dh_cls,
                                            ^
transports/janus_http.c:566:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, const struct sockaddr *, socklen_t)' (aka 'int (*)(void *, const struct sockaddr *, unsigned int)') to parameter of type 'MHD_AcceptPolicyCallback' (aka 'enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_client_connect : &janus_http_client_connect,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2972:44: note: passing argument to parameter 'apc' here
                  MHD_AcceptPolicyCallback apc, void *apc_cls,
                                           ^
transports/janus_http.c:568:5: error: incompatible function pointer types passing 'MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' (aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') to parameter of type 'MHD_AccessHandlerCallback' (aka 'enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, unsigned long *, void **)') [-Wincompatible-function-pointer-types]
                                admin ? &janus_http_admin_handler : &janus_http_handler,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:2973:45: note: passing argument to parameter 'dh' here
                  MHD_AccessHandlerCallback dh, void *dh_cls,
                                            ^
transports/janus_http.c:1388:58: error: incompatible function pointer types passing 'MHD_Result (*)(void *, enum MHD_ValueKind, const char *, const char *)' (aka 'int (*)(void *, enum MHD_ValueKind, const char *, const char *)') to parameter of type 'MHD_KeyValueIterator' (aka 'enum MHD_Result (*)(void *, enum MHD_ValueKind, const char *, const char *)') [-Wincompatible-function-pointer-types]
                MHD_get_connection_values(connection, MHD_HEADER_KIND, &janus_http_headers, msg);
                                                                       ^~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:3530:49: note: passing argument to parameter 'iterator' here
                           MHD_KeyValueIterator iterator,
                                                ^
transports/janus_http.c:1812:58: error: incompatible function pointer types passing 'MHD_Result (*)(void *, enum MHD_ValueKind, const char *, const char *)' (aka 'int (*)(void *, enum MHD_ValueKind, const char *, const char *)') to parameter of type 'MHD_KeyValueIterator' (aka 'enum MHD_Result (*)(void *, enum MHD_ValueKind, const char *, const char *)') [-Wincompatible-function-pointer-types]
                MHD_get_connection_values(connection, MHD_HEADER_KIND, &janus_http_headers, msg);
                                                                       ^~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/libmicrohttpd/1.0.1/include/microhttpd.h:3530:49: note: passing argument to parameter 'iterator' here
                           MHD_KeyValueIterator iterator,
@abhijeetbhagat abhijeetbhagat added the multistream Related to Janus 1.x label May 2, 2024
@abhijeetbhagat
Copy link
Author

i was able to disable the flag (-Wno-error=incompatible-function-pointer-types) & build & run janus with the demo app just fine.

@atoppi
Copy link
Member

atoppi commented May 3, 2024

@abhijeetbhagat can you try reverting the clang flag with the commit above ?

@lminiero
Copy link
Member

lminiero commented May 3, 2024

@abhijeetbhagat this commit 6d78789 by @atoppi fixes it properly, so I'll close the issue.

@lminiero lminiero closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

No branches or pull requests

3 participants