public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
@ 2015-06-12 13:42 egall at gwmail dot gwu.edu
  2015-06-12 13:45 ` [Bug bootstrap/66521] " egall at gwmail dot gwu.edu
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-06-12 13:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

            Bug ID: 66521
           Summary: xgcc: cc1plus segfaults when compiling
                    libstdc++-v3/src/c++11/ostream-inst.cc
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: egall at gwmail dot gwu.edu
  Target Milestone: ---
              Host: x86_64-apple-darwin10.8.0
            Target: x86_64-apple-darwin10.8.0
             Build: x86_64-apple-darwin10.8.0

Created attachment 35770
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35770&action=edit
crash reporter log that resulted

Here's my version info:
$ /Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc
Target: x86_64-apple-darwin10.8.0
Thread model: posix
gcc version 6.0.0 20150604 (experimental) (GCC)

The "Configured with" line is too long, due to all the times it says
"reconfigured", so I'll just put the most recent one:

../configure --enable-libada --enable-libssp --enable-bootstrap --enable-lto
--enable-stage1-languages=all --enable-objc-gc --enable-vtable-verify
--enable-maintainer-mode --disable-werror --enable-host-shared
--enable-languages=c,c++,java,jit,lto,objc,obj-c++ --enable-stage1-checking=all
--enable-libstdcxx-time -C --enable-multilib --enable-multiarch
--enable-__cxa_atexit --enable-tls --with-system-libunwind --enable-secureplt
--enable-frame-pointer --enable-version-specific-runtime-libs --enable-plugin
--enable-cxx --enable-assert --enable-fat --enable-portable-binary
--enable-browser-plugin --enable-gconf-peer --enable-libgcj-debug
--enable-gc-debug --enable-interpreter --enable-aot-compile-rpm
--enable-java-home --with-x --enable-collections --enable-gstreamer-peer
--enable-xmlj --enable-qt-peer --enable-gmp --enable-debug
--enable-local-sockets --enable-concept-checks --without-isl
AUTOCONF=autoconf264 AUTOHEADER=autoheader264 AUTOM4TE=autom4te264
AUTORECONF=autoreconf264 AUTOSCAN=autoscan264 AUTOUPDATE=autoupdate264
IFNAMES=ifnames264

Command line and output:

/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile
/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc -shared-libgcc
-B/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc -nostdinc++
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/x86_64-apple-darwin10.8.0/bin/
-B/usr/local/x86_64-apple-darwin10.8.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.8.0/include -isystem
/usr/local/x86_64-apple-darwin10.8.0/sys-include   
-I/Users/ericgallager/gcc-git/libstdc++-v3/../libgcc
-I/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/include/x86_64-apple-darwin10.8.0
-I/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/include
-I/Users/ericgallager/gcc-git/libstdc++-v3/libsupc++  -std=gnu++11 -prefer-pic
-D_GLIBCXX_SHARED -fno-implicit-templates -fvtable-verify=std
-Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end -Wall -Wextra
-Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once 
-fvisibility-inlines-hidden -ffunction-sections -fdata-sections 
-frandom-seed=ostream-inst.lo -g -O2  -c -o ostream-inst.lo
../../../../../libstdc++-v3/src/c++11/ostream-inst.cc
libtool: compile: 
/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc -shared-libgcc
-B/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc -nostdinc++
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/x86_64-apple-darwin10.8.0/bin/
-B/usr/local/x86_64-apple-darwin10.8.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.8.0/include -isystem
/usr/local/x86_64-apple-darwin10.8.0/sys-include
-I/Users/ericgallager/gcc-git/libstdc++-v3/../libgcc
-I/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/include/x86_64-apple-darwin10.8.0
-I/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/include
-I/Users/ericgallager/gcc-git/libstdc++-v3/libsupc++ -std=gnu++11
-D_GLIBCXX_SHARED -fno-implicit-templates -fvtable-verify=std
-Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end -Wall -Wextra
-Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once
-fvisibility-inlines-hidden -ffunction-sections -fdata-sections
-frandom-seed=ostream-inst.lo -g -O2 -c
../../../../../libstdc++-v3/src/c++11/ostream-inst.cc  -fno-common -DPIC
-D_GLIBCXX_SHARED -o ostream-inst.o
xgcc: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[6]: *** [ostream-inst.lo] Error 1
make[6]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/c++11'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3'
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir'
make: *** [all] Error 2

The attached crash report has the backtrace, which makes it look like it's an
issue with the vtable verification code...


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
@ 2015-06-12 13:45 ` egall at gwmail dot gwu.edu
  2015-07-05  4:04 ` egall at gwmail dot gwu.edu
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-06-12 13:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #1 from Eric Gallager <egall at gwmail dot gwu.edu> ---
Created attachment 35771
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35771&action=edit
preprocessed source of file triggering bug

For what it's worth, re-running the command with -save-temps to generate this
preprocessed source resulted in the same crash, so I've been able to reproduce
it myself, at least...


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
  2015-06-12 13:45 ` [Bug bootstrap/66521] " egall at gwmail dot gwu.edu
@ 2015-07-05  4:04 ` egall at gwmail dot gwu.edu
  2015-07-06 16:02 ` ctice at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-07-05  4:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

Eric Gallager <egall at gwmail dot gwu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cmtice at google dot com

--- Comment #2 from Eric Gallager <egall at gwmail dot gwu.edu> ---
Just a follow-up, removing --enable-vtable-verify from my configure options
(and also selecting a set of less-expensive stage1-checking options) allowed
the build to continue successfully and get past this part, so it looks like
it's definitely a problem with the vtable verification feature; I'm adding the
libvtv maintainer listed in MAINTAINERS on CC...

(CC-ing someone on a bug doesn't count as contacting them directly, right? Just
making sure I'm not violating that line from MAINTAINERS...)


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
  2015-06-12 13:45 ` [Bug bootstrap/66521] " egall at gwmail dot gwu.edu
  2015-07-05  4:04 ` egall at gwmail dot gwu.edu
@ 2015-07-06 16:02 ` ctice at gcc dot gnu.org
  2015-07-28 17:01 ` ctice at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ctice at gcc dot gnu.org @ 2015-07-06 16:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

ctice at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ctice at gcc dot gnu.org

--- Comment #3 from ctice at gcc dot gnu.org ---
I've been looking at this and I have a patch that I"m currently testing.  I
hope to be ready to submit it for approval soon.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (2 preceding siblings ...)
  2015-07-06 16:02 ` ctice at gcc dot gnu.org
@ 2015-07-28 17:01 ` ctice at gcc dot gnu.org
  2015-07-30 12:08 ` redi at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ctice at gcc dot gnu.org @ 2015-07-28 17:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #4 from ctice at gcc dot gnu.org ---
Created attachment 36082
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36082&action=edit
Tentative patch to fix this issue.

I believe the attached patch will fix this problem.  I would appreciate it if
Eric would confirm that.

ChangeLogs:

gcc/cp/ChangeLog:

        * mangle.c : Add vtable-verify.h to include files.
        (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
        is "<anon>" get the real mangled name for the class instead, and
        also store the real mangled name in a vector for use later.

gcc/ChangeLog:

        * vtable-verify.c (vtbl_mangled_name_types, vtbl_mangled_name_ids): New
        global variables.
        (vtbl_find_mangled_name):  New function.
        (vtbl_register_mangled_name):  New function.
        (vtbl_map_get_node):  If DECL_ASSEMBLER_NAME is "<anon>", look up
        mangled name in mangled name vectors.
        (find_or_create_vtbl_map_node):  Ditto.
        (var_is_used_for_virtual_call_p):  Add recursion_depth parameter;
        update recursion_depth on function entry; pass it to every recursive
        call; automatically exit if depth > 25 (give up looking at that point).
        (verify_bb_vtables):  Initialize recursion_depth and pass it to
        var_is_used_for_virtual_call_p.
        * vtable-verify.h (vtbl_mangbled_name_types, vtbl_mangled_name_ids):
New
        global variable decls.
        (vtbl_register_mangled_name): New extern function decl.


libvtv/ChangeLog:

        * Makefile.am:  Update to match latest tree.
        * Makefile.in: Regenerate.
        * testsuite/lib/libvtv: Brought up to date.
        * vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed
        function (old bug!).
        * vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update
        initializations to work correctly with VTV_DEBUG defined.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (3 preceding siblings ...)
  2015-07-28 17:01 ` ctice at gcc dot gnu.org
@ 2015-07-30 12:08 ` redi at gcc dot gnu.org
  2015-07-30 12:11 ` redi at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-30 12:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #2)
> (CC-ing someone on a bug doesn't count as contacting them directly, right?
> Just making sure I'm not violating that line from MAINTAINERS...)

Right, you did the right thing, thanks.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (4 preceding siblings ...)
  2015-07-30 12:08 ` redi at gcc dot gnu.org
@ 2015-07-30 12:11 ` redi at gcc dot gnu.org
  2015-07-30 14:10 ` egall at gwmail dot gwu.edu
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-30 12:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #5)
> this one; I think I had to pass the '--disable-libstdcxx-filesystem-ts' flag
> to configure last time to get past it... I'll open a new PR about it.

Please do, I'm planning to backport the Filesystem TS for GCC 5.3 so if it
breaks the bootstrap on darwin I'd like to know the details.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (5 preceding siblings ...)
  2015-07-30 12:11 ` redi at gcc dot gnu.org
@ 2015-07-30 14:10 ` egall at gwmail dot gwu.edu
  2015-07-31 15:25 ` egall at gwmail dot gwu.edu
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-07-30 14:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #8 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to Jonathan Wakely from comment #7)
> (In reply to Eric Gallager from comment #5)
> > this one; I think I had to pass the '--disable-libstdcxx-filesystem-ts' flag
> > to configure last time to get past it... I'll open a new PR about it.
> 
> Please do, I'm planning to backport the Filesystem TS for GCC 5.3 so if it
> breaks the bootstrap on darwin I'd like to know the details.

Okay, I've opened Bug 67066 for that. Although, after getting past that one,
I'm back to something that looks at least semi-libvtv-related:

/bin/sh ../libtool --tag CXX   --mode=link
/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc -shared-libgcc
-B/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc -nostdinc++
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/x86_64-apple-darwin10.8.0/bin/
-B/usr/local/x86_64-apple-darwin10.8.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.8.0/include -isystem
/usr/local/x86_64-apple-darwin10.8.0/sys-include   
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/../libvtv/.libs
-Wl,--rpath
-Wl,/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/../libvtv/.libs
-Wl,-single_module  -std=gnu++98 -fno-common -DPIC -fno-implicit-templates
-fvtable-verify=std -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end -Wall
-Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once 
-fvisibility-inlines-hidden -ffunction-sections -fdata-sections 
-frandom-seed=libstdc++.la  -o libstdc++.la -version-info 6:22:0
-Wl,-exported_symbols_list,libstdc++-symbols.explist -lm -rpath
/usr/local/lib/gcc/x86_64-apple-darwin10.8.0/6.0.0 compatibility.lo
compatibility-debug_list.lo compatibility-debug_list-2.lo 
compatibility-c++0x.lo compatibility-atomic-c++0x.lo
compatibility-thread-c++0x.lo compatibility-chrono.lo compatibility-condvar.lo 
../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la
../src/c++11/libc++11convenience.la 
libtool: link:  /Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc/xgcc
-shared-libgcc -B/Users/ericgallager/gcc-git/my_oddly_named_builddir/./gcc
-nostdinc++
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/x86_64-apple-darwin10.8.0/bin/
-B/usr/local/x86_64-apple-darwin10.8.0/lib/ -isystem
/usr/local/x86_64-apple-darwin10.8.0/include -isystem
/usr/local/x86_64-apple-darwin10.8.0/sys-include    -dynamiclib -Wl,-undefined
-Wl,dynamic_lookup -o .libs/libstdc++.6.dylib  .libs/compatibility.o
.libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o
.libs/compatibility-condvar.o  
-Wl,-force_load,../libsupc++/.libs/libsupc++convenience.a
-Wl,-force_load,../src/c++98/.libs/libc++98convenience.a
-Wl,-force_load,../src/c++11/.libs/libc++11convenience.a 
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/libsupc++/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src/.libs
-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/../libvtv/.libs
-lm  -Wl,--rpath
-Wl,/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/../libvtv/.libs
-Wl,-single_module -Wl,-u_vtable_map_vars_start -Wl,-u_vtable_map_vars_end
-Wl,-exported_symbols_list -Wl,libstdc++-symbols.explist   -install_name 
/usr/local/lib/gcc/x86_64-apple-darwin10.8.0/6.0.0/libstdc++.6.dylib
-compatibility_version 7 -current_version 7.22 -Wl,-single_module
ld: warning: directory not found for option
'-L/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/../libvtv/.libs'
ld: unknown option: --rpath
collect2: error: ld returned 1 exit status
make[6]: *** [libstdc++.la] Error 1
make[6]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir/x86_64-apple-darwin10.8.0/libstdc++-v3'
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/Users/ericgallager/gcc-git/my_oddly_named_builddir'
make: *** [all] Error 2

The offending flag comes from the VTV_CXXLINKFLAGS Makefile variable, which
comes from the GLIBCXX_ENABLE_VTABLE_VERIFY autoconf macro in
libstdc++-v3/acinclude.m4 (so that'd probably have to be patched, too)


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (6 preceding siblings ...)
  2015-07-30 14:10 ` egall at gwmail dot gwu.edu
@ 2015-07-31 15:25 ` egall at gwmail dot gwu.edu
  2015-08-05 18:41 ` egall at gwmail dot gwu.edu
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-07-31 15:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #9 from Eric Gallager <egall at gwmail dot gwu.edu> ---
Created attachment 36101
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36101&action=edit
additional patch to fix this issue

As a follow-up to my previous comment, the attached patch fixes the issue
described in it, by using the correct rpath flag for the darwin linker, and
also putting some space between the "-u" linker flag and the symbol that it
names, as the darwin linker requires. There's some room to improve it though:
 * Seeing as libstdc++-v3 already uses libtool to link, why not just use
libtool's own "-rpath" or "-R" flag to link? Shouldn't it just then DTRT for
each platform, instead of needing to have to specify the correct linker rpath
flag manually?
 * Adding darwin to the target_os conditional is probably wrong; the target
system says nothing about the linker flags supported by the linker being used.
I'm not sure if making a separate host_os or build_os conditional would be any
better, though. Of course, the best way to do it would be to avoid
conditionalizing on OS altogether, and doing things "the autoconf way" and
testing to see which linker flags are actually supported by whichever linker is
being used, but that would be harder...
 * I didn't include all the files that would need to be regenerated after
changing the patched file, because I figure anyone reading this is a maintainer
with autotools installed, and can regenerate the necessary files themselves.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (7 preceding siblings ...)
  2015-07-31 15:25 ` egall at gwmail dot gwu.edu
@ 2015-08-05 18:41 ` egall at gwmail dot gwu.edu
  2015-08-05 18:44 ` egall at gwmail dot gwu.edu
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-08-05 18:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #11 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to ctice from comment #10)
> Author: ctice
> Date: Sun Aug  2 01:17:39 2015
> New Revision: 226471
> 
> URL: https://gcc.gnu.org/viewcvs?rev=226471&root=gcc&view=rev
> Log:
> Fix PR 66521
> 

Thanks for pushing this! While you're at it, could you take a look at my patch
for libstdc++-v3/acinclude.m4, too? Just a heads up, though, even with my
additional patch, I still get a bunch of vtv-related warnings upon linking,
about not being able to export certain hidden symbols... I'll attach that
output next.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (8 preceding siblings ...)
  2015-08-05 18:41 ` egall at gwmail dot gwu.edu
@ 2015-08-05 18:44 ` egall at gwmail dot gwu.edu
  2015-08-07 23:18 ` cmtice at google dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-08-05 18:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #12 from Eric Gallager <egall at gwmail dot gwu.edu> ---
Created attachment 36133
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36133&action=edit
vtv-related warnings printed upon linking libstdc++

(as I said I'd attach in my previous comment)


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (9 preceding siblings ...)
  2015-08-05 18:44 ` egall at gwmail dot gwu.edu
@ 2015-08-07 23:18 ` cmtice at google dot com
  2015-08-12 15:40 ` ctice at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cmtice at google dot com @ 2015-08-07 23:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #13 from Caroline Tice <cmtice at google dot com> ---
I'm looking at your patch now; assuming I don't find any problems with it, I
will try to get it committed.


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (10 preceding siblings ...)
  2015-08-07 23:18 ` cmtice at google dot com
@ 2015-08-12 15:40 ` ctice at gcc dot gnu.org
  2015-08-30 18:21 ` egall at gwmail dot gwu.edu
  2015-08-30 18:38 ` egall at gwmail dot gwu.edu
  13 siblings, 0 replies; 15+ messages in thread
From: ctice at gcc dot gnu.org @ 2015-08-12 15:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #14 from ctice at gcc dot gnu.org ---
Author: ctice
Date: Wed Aug 12 15:40:11 2015
New Revision: 226820

URL: https://gcc.gnu.org/viewcvs?rev=226820&root=gcc&view=rev
Log:
Fix warnings when bootstrapping on darwin with vtable verification enabled.

libstdc++-v3/ChangeLog:

2015-08-11  Caroline Tice <cmtice@google.com>

        PR 66521, Contributed by Eric Gallager
        * acinclude.m4 (VTV_CXXLINKFLAGS): Make this variable OS-specific, and
        fix the rpath flag to work properly for darwin.
        * configure: Regenerated.


Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/acinclude.m4
    trunk/libstdc++-v3/configure


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (11 preceding siblings ...)
  2015-08-12 15:40 ` ctice at gcc dot gnu.org
@ 2015-08-30 18:21 ` egall at gwmail dot gwu.edu
  2015-08-30 18:38 ` egall at gwmail dot gwu.edu
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-08-30 18:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #15 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to ctice from comment #14)
> Author: ctice
> Date: Wed Aug 12 15:40:11 2015
> New Revision: 226820
> 
> URL: https://gcc.gnu.org/viewcvs?rev=226820&root=gcc&view=rev
> Log:
> Fix warnings when bootstrapping on darwin with vtable verification enabled.
> 
> libstdc++-v3/ChangeLog:
> 
> 2015-08-11  Caroline Tice <cmtice@google.com>
> 
>         PR 66521, Contributed by Eric Gallager
>         * acinclude.m4 (VTV_CXXLINKFLAGS): Make this variable OS-specific,
> and
>         fix the rpath flag to work properly for darwin.
>         * configure: Regenerated.
> 
> 
> Modified:
>     trunk/libstdc++-v3/ChangeLog
>     trunk/libstdc++-v3/acinclude.m4
>     trunk/libstdc++-v3/configure

Thanks for committing this! Just a note re: the commit message, though: I wrote
the patch to fix the error from comment #8; I'd assume the warnings I mentioned
in comment #11 and comment #12 would still be an issue on darwin 10, though...
I tried testing to confirm, but I'm actually currently knocked back to darwin 9
here, which has an older cctools and assembler, so now I error out earlier with
an assembler error:

Making all in c++98
make[6]: Entering directory
`/private/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src/c++98'
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile
/var/root/gcc-git/my_oddly_named_builddir/./gcc/xgcc -shared-libgcc
-B/var/root/gcc-git/my_oddly_named_builddir/./gcc -nostdinc++
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/i386-apple-darwin9.8.0/bin/
-B/usr/local/i386-apple-darwin9.8.0/lib/ -isystem
/usr/local/i386-apple-darwin9.8.0/include -isystem
/usr/local/i386-apple-darwin9.8.0/sys-include   
-I/var/root/gcc-git/libstdc++-v3/../libgcc
-I/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/include/i386-apple-darwin9.8.0
-I/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/include
-I/var/root/gcc-git/libstdc++-v3/libsupc++   -std=gnu++98 -prefer-pic
-D_GLIBCXX_SHARED -fno-implicit-templates -fvtable-verify=std
-Wl,-u,_vtable_map_vars_start -Wl,-u,_vtable_map_vars_end -Wall -Wextra
-Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once 
-fvisibility-inlines-hidden -ffunction-sections -fdata-sections 
-frandom-seed=bitmap_allocator.lo -g -O2  -c -o bitmap_allocator.lo
../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc
libtool: compile:  /var/root/gcc-git/my_oddly_named_builddir/./gcc/xgcc
-shared-libgcc -B/var/root/gcc-git/my_oddly_named_builddir/./gcc -nostdinc++
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-L/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
-B/usr/local/i386-apple-darwin9.8.0/bin/
-B/usr/local/i386-apple-darwin9.8.0/lib/ -isystem
/usr/local/i386-apple-darwin9.8.0/include -isystem
/usr/local/i386-apple-darwin9.8.0/sys-include
-I/var/root/gcc-git/libstdc++-v3/../libgcc
-I/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/include/i386-apple-darwin9.8.0
-I/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/include
-I/var/root/gcc-git/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED
-fno-implicit-templates -fvtable-verify=std -Wl,-u,_vtable_map_vars_start
-Wl,-u,_vtable_map_vars_end -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -fvisibility-inlines-hidden
-ffunction-sections -fdata-sections -frandom-seed=bitmap_allocator.lo -g -O2 -c
../../../../../libstdc++-v3/src/c++98/bitmap_allocator.cc  -fno-common -DPIC
-D_GLIBCXX_SHARED -o bitmap_allocator.o
/var/tmp//ccxrd6Je.s:15603:FATAL:symbol:
__ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE can't be a
weak_definition (currently only supported in section of type coalesced)
make[6]: *** [bitmap_allocator.lo] Error 1
make[6]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src/c++98'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/i386-apple-darwin9.8.0/libstdc++-v3'
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make: *** [all] Error 2

I get the feeling it could actually be related to those linker warnings I
mentioned previously?


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

* [Bug bootstrap/66521] xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc
  2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
                   ` (12 preceding siblings ...)
  2015-08-30 18:21 ` egall at gwmail dot gwu.edu
@ 2015-08-30 18:38 ` egall at gwmail dot gwu.edu
  13 siblings, 0 replies; 15+ messages in thread
From: egall at gwmail dot gwu.edu @ 2015-08-30 18:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66521

--- Comment #16 from Eric Gallager <egall at gwmail dot gwu.edu> ---
Created attachment 36272
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36272&action=edit
assembly that darwin 9 assembler rejects

Here's a snippet from the attached file for some of the lines around the one in
the error message from the previous comment (for context):

LHOTE93:
        .private_extern
__ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE
        .no_dead_strip
__ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE
        .globl __ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE
        .weak_definition
__ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE
        .align 2
__ZN4_VTVIN9__gnu_cxx24__concurrence_wait_errorEE12__vtable_mapE:
        .space 4
        .private_extern
__ZN4_VTVIN9__gnu_cxx29__concurrence_broadcast_errorEE12__vtable_mapE
        .no_dead_strip
__ZN4_VTVIN9__gnu_cxx29__concurrence_broadcast_errorEE12__vtable_mapE
        .globl
__ZN4_VTVIN9__gnu_cxx29__concurrence_broadcast_errorEE12__vtable_mapE
        .weak_definition
__ZN4_VTVIN9__gnu_cxx29__concurrence_broadcast_errorEE12__vtable_mapE
        .align 2


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

end of thread, other threads:[~2015-08-30 18:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 13:42 [Bug bootstrap/66521] New: xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc egall at gwmail dot gwu.edu
2015-06-12 13:45 ` [Bug bootstrap/66521] " egall at gwmail dot gwu.edu
2015-07-05  4:04 ` egall at gwmail dot gwu.edu
2015-07-06 16:02 ` ctice at gcc dot gnu.org
2015-07-28 17:01 ` ctice at gcc dot gnu.org
2015-07-30 12:08 ` redi at gcc dot gnu.org
2015-07-30 12:11 ` redi at gcc dot gnu.org
2015-07-30 14:10 ` egall at gwmail dot gwu.edu
2015-07-31 15:25 ` egall at gwmail dot gwu.edu
2015-08-05 18:41 ` egall at gwmail dot gwu.edu
2015-08-05 18:44 ` egall at gwmail dot gwu.edu
2015-08-07 23:18 ` cmtice at google dot com
2015-08-12 15:40 ` ctice at gcc dot gnu.org
2015-08-30 18:21 ` egall at gwmail dot gwu.edu
2015-08-30 18:38 ` egall at gwmail dot gwu.edu

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).