public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64
@ 2021-12-06 10:19 ro at gcc dot gnu.org
  2021-12-13 12:09 ` [Bug d/103577] " ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2021-12-06 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103577
           Summary: d21 SIGSEGV on Darwin/x86_64
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-apple-darwin11.4.2
            Target: x86_64-apple-darwin11.4.2
             Build: x86_64-apple-darwin11.4.2

I recently tried to build master on Darwin 11 with gcc 11.0.1.  That's the
first
release to build gdc, and while libphobos isn't marked as supported in
libphobos/configure.tgt, it does build with --enable-libphobos.

However, with that gdc as bootstrap compiler, the resulting d21 SEGVs building
the stage1 libphobos, e.g.

gdc: internal compiler error: Segmentation fault: 11 signal terminated program
d21
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[5]: *** [core/internal/gc/pooltable.lo] Error 1

Unfortunately, trying to debug d21 with gdb 9.1 just lets gdb hang in

Reading symbols from ./d21...

The bundled lldb fails differently, but provides no information.

I cannot really tell if this is supposed to work in some way or not.

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
@ 2021-12-13 12:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2021-12-13 12:23 ` ibuclaw at gdcproject dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2021-12-13 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> I recently tried to build master on Darwin 11 with gcc 11.0.1.  That's the
> first
> release to build gdc, and while libphobos isn't marked as supported in
> libphobos/configure.tgt, it does build with --enable-libphobos.
>
> However, with that gdc as bootstrap compiler, the resulting d21 SEGVs building
> the stage1 libphobos, e.g.

FWIW, I recently tried the same procedure in a macOS 12.1 VM
(x86_64-apple-darwin21.2.0).  This time, the build succeeded and test
results are reasonable

                === gdc Summary ===

# of expected passes            11587
# of unsupported tests          2

                === libphobos Summary ===

# of expected passes            556
# of unexpected failures        7
# of unsupported tests          1

although I had to rerun the libphobos tests sequentially since several
would time out otherwise.

There's one caveat, though, that applies equally to Mac OS X 10.7 and
macOS 12.1: at least some of the stage1 dependency lists in gcc/d/.deps
are corrupt in that they contain D source code after the dependencies
proper, e.g. gcc/d/.deps/hash.Po:

d/root-hash.o: /vol/gcc/src/hg/master/darwin/gcc/d/dmd/root/hash.d
is.value == c.value;
    }

    override size_t getHash(scope const void* p) @trusted const
    {
        return getArrayHash(value, p, len);
    }
[...]

I cannot yet tell if this is just an issue with GCC 11.1.0 gdc or
libphobos that's fixed in 11.2.0 or gcc-11 branch.

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
  2021-12-13 12:09 ` [Bug d/103577] " ro at CeBiTec dot Uni-Bielefeld.DE
@ 2021-12-13 12:23 ` ibuclaw at gdcproject dot org
  2021-12-13 12:26 ` ibuclaw at gdcproject dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ibuclaw at gdcproject dot org @ 2021-12-13 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #1)
> I cannot yet tell if this is just an issue with GCC 11.1.0 gdc or
> libphobos that's fixed in 11.2.0 or gcc-11 branch.


It could be this patch fixes that.

https://gcc.gnu.org/pipermail/gcc-patches/2021-July/576395.html

It was requested to be backported back in November.

https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585450.html

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
  2021-12-13 12:09 ` [Bug d/103577] " ro at CeBiTec dot Uni-Bielefeld.DE
  2021-12-13 12:23 ` ibuclaw at gdcproject dot org
@ 2021-12-13 12:26 ` ibuclaw at gdcproject dot org
  2021-12-13 12:54 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ibuclaw at gdcproject dot org @ 2021-12-13 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
FYI, with darwin, I've only been using the most recent commit in
releases/gcc-11 for testing as there have been a number of issues exposed from
that port.

I have VMs set-up running 10.4 (PPC), 10.6 (x86_64), 10.13, 10.14, 10.15, 11,
and 12.  Not yet gotten round to building a bootstrap compiler from gcc-11 just
yet though for testing build of master.

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-12-13 12:26 ` ibuclaw at gdcproject dot org
@ 2021-12-13 12:54 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2021-12-13 12:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2021-12-15  9:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
  5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2021-12-13 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #1)
>> I cannot yet tell if this is just an issue with GCC 11.1.0 gdc or
>> libphobos that's fixed in 11.2.0 or gcc-11 branch.
>
>
> It could be this patch fixes that.
>
> https://gcc.gnu.org/pipermail/gcc-patches/2021-July/576395.html
>
> It was requested to be backported back in November.
>
> https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585450.html

Seems quite plausible indeed.  I'll give the top of the gcc-11 branch a
whirl on both 10.7 and 12.  Maybe that's all it takes to get working
bootstrap compilers.

I previously took gcc 11.1.0 simply because I had the tree still around.

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-12-13 12:54 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2021-12-13 12:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2021-12-15  9:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
  5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2021-12-13 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> FYI, with darwin, I've only been using the most recent commit in
> releases/gcc-11 for testing as there have been a number of issues exposed from
> that port.
>
> I have VMs set-up running 10.4 (PPC), 10.6 (x86_64), 10.13, 10.14, 10.15, 11,
> and 12.  Not yet gotten round to building a bootstrap compiler from gcc-11 just
> yet though for testing build of master.

Good to know.  Once the gcc-11 builds are done, I'll retry bootstrapping
master on 10.7 and 12.  Maybe the SEGVs on 10.7 stage1 will be gone that
way...

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

* [Bug d/103577] d21 SIGSEGV on Darwin/x86_64
  2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-12-13 12:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2021-12-15  9:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
  5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2021-12-15  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
> Uni-Bielefeld.DE> ---
>> --- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
>> FYI, with darwin, I've only been using the most recent commit in
>> releases/gcc-11 for testing as there have been a number of issues exposed from
>> that port.
>>
>> I have VMs set-up running 10.4 (PPC), 10.6 (x86_64), 10.13, 10.14, 10.15, 11,
>> and 12.  Not yet gotten round to building a bootstrap compiler from gcc-11 just
>> yet though for testing build of master.
>
> Good to know.  Once the gcc-11 builds are done, I'll retry bootstrapping
> master on 10.7 and 12.  Maybe the SEGVs on 10.7 stage1 will be gone that
> way...

I've now done just that:

* build top of gcc-11 with --enable-languages=d --enable-libphobos

* use that as bootstrap gdc for master

Results are pretty good:

* The corrupted *.Po files in stage1 are gone.

* On 10.7, the d21 SEGV is gone

* gdc and libphobos testsuite results on both 10.7 and 12 are
  reasonable.

There's one caveat, though:

On 10.7 (so far), a couple of files don't compile building stage2 libphobos:

dyld: Symbol not found: __D6object10_xopEqualsFxPvxQdZb
  Referect10_xopEqualsFxPvxQdZb
  Referenced from: /var/gcc/regression/mnced from:
/var/gcc/regression/master/10.7-gcc/build/./gcc/d21
  Expected in:
/var/gcc/regression/master/10.7-gcc/build/x86_64-apple-darwin11.4.2/libphobos/src/.libs/libgphobos.2.dylib
 in
/var/gcc/regression/master/10.7-gcc/gcc/regression/master/10.7-gcc/build/./gcc/d21

and indeed that symbol (object._xopEquals(const(void*), const(void*)))
is missing from the freshly built libgphobos, while it is present in the
gcc-11 one.

I suspect this happens because the toplevel Makefile sets
DYLD_LIBRARY_PATH, since when I just run make in
x86_64-apple-darwin11.4.2/libphobos, the build succeeds without further
problems.

There are two issues here, I believe:

* The one line patch to gcc/config/darwin.h to support -static-libphobos
  should be backported to the gcc-11 branch to avoid this in the first
  place.

* Besides, making incompatible changes to libgphobos (like removing an
  exported interface) shouldn't be done without increasing the library
  version number.

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

end of thread, other threads:[~2021-12-15  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 10:19 [Bug d/103577] New: d21 SIGSEGV on Darwin/x86_64 ro at gcc dot gnu.org
2021-12-13 12:09 ` [Bug d/103577] " ro at CeBiTec dot Uni-Bielefeld.DE
2021-12-13 12:23 ` ibuclaw at gdcproject dot org
2021-12-13 12:26 ` ibuclaw at gdcproject dot org
2021-12-13 12:54 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-12-13 12:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-12-15  9:25 ` ro at CeBiTec dot Uni-Bielefeld.DE

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