Summary: | ASTERISK-16343: [patch] Configure sets ac_cv_fork_works=no incorrectly for uclibc | ||
Reporter: | Philip Prindeville (pprindeville) | Labels: | |
Date Opened: | 2010-07-09 12:47:27 | Date Closed: | 2010-07-17 12:43:50 |
Priority: | Minor | Regression? | Yes |
Status: | Closed/Complete | Components: | Core/BuildSystem |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-1.6-fork.patch | |
Description: | The generated top-level configure contains: if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* | *-*-linux-uclibc* ) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; this is wrong. The linux-uclibc fork() works just fine. | ||
Comments: | By: Leif Madsen (lmadsen) 2010-07-09 13:16:20 This is not major -- the number of people affected by this is relatively low. By: Philip Prindeville (pprindeville) 2010-07-09 13:39:34 Sorry, I was told that build issues were considered "major". By: Leif Madsen (lmadsen) 2010-07-09 14:26:25 (02:20:25 PM) jparker: I made that change. I don't recall why. The change was explicitly to add what he's asking to remove. By: abelbeck (abelbeck) 2010-07-09 17:25:53 This issue was discovered in the trunk branch of AstLinux (cross-compile using uclibc). Philip (the reporter here) implemented Tilghman's comments on bugid 17464, whereby properly setting 'configure's $host variable. Since *-*-linux-uclibc* was now matched, ac_cv_fork_works is set to 'no', previously (for many years) it was always guessed to be 'yes' and worked fine with uclibc. It appears that back in r59573, in asterisk 1.4.3, the *-*-linux-uclibc* match was added. The above patch works for me, and the command line option -f could always be used to disable fork if so desired. By: Michael Keuter (mkeuter) 2010-07-10 03:54:24 The patch also works for me in Astlinux-trunk (for Asterisk 1.6.2.9 + Asterisk trunk). By: Philip Prindeville (pprindeville) 2010-07-10 15:55:59 And I'm now running it against trunk (r275254). By: Tilghman Lesher (tilghman) 2010-07-16 22:55:18 You'll need to report this upstream to the GNU autoconf project. While we can create an alternate test, this patch isn't it: it needs to be generated from the configure.ac script. By: Philip Prindeville (pprindeville) 2010-07-17 00:25:11 I'm confused: above jparker admitted that this was a test made directly to asterisk, not in autoconf. A quick look at autoconf 2.65's lib/autoconf/functions.m4 file confirms this. By: Philip Prindeville (pprindeville) 2010-07-17 00:34:53 Just to follow up, here's the relevant portion of that file: 1763 # AC_FUNC_FORK 1764 # ------------- 1765 AN_FUNCTION([fork], [AC_FUNC_FORK]) 1766 AN_FUNCTION([vfork], [AC_FUNC_FORK]) 1767 AC_DEFUN([AC_FUNC_FORK], 1768 [AC_REQUIRE([AC_TYPE_PID_T])dnl 1769 AC_CHECK_HEADERS(vfork.h) 1770 AC_CHECK_FUNCS(fork vfork) 1771 if test "x$ac_cv_func_fork" = xyes; then 1772 _AC_FUNC_FORK 1773 else 1774 ac_cv_func_fork_works=$ac_cv_func_fork 1775 fi 1776 if test "x$ac_cv_func_fork_works" = xcross; then 1777 case $host in 1778 *-*-amigaos* | *-*-msdosdjgpp*) 1779 # Override, as these systems have only a dummy fork() stub 1780 ac_cv_func_fork_works=no 1781 ;; 1782 *) 1783 ac_cv_func_fork_works=yes 1784 ;; 1785 esac 1786 AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross co mpilation]) 1787 fi 1788 ac_cv_func_vfork_works=$ac_cv_func_vfork 1789 if test "x$ac_cv_func_vfork" = xyes; then 1790 _AC_FUNC_VFORK 1791 fi; 1792 if test "x$ac_cv_func_fork_works" = xcross; then 1793 ac_cv_func_vfork_works=$ac_cv_func_vfork 1794 AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross c ompilation]) 1795 fi 1796 1797 if test "x$ac_cv_func_vfork_works" = xyes; then 1798 AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.]) 1799 else 1800 AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.]) 1801 fi 1802 if test "x$ac_cv_func_fork_works" = xyes; then 1803 AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.]) 1804 fi 1805 ])# AC_FUNC_FORK As you see, only amigaos and msdosdjgpp fail to support fork(). By: Tilghman Lesher (tilghman) 2010-07-17 11:45:08 Then your patch needs to be against configure.ac, not configure. By: Philip Prindeville (pprindeville) 2010-07-17 11:53:31 Have you looked at the patch? It contains hunks for 3 different files: configure autoconf/ast_func_fork.m4 menuselect/acinclude.m4 I think I'm starting to understand why getting a fix approved sometimes takes as long as it does. By: Digium Subversion (svnbot) 2010-07-17 11:59:11 Repository: asterisk Revision: 277738 U branches/1.4/autoconf/ast_func_fork.m4 U branches/1.4/configure ------------------------------------------------------------------------ r277738 | tilghman | 2010-07-17 11:59:10 -0500 (Sat, 17 Jul 2010) | 5 lines Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not. (closes issue ASTERISK-16343) Reported by: pprindeville ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=277738 By: Digium Subversion (svnbot) 2010-07-17 12:42:31 Repository: asterisk Revision: 277775 _U trunk/ U trunk/autoconf/ast_func_fork.m4 U trunk/configure U trunk/include/asterisk/autoconfig.h.in ------------------------------------------------------------------------ r277775 | tilghman | 2010-07-17 12:42:31 -0500 (Sat, 17 Jul 2010) | 12 lines Merged revisions 277738 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277738 | tilghman | 2010-07-17 11:59:11 -0500 (Sat, 17 Jul 2010) | 5 lines Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not. (closes issue ASTERISK-16343) Reported by: pprindeville ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=277775 By: Digium Subversion (svnbot) 2010-07-17 12:43:49 Repository: asterisk Revision: 277776 _U branches/1.6.2/ U branches/1.6.2/autoconf/ast_func_fork.m4 U branches/1.6.2/configure U branches/1.6.2/include/asterisk/autoconfig.h.in ------------------------------------------------------------------------ r277776 | tilghman | 2010-07-17 12:43:49 -0500 (Sat, 17 Jul 2010) | 19 lines Merged revisions 277775 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r277775 | tilghman | 2010-07-17 12:42:32 -0500 (Sat, 17 Jul 2010) | 12 lines Merged revisions 277738 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277738 | tilghman | 2010-07-17 11:59:11 -0500 (Sat, 17 Jul 2010) | 5 lines Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not. (closes issue ASTERISK-16343) Reported by: pprindeville ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=277776 |