public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/103528] New: [12 regression] d21 doesn't build on Solaris
@ 2021-12-02 12:46 ro at gcc dot gnu.org
  2021-12-02 12:46 ` [Bug d/103528] " ro at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: ro at gcc dot gnu.org @ 2021-12-02 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103528
           Summary: [12 regression] d21 doesn't build on Solaris
           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: ---
            Target: *-*-solaris2.11

The migration to the DMD-based D frontend badly broke Solaris bootstrap on both
sparc and x86.  I'm always using GCC 9.1.0 as bootstrap compiler.

* Solaris 11.4/x86 configured to use /bin/as:

  stage 1 d21 fails to link:

ld: fatal: library -lgphobos: not found

  No wonder, libphobos is disabled on Solaris/x86 when /bin/as is in use.

* Solaris 11.4/x86 configured to use gas:

  libphobos doesn't build:

/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/internal/gc/impl/conservative/gc.d:3169:47:
error: undefined identifier 'SIG_BLOCK'
 3169 |             auto sigmask_rc = pthread_sigmask(SIG_BLOCK, &new_mask,
&old_mask);
      |           

  SIG_BLOCK is used unconditionally, but defined nowhere.  It should be in
  libphobos/libdruntime/core/sys/posix/signal.d.  I'm use a local patch
  (attached) to fix that.

* Solaris 11.4/sparc configured to use /bin/as:

  cannot compile d21, always like:

d21: error: cannot find source code for runtime library file 'object.d'
d21: note: dmd might not be correctly installed. Run 'dmd -man' for
installation instructions.
d21: note: config file: not found
import path[0] = /vol/gcc/src/hg/master/local/gcc/d

  For one, libphobos isn't enabled on Solaris/SPARC by default, so no include
  files are installed.  On Solaris/x86, I default to a gas-based gcc, so
  includes are installed for the bootstrap compiler.

  Besides, the message about dmd -man is wrong/misleading for gdc.

After that, I rebuilt gcc 9.1.0 with gas and --enable-libphobos to get an
appropriate bootstrap compiler. However

* Solaris 11.4/sparc configured to use gas:

  stage 1 d21 cannot even compile a trivial test program when configuring
  libphobos

configure: error: can't compile D sources!
make[2]: *** [Makefile:26643: configure-stage1-target-libphobos] Error 1

  so the build stops.  I'll report the details separately.

I believe there are several issues here beyond the Solaris problems:

* toplevel configure needs to make certain that the bootstrap gdc can compile
  *and link* some trivial D program.  Letting the build proceed otherwise leads
  to confusing link errors as seen here.  gnat can do away without such a test
  because there are no gnat without libgnat configurations (either you have a
  fully working GNAT or you have none), while the gdc without libphobos 
  situation is quite common in GCC.

* I suspect it's time to do away without disabling libphobos on Solaris with
  /bin/as.  I've now successfully bootstrapped master on Solaris 11.3 and 11.4
  with such a patch with both as and gas and the testresults are mostly the
same.
  Certainly no build failures.

* Likewise, it might be possible to declare Solaris/SPARC as sort of supported
  in libphobos.  The test results are still worse than on Solaris/x86, but not
  fundamentally so.

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

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 12:46 [Bug d/103528] New: [12 regression] d21 doesn't build on Solaris ro at gcc dot gnu.org
2021-12-02 12:46 ` [Bug d/103528] " ro at gcc dot gnu.org
2021-12-02 12:49 ` ro at gcc dot gnu.org
2021-12-02 12:50 ` ro at gcc dot gnu.org
2021-12-02 13:11 ` ibuclaw at gdcproject dot org
2021-12-10  4:27 ` cvs-commit at gcc dot gnu.org
2021-12-15 22:20 ` ibuclaw at gdcproject dot org
2021-12-16 12:11 ` ro at CeBiTec dot Uni-Bielefeld.DE
2021-12-16 17:38 ` ibuclaw at gdcproject dot org
2021-12-16 17:41 ` ibuclaw at gdcproject dot org
2021-12-21 20:30 ` cvs-commit at gcc dot gnu.org
2022-03-09 13:52 ` rguenth at gcc dot gnu.org
2022-03-09 14:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-10 10:30 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-11  8:45 ` cvs-commit at gcc dot gnu.org
2022-03-18 11:45 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-04-28  8:32 ` cvs-commit at gcc dot gnu.org
2022-05-06  8:32 ` [Bug d/103528] [12/13 " jakub at gcc dot gnu.org
2023-02-21 15:02 ` rguenth at gcc dot gnu.org
2023-04-25 15:12 ` [Bug d/103528] [12/13/14 " ro at gcc dot gnu.org

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