public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7
@ 2011-04-01 18:40 source at sharpsteen dot net
  2011-08-03  9:43 ` [Bug testsuite/48402] " jeru.sheng at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: source at sharpsteen dot net @ 2011-04-01 18:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48402

           Summary: autogen fixincludes in GCC 4.6.0 testsuite fails on OS
                    X 10.6.7
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: source@sharpsteen.net


OS: OS X 10.6.7
Autogen: 5.11.5
GCC compiled with: Apple GCC-4.2.1-5666.3 (XCode 3.2.6)

GCC configured in separate build directory with:
../configure 
  --enable-languages=c 
  --prefix=/usr/local/Cellar/gcc/4.6.0/gcc 
  --datarootdir=/usr/local/Cellar/gcc/4.6.0/share 
  --bindir=/usr/local/Cellar/gcc/4.6.0/bin 
  --program-suffix=-4.6
  --with-gmp=/usr/local/Cellar/gmp/5.0.1
  --with-mpfr=/usr/local/Cellar/mpfr/3.0.0
  --with-mpc=/usr/local/Cellar/libmpc/0.8.2 --with-system-zlib 
  --enable-stage1-checking 
  --enable-lto
  --disable-nls

`make bootstrap` succeeds. `make check` fails with a "missing header fix" error
for complex.h


bash-3.2$ make -j1 check
autogen -T ../../fixincludes/check.tpl ../../fixincludes/inclhack.def
/bin/sh ./check.sh ../../fixincludes/tests/base
Fixed:  testing.h
Fixed:  testing.h
Fixed:  AvailabilityMacros.h
Fixed:  X11/ShellP.h
Fixed:  X11/Xmu.h
Fixed:  Xm/BaseClassI.h
Fixed:  Xm/Traversal.h
Fixed:  ansi/math.h
Fixed:  ansi/stdlib.h
Fixed:  arch/i960/archI960.h
Fixed:  architecture/ppc/math.h
Fixed:  assert.h
Fixed:  bits/huge_val.h
Fixed:  bits/string2.h
Fixed:  bsd/libc.h
Fixed:  c_asm.h
Fixed:  com_err.h
sed: 1: "/#if[ \t]*!defined(__cpl ...": command c expects \ followed by text
sed: stdout: Broken pipe
Fixed:  ctrl-quotes-def-1.h
Fixed:  ctype.h
Fixed:  curses.h
Fixed:  errno.h
Fixed:  features.h
Fixed:  fixinc-test-limits.h
Fixed:  hsfs/hsfs_spec.h
Fixed:  ia64/sys/getppdp.h
Fixed:  internal/math_core.h
Fixed:  internal/sgimacros.h
Fixed:  internal/wchar_core.h
Fixed:  inttypes.h
Fixed:  io-quotes-def-1.h
Fixed:  iso/math_c99.h
Fixed:  locale.h
Fixed:  mach-o/dyld.h
Fixed:  mach-o/swap.h
Fixed:  malloc.h
Fixed:  math.h
Fixed:  net/if.h
Fixed:  netdnet/dnetdb.h
Fixed:  netinet/in.h
Fixed:  netinet/ip.h
Fixed:  obstack.h
Fixed:  pixrect/memvar.h
Fixed:  pthread.h
Fixed:  reg_types.h
Fixed:  regex.h
Fixed:  regexp.h
Fixed:  rpc/auth.h
Fixed:  rpc/rpc.h
Fixed:  rpc/xdr.h
Fixed:  rpcsvc/rstat.h
Fixed:  rpcsvc/rusers.h
Fixed:  signal.h
Fixed:  sparc/asm_linkage.h
Fixed:  standards.h
Fixed:  stdarg.h
Fixed:  stdint-aix.h
Fixed:  stdint-darwin.h
Fixed:  stdint-hpux11.h
Fixed:  stdint-irix65.h
Fixed:  stdint-newlib.h
Fixed:  stdint.h
Fixed:  stdio.h
Fixed:  stdio_tag.h
Fixed:  stdlib.h
Fixed:  string.h
Fixed:  strings.h
Fixed:  sundev/vuid_event.h
Fixed:  sunwindow/win_lock.h
Fixed:  sym.h
Fixed:  sys/_inttypes.h
Fixed:  sys/asm.h
Fixed:  sys/cdefs.h
Fixed:  sys/feature_tests.h
Fixed:  sys/file.h
Fixed:  sys/int_const.h
Fixed:  sys/int_limits.h
Fixed:  sys/int_types.h
Fixed:  sys/machine.h
Fixed:  sys/mman.h
Fixed:  sys/pthread.h
Fixed:  sys/signal.h
Fixed:  sys/socket.h
Fixed:  sys/spinlock.h
Fixed:  sys/stat.h
Fixed:  sys/sysmacros.h
Fixed:  sys/time.h
Fixed:  sys/types.h
Fixed:  sys/ucontext.h
Fixed:  sys/va_list.h
Fixed:  sys/wait.h
Fixed:  testing.h
Fixed:  tgmath.h
Fixed:  time.h
Fixed:  tinfo.h
Fixed:  types/vxTypesBase.h
Fixed:  unistd.h
Missing header fix:  complex.h

There were fixinclude test FAILURES
make[2]: *** [check] Error 1
make[1]: *** [check-fixincludes] Error 2
make: *** [do-check] Error 2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug testsuite/48402] autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7
  2011-04-01 18:40 [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7 source at sharpsteen dot net
@ 2011-08-03  9:43 ` jeru.sheng at gmail dot com
  2011-09-28  8:20 ` sambler at nd dot edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jeru.sheng at gmail dot com @ 2011-08-03  9:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48402

Cheng Sheng <jeru.sheng at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeru.sheng at gmail dot com

--- Comment #1 from Cheng Sheng <jeru.sheng at gmail dot com> 2011-08-03 09:43:08 UTC ---
I encountered this problem as well in gcc-4.6.1, on Mac OS X 10.7. After some
checking, I found that the source of this error is that "sed" in Linux is
slightly different from "sed" in the POSIX spec (see
http://pubs.opengroup.org/onlinepubs/009695399/utilities/sed.html).
In Linux, the c-command of "sed" can be followed by the text directly, while in
the spec, the c-command should be followed immediately by a backslash, then a
newline, then the text. Therefore, one hack instruction in
gcc-4.6.0/fixinclude/inclhack.def doesn't work:

*****************************************
***** Part of "inclhack.def" Begins *****
*****************************************
/*
 * Solaris 10+ <complex.h> is wrapped in #ifndef __cplusplus.  Wrap in
 * extern "C" instead so libstdc++ can use it.
 */
fix = {
    hackname  = solaris_complex_cxx;
    mach      = "*-*-solaris2.*";
    files     = complex.h;
    sed       = "/#if[ \t]*!defined(__cplusplus)/c"
                "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
    sed       = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c"
                "#ifdef\t__cplusplus\\\n}\\\n#endif";
    test_text = "#if !defined(__cplusplus)\n"
                "#endif /* !defined(__cplusplus) */";
};
***************************************
***** Part of "inclhack.def" Ends *****
***************************************

A fix would be to replace the "/c" commands of the two "sed"s to "/c\\\n",
i.e.:

--- inclhack.def.bak    2011-08-03 17:40:44.000000000 +0800
+++ inclhack.def    2011-08-03 17:40:52.000000000 +0800
@@ -3315,9 +3315,9 @@
     hackname  = solaris_complex_cxx;
     mach      = "*-*-solaris2.*";
     files     = complex.h;
-    sed          = "/#if[ \t]*!defined(__cplusplus)/c"
+    sed          = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
             "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
-    sed          = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c"
+    sed          = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
         "#ifdef\t__cplusplus\\\n}\\\n#endif";
     test_text = "#if !defined(__cplusplus)\n"
         "#endif    /* !defined(__cplusplus) */";


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug testsuite/48402] autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7
  2011-04-01 18:40 [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7 source at sharpsteen dot net
  2011-08-03  9:43 ` [Bug testsuite/48402] " jeru.sheng at gmail dot com
@ 2011-09-28  8:20 ` sambler at nd dot edu
  2011-09-29  6:15 ` sambler at nd dot edu
  2013-12-19 16:46 ` dominiq at lps dot ens.fr
  3 siblings, 0 replies; 5+ messages in thread
From: sambler at nd dot edu @ 2011-09-28  8:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48402

Stuart Ambler <sambler at nd dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sambler at nd dot edu

--- Comment #2 from Stuart Ambler <sambler at nd dot edu> 2011-09-28 06:29:36 UTC ---
Same error encountered (configure, make, make install work, but make check
fails in the same way).  Tried proposed fix but apparently didn't guess
correctly the exact sequence of actions to make it work.

OS:  OS X 10.6.8
Autogen:  5.12

compiler used to build GCC 4.6.1 was Apple 4.2.1 which responds to -v with
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/usr/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1
--host=i686-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

GCC 4.6.1 configured with ../gcc-4.6.1/configure --with-pkgversion=osx10.6.8
--prefix=/usr/local/unix --with-gmp=/usr/local/unix --with-mpfr=/usr/local/unix
--with-mpc=/usr/local/unix --disable-multilib
After build and install, it responds to -v with 
Using built-in specs.
COLLECT_GCC=/usr/local/unix/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/unix/libexec/gcc/i386-apple-darwin10.8.0/4.6.1/lto-wrapper
Target: i386-apple-darwin10.8.0
Configured with: ../gcc-4.6.1/configure --with-pkgversion=osx10.6.8
--prefix=/usr/local/unix --with-gmp=/usr/local/unix --with-mpfr=/usr/local/unix
--with-mpc=/usr/local/unix --disable-multilib
Thread model: posix
gcc version 4.6.1 (osx10.6.8)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug testsuite/48402] autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7
  2011-04-01 18:40 [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7 source at sharpsteen dot net
  2011-08-03  9:43 ` [Bug testsuite/48402] " jeru.sheng at gmail dot com
  2011-09-28  8:20 ` sambler at nd dot edu
@ 2011-09-29  6:15 ` sambler at nd dot edu
  2013-12-19 16:46 ` dominiq at lps dot ens.fr
  3 siblings, 0 replies; 5+ messages in thread
From: sambler at nd dot edu @ 2011-09-29  6:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48402

--- Comment #3 from Stuart Ambler <sambler at nd dot edu> 2011-09-29 05:02:34 UTC ---
Verified fix as follows.  After fresh de-tar of gcc-core, g++, objc,
testsuite-4.6.1.tar.g, edit gcc-4.6.1/fixincludes/inclhack.def according to
Cheng Sheng's comment, also edit same directory genfixes to make its autogen
version check work:
$ diff genfixes.orig genfixes
'65c65
< if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ]
---
> if [ -z "`${AG} -v | fgrep '(GNU AutoGen) 5.'`" ]
run ./genfixes, cd to separate build directory, configure, make, sudo make
install, sudo make check - all worked correctly (except that make check
reported one unexpected failure, FAIL: gcc.dg/ipa/pr48195.c (test for excess
errors), which I have no reason to think is related to this bug).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug testsuite/48402] autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7
  2011-04-01 18:40 [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7 source at sharpsteen dot net
                   ` (2 preceding siblings ...)
  2011-09-29  6:15 ` sambler at nd dot edu
@ 2013-12-19 16:46 ` dominiq at lps dot ens.fr
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-19 16:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48402

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Per the more than two years old comment 3, closing as FIXED.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-19 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01 18:40 [Bug other/48402] New: autogen fixincludes in GCC 4.6.0 testsuite fails on OS X 10.6.7 source at sharpsteen dot net
2011-08-03  9:43 ` [Bug testsuite/48402] " jeru.sheng at gmail dot com
2011-09-28  8:20 ` sambler at nd dot edu
2011-09-29  6:15 ` sambler at nd dot edu
2013-12-19 16:46 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).