GNU bug report logs - #21425
[PATCH] Remove needless mkstemp() check

Previous Next

Package: guile;

Reported by: Kouhei Sutou <kou <at> cozmixng.org>

Date: Sun, 6 Sep 2015 17:26:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Kouhei Sutou <kou <at> cozmixng.org>
Subject: bug#21425: closed (Re: bug#21425: [PATCH] Remove needless
 mkstemp() check)
Date: Thu, 29 Oct 2015 23:00:07 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#21425: [PATCH] Remove needless mkstemp() check

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 21425 <at> debbugs.gnu.org.

-- 
21425: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21425
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Kouhei Sutou <kou <at> cozmixng.org>
Cc: 21425-done <at> debbugs.gnu.org
Subject: Re: bug#21425: [PATCH] Remove needless mkstemp() check
Date: Thu, 29 Oct 2015 23:59:45 +0100
Kouhei Sutou <kou <at> cozmixng.org> skribis:

> There is mkstemp() check by AC_REPLACE_FUNCS() in
> configure.ac. If mkstemp() isn't found, mkstemp() is defined
> by gnulib-tool.
>
> But mkstemp() is always defined in libguile/mkstemp.c. If we
> define mkstemp() by gnulib-tool, mkstemp() is defined
> twice. It caused a link error.
>
> The situation is caused when we cross-compile Guile by MinGW
> because mkstemp() doesn't exist on Windows.

Indeed.  I pushed as similar patch as efd8a43.

Thank you!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Kouhei Sutou <kou <at> cozmixng.org>
To: bug-guile <at> gnu.org
Subject: [PATCH] Remove needless mkstemp() check
Date: Sun, 06 Sep 2015 16:40:42 +0900 (JST)
[Message part 4 (text/plain, inline)]
There is mkstemp() check by AC_REPLACE_FUNCS() in
configure.ac. If mkstemp() isn't found, mkstemp() is defined
by gnulib-tool.

But mkstemp() is always defined in libguile/mkstemp.c. If we
define mkstemp() by gnulib-tool, mkstemp() is defined
twice. It caused a link error.

The situation is caused when we cross-compile Guile by MinGW
because mkstemp() doesn't exist on Windows.

Here is an error message on my environment:

      CCLD     libguile-2.0.la
    ../lib/.libs/libgnu.a(mkstemp.o): In function `mkstemp':
    .../lib/mkstemp.c:48: multiple definition of `mkstemp'
    .libs/libguile_2.0_la-mkstemp.o:.../libguile/mkstemp.c:68: first defined here
    collect2: error: ld returned 1 exit status
    Makefile:2242: recipe for target 'libguile-2.0.la' failed
    make[3]: *** [libguile-2.0.la] Error 1


I attach a patch to fix this problem.

[0001-Remove-needless-mkstemp-check.patch (text/x-patch, inline)]
From 6fca60d595f464b7f505d9132087836ca48d4947 Mon Sep 17 00:00:00 2001
From: Kouhei Sutou <kou <at> clear-code.com>
Date: Sun, 6 Sep 2015 15:53:20 +0900
Subject: [PATCH] Remove needless mkstemp() check

It causes build error on cross-compiling for Windows by the following
multiple definitions error:

      CCLD     libguile-2.0.la
    ../lib/.libs/libgnu.a(mkstemp.o): In function `mkstemp':
    .../lib/mkstemp.c:48: multiple definition of `mkstemp'
    .libs/libguile_2.0_la-mkstemp.o:.../libguile/mkstemp.c:68: first defined here
    collect2: error: ld returned 1 exit status
    Makefile:2242: recipe for target 'libguile-2.0.la' failed
    make[3]: *** [libguile-2.0.la] Error 1

* configure.ac: Remove mkstemp() check. mkstemp() is always defined in
  libguile/mkstemp.c.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 19e00d8..49e937b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1124,7 +1124,7 @@ if test "$enable_regex" = yes; then
    AC_DEFINE([ENABLE_REGEX], 1, [Define when regex support is enabled.])
 fi
 
-AC_REPLACE_FUNCS([strerror memmove mkstemp])
+AC_REPLACE_FUNCS([strerror memmove])
 
 # Reasons for testing:
 #   asinh, acosh, atanh, trunc - C99 standard, generally not available on
-- 
2.5.1


This bug report was last modified 9 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.