From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8DD453858D39; Thu, 2 Dec 2021 12:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DD453858D39 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/103528] New: [12 regression] d21 doesn't build on Solaris Date: Thu, 02 Dec 2021 12:46:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2021 12:46:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103528 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/co= nservative/gc.d:3169:47: error: undefined identifier 'SIG_BLOCK' 3169 | auto sigmask_rc =3D pthread_sigmask(SIG_BLOCK, &new_mas= k, &old_mask); |=20=20=20=20=20=20=20=20=20=20=20 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] =3D /vol/gcc/src/hg/master/local/gcc/d For one, libphobos isn't enabled on Solaris/SPARC by default, so no inclu= de 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 compi= le *and link* some trivial D program. Letting the build proceed otherwise l= eads to confusing link errors as seen here. gnat can do away without such a t= est because there are no gnat without libgnat configurations (either you have= a fully working GNAT or you have none), while the gdc without libphobos=20 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 1= 1.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 suppor= ted in libphobos. The test results are still worse than on Solaris/x86, but = not fundamentally so.=