[email protected]
[Top] [All Lists]

Bug#332713: marked as forwarded (autoconf: checking for fork does not wo

Subject: Bug#332713: marked as forwarded autoconf: checking for fork does not work for C++
From: Debian Bug Tracking System
Date: Sat, 22 Oct 2005 21:03:18 -0700
Your message dated Sat, 22 Oct 2005 20:48:15 -0700
with message-id <[email protected]>
has caused the Debian Bug report #332713,
regarding autoconf: checking for fork does not work for C++
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at 332713-forwarded) by bugs.debian.org; 23 Oct 2005 03:48:17 +0000
>From [email protected] Sat Oct 22 20:48:17 2005
Return-path: <[email protected]>
Received: from smtp-roam.stanford.edu [] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1ETWqH-0004W1-00; Sat, 22 Oct 2005 20:48:17 -0700
Received: from localhost (c-24-7-50-224.hsd1.ca.comcast.net [])
        (authenticated bits=0)
        by smtp-roam.Stanford.EDU (8.12.11/8.12.11) with ESMTP id j9N3mE8C026421
        (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
        Sat, 22 Oct 2005 20:48:15 -0700
Received: from blp by localhost with local (Exim 4.52)
        id 1ETWqF-00050o-4P; Sat, 22 Oct 2005 20:48:15 -0700
From: Ben Pfaff <[email protected]>
To: [email protected]
Subject: [Hubert Chan] Bug#332713: autoconf: checking for fork does not work 
for C++
CC: [email protected], Hubert Chan <[email protected]>
Reply-To: [email protected]
Date: Sat, 22 Oct 2005 20:48:15 -0700
Message-ID: <[email protected]>
User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

The following bug was reported against the Debian packaging of
Autoconf 2.59.  I verified that it produced the reported results
on my system as well.

[Preserving the CC to [email protected] in replies
would be kind, because that allows replies to be preserved in the
Debian BTS.]

[Hubert: sorry about the delay in acting on this.  I've been
pretty busy.]

-------------------- Start of forwarded message --------------------
Subject: Bug#332713: autoconf: checking for fork does not work for C++
From: Hubert Chan <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Fri, 07 Oct 2005 22:31:55 -0400
Message-ID: <[email protected]>


With the attached configure.ac script, the "[check] for working fork"
fails.   Changing the AC_LANG from C++ to C results in a successful

I'm using gcc 4.0.1-9, and I also tried it with gcc 4.0.2-2.

#                                               -*- Autoconf -*-
# Run autoheader and autoconf to produce a header and configure script from
# this file.



# Checks for programs.


It seems that HAVE_UNISTD_H is not defined automatically in C++, and
hence unistd.h is not included in the test program, resulting in the
compiler not being able to find the fork function.

One way to fix this is to modify autoconf/functions.m4 with the attached
patch.  This causes the test program to include confdefs.h, which
defines HAVE_UNISTD_H if unistd.h exists.  I'm not sure if this is the
correct fix, though.

--- functions.m4.old    2005-10-07 20:56:19.427016155 -0400
+++ functions.m4        2005-10-07 20:57:22.914057470 -0400
@@ -1742,7 +1742,7 @@
 # -------------
   [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works,
-    [AC_RUN_IFELSE([/* By Ruediger Kuhlmann. */
+    [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* By Ruediger Kuhlmann. */
       #include <sys/types.h>
       #if HAVE_UNISTD_H
       # include <unistd.h>
@@ -1753,7 +1753,7 @@
        if (fork() < 0)
          exit (1);
        exit (0);
-      }],
+      }]])],

Another issue is that the macro for checking for vfork sets
ac_cv_func_vfork_works=$ac_func_vfork (line 1721 of functions.m4), so it
never actually runs the test for a working vfork, since it just pulls the
cached value of ac_cv_func_vfork.  I don't know if this was intentional,
though, or if this is a bug.
-------------------- End of forwarded message --------------------

"While the Melissa license is a bit unclear, Melissa aggressively
 encourages free distribution of its source code."
--Kevin Dalley <[email protected]>

To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#332713: marked as forwarded (autoconf: checking for fork does not work for C++), Debian Bug Tracking System <=