GNU bug report logs - #13495
Compilation fails on Mac OS X 10.8.0

Previous Next

Package: coreutils;

Reported by: Assaf Gordon <assafgordon <at> gmail.com>

Date: Fri, 18 Jan 2013 22:34:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13495: closed (Compilation fails on Mac OS X 10.8.0)
Date: Tue, 22 Jan 2013 06:22:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 21 Jan 2013 22:20:15 -0800
with message-id <50FE2F9F.4030204 <at> cs.ucla.edu>
and subject line Re: bug#13495: Compilation fails on Mac OS X 10.8.0
has caused the debbugs.gnu.org bug report #13495,
regarding Compilation fails on Mac OS X 10.8.0
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13495
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Assaf Gordon <assafgordon <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Compilation fails on Mac OS X 10.8.0
Date: Fri, 18 Jan 2013 17:32:47 -0500
Hello,

Trying to compile the latest coreutils on Mac OS X, I get the following compilation error:

    $ ./configure
    [ works OK ]
    $ make
    [ ... ]
      CC       lib/stpncpy.o
    lib/stpncpy.c:34: error: expected declaration specifiers or '...' before numeric constant
    lib/stpncpy.c:34: error: expected ')' before '!=' token
    lib/stpncpy.c:34: error: expected ')' before '?' token
    make[2]: *** [lib/stpncpy.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

This happens with the released version 8.20, and also with "8.20.90-e27bfd" (I had to git-pull on another machine and do "make dist" to generate it).

The compiler is (From Apple's Xcode-452-command-line-tools package):
     $ clang --version
     Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
     Target: x86_64-apple-darwin10.8.0
     Thread model: posix

The OS is:
     $ uname -a
     Darwin minimacc.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

I can provide more details if needed.

Regards,
 -gordon


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: bug-gnulib <bug-gnulib <at> gnu.org>, 13495-done <at> debbugs.gnu.org
Subject: Re: bug#13495: Compilation fails on Mac OS X 10.8.0
Date: Mon, 21 Jan 2013 22:20:15 -0800
On 01/21/2013 11:39 AM, Assaf Gordon wrote:
> This fixes the problem. Compilation succeeds with both gcc and clang.

Thanks for checking.  I pushed the following patch into gnulib
and am marking this coreutils bug as done.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-21  Paul Eggert  <eggert <at> cs.ucla.edu>
+
+	stpncpy: port to OS X 10.8
+	* lib/stpncpy.c (__stpncpy): Parenthesize name when defining function.
+	Problem reported by Assaf Gordon in <http://bugs.gnu.org/13495>.
+
 2013-01-16  Paul Eggert  <eggert <at> cs.ucla.edu>
 
 	unistd: port to recent mingw
diff --git a/lib/stpncpy.c b/lib/stpncpy.c
index 466cd5f..8b14fb9 100644
--- a/lib/stpncpy.c
+++ b/lib/stpncpy.c
@@ -31,7 +31,7 @@
 /* Copy no more than N bytes of SRC to DST, returning a pointer past the
    last non-NUL byte written into DST.  */
 char *
-__stpncpy (char *dest, const char *src, size_t n)
+(__stpncpy) (char *dest, const char *src, size_t n)
 {
   char c;
   char *s = dest;
-- 
1.7.11.7




This bug report was last modified 12 years and 113 days ago.

Previous Next


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