Summary: | ASTERISK-20749: Cannot enable res_timing_kqueue via "make menuselect" | ||
Reporter: | Oleg Baranov (/dev/null) | Labels: | |
Date Opened: | 2012-11-28 07:20:21.000-0600 | Date Closed: | 2013-02-21 16:49:51.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/BuildSystem |
Versions: | 11.0.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | FreeBSD 9.1 (clean - installed just to report this bug). Latest Asterisk downloaded from web site. | Attachments: | ( 0) config.log ( 1) config.log_failed_FreeBSD9 ( 2) config.log_failed_Mint14 |
Description: | res_timing_kqueue is marked as conflicting with launchd which does not even exist in FreeBSD.
Taking the dependency out of menuselect-tree file workarounds the issue. {noformat} ************************************************** Asterisk Module and Build Option Selection ************************************************** Press 'h' for help. XXX res_xmpp --- extended --- [*] res_ael_share XXX res_config_ldap XXX res_config_pgsql XXX res_config_sqlite XXX res_corosync XXX res_fax_spandsp [*] res_http_websocket [*] res_phoneprov [ ] res_pktccops XXX res_snmp XXX res_timing_kqueue [*] res_timing_pthread --- deprecated --- XXX res_jabber KQueue Timing Interface Depends on: kqueue(E) Conflicts with: launchd(E) Support Level: extended {noformat} | ||
Comments: | By: Rusty Newton (rnewton) 2012-12-03 19:59:25.396-0600 Acknowledged. res_timing_kqueue and Asterisk on FreeBSD is considered extended support, which is covered by the community. Response times will reflect that. Thanks for reporting this. If you can supply a patch, that is always helpful. By: Matt Jordan (mjordan) 2012-12-03 21:02:46.847-0600 I'm not sure that's the answer here. # We should determine why res_timing_kqueue is dependent on launchd. If there is a conflict, then we shouldn't remove it. # If menuselect is detecting a conflict, then it *thinks* launchd is present on the system. A config log would possibly say what it detected, but if that's the case then you might actually have a problem if you enable it. By: Oleg Baranov (/dev/null) 2012-12-04 02:47:07.160-0600 Just checked: 1. According to http://en.wikipedia.org/wiki/Launchd launchd is Mac OS specific. Same wiki page mentions FreeBSD port of launchd but I do not see it in ports tree: {noformat} bsd-cli# cd /usr/ports/ bsd-cli# make search name=launchd bsd-cli# {noformat} {noformat} bsd-cli# pkg_info | grep launch bsd-cli# bsd-cli# which launchd launchd: Command not found. bsd-cli# {noformat} 2. Attaching my config.log , can clearly see it does *not* detect launchd on the system but still the corresponding menu item gets blocked. Not sure why. No links from ./configure script to enable or disable it either: {noformat} bsd-cli# ./configure --help | grep launch bsd-cli# {noformat} By: Oleg Baranov (/dev/null) 2012-12-04 02:48:10.508-0600 ./configure (with no options) By: Matt Jordan (mjordan) 2012-12-04 08:24:39.286-0600 This does appear to be an error in the configure script. Your configure log demonstrated that it failed to find launchd on your system; however, PBX_LAUNCHD was still set to true. The relevant portion of the configure script is below: {noformat} PBX_LAUNCHD=0 if test "${cross_compiling}" = "no"; then AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.])) PBX_LAUNCHD=1 fi AC_SUBST(PBX_LAUNCHD) {noformat} That should probably be: {noformat} PBX_LAUNCHD=0 if test "${cross_compiling}" = "no"; then AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.])) if test "${HAVE_SBIN_LAUNCHD}" = 1; then PBX_LAUNCHD=1 fi fi AC_SUBST(PBX_LAUNCHD) {noformat} By: Oleg Baranov (/dev/null) 2012-12-06 03:20:48.963-0600 Matt, {quote} This does appear to be an error in the configure script. Your configure log demonstrated that it failed to find launchd on your system; however, PBX_LAUNCHD was still set to true. The relevant portion of the configure script is below: {quote} While agreeing with you logic I cannot make end-to-end test. Tried Mint14 and FreeBSD9 - running autoconf on both break configure script. Log files attached. However if we go to 'configure' script fragment originally it was: {noformat} PBX_LAUNCHD=0 if test "${cross_compiling}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sbin/launchd" >&5 $as_echo_n "checking for /sbin/launchd... " >&6; } if ${ac_cv_file__sbin_launchd+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/sbin/launchd"; then ac_cv_file__sbin_launchd=yes else ac_cv_file__sbin_launchd=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__sbin_launchd" >&5 $as_echo "$ac_cv_file__sbin_launchd" >&6; } if test "x$ac_cv_file__sbin_launchd" = xyes; then : $as_echo "#define HAVE_SBIN_LAUNCHD 1" >>confdefs.h fi PBX_LAUNCHD=1 fi {noformat} and after the change you proposed: {noformat} PBX_LAUNCHD=0 if test "${cross_compiling}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sbin/launchd" >&5 $as_echo_n "checking for /sbin/launchd... " >&6; } if ${ac_cv_file__sbin_launchd+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/sbin/launchd"; then ac_cv_file__sbin_launchd=yes else ac_cv_file__sbin_launchd=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__sbin_launchd" >&5 $as_echo "$ac_cv_file__sbin_launchd" >&6; } if test "x$ac_cv_file__sbin_launchd" = xyes; then : $as_echo "#define HAVE_SBIN_LAUNCHD 1" >>confdefs.h fi if test "${HAVE_SBIN_LAUNCHD}" = 1; then PBX_LAUNCHD=1 fi fi {noformat} Apllied to original 'configure' script this fragment makes res_timing_kqueue work properly in menuselect. I suggest applying the change to configure script that's bundled with Asterisk tarball because - not everyone is keen to run autoconf when building from source - FreeBSD comes without autoconf out of the box and just to install autoconf it brings a handful of dependencies in. By: Matt Jordan (mjordan) 2012-12-06 07:17:52.865-0600 If the change is made in the configure script, the actual configure produced will be updated as well. By: Oleg Baranov (/dev/null) 2012-12-07 04:05:23.966-0600 {quote} If the change is made in the configure script, the actual configure produced will be updated as well. {quote} That's it then. Thank you for fixing this issue. By: Rusty Newton (rnewton) 2013-01-08 12:41:30.149-0600 Oleg, feel free to create the patch discussed, attach to the issue and then you may want to ping someone in #asterisk-dev or on the dev list to look it over and push it through. |