public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3
@ 2020-12-16 10:11 ro at gcc dot gnu.org
  2020-12-16 10:12 ` [Bug c++/98316] " ro at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-16 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98316
           Summary: [11 regression] cc1plus doesn't link on Solaris 11.3
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: nathan at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.11

Even with PR c++/98315 hacked around, Solaris 11.3 (only) bootstrap is still
broken:

Undefined                       first referenced
 symbol                             in file
__xnet_connect                      ../libcody/libcody.a(netclient.o)
__xnet_socket                       ../libcody/libcody.a(netclient.o)
__xnet_getaddrinfo                  ../libcody/libcody.a(netclient.o)
freeaddrinfo                        ../libcody/libcody.a(netclient.o)
gai_strerror                        ../libcody/libcody.a(netclient.o)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
make[3]: *** [/vol/gcc/src/hg/master/local/gcc/cp/Make-lang.in:136: cc1plus]
Error 1

Before Solaris 11.4 folded libsocket and libnsl into libc, one needed to link
with both for the socket functions.  The same issue exists with the other use
of $(LIBCODY) in c++tools/Makefile.in.

We already have 4 instances of the libsocket/libnsl check in the tree:

  gotools/configure.ac
  libcc1/configure.ac
  libgo/configure.ac
  libphobos/m4/druntime/libraries.m4

Instead of adding yet two others, we could make use of the autoconf-archive's
m4/ax_lib_socket_nsl.m4 (AX_LIB_SOCKET_NSL).

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
@ 2020-12-16 10:12 ` ro at gcc dot gnu.org
  2020-12-16 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-16 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
  2020-12-16 10:12 ` [Bug c++/98316] " ro at gcc dot gnu.org
@ 2020-12-16 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2020-12-16 12:59 ` nathan at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-12-16 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
Besides, currently libcody.a (and, once this PR is fixed, libsocket and
libnsl) are linked into every backend instead of just into cc1plus.  I
believe this should change, just like f951 is the only user of $(ZLIB)
(and $(ZLIBINC)).

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
  2020-12-16 10:12 ` [Bug c++/98316] " ro at gcc dot gnu.org
  2020-12-16 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2020-12-16 12:59 ` nathan at gcc dot gnu.org
  2020-12-16 13:19 ` ro at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-16 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-12-16
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-12-16 12:59 ` nathan at gcc dot gnu.org
@ 2020-12-16 13:19 ` ro at gcc dot gnu.org
  2020-12-16 14:24 ` nathan at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-16 13:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 49778
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49778&action=edit
Initial patch

The attach has only been lightly tested so far: it allowed cc1plus to link on
Solaris 11.3, bootstrap still running.

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-12-16 13:19 ` ro at gcc dot gnu.org
@ 2020-12-16 14:24 ` nathan at gcc dot gnu.org
  2020-12-16 14:32 ` ro at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-16 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Looks good, and separating out cc1plus' libraries from other executables is
goodness.

do you want to take this bug?

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-12-16 14:24 ` nathan at gcc dot gnu.org
@ 2020-12-16 14:32 ` ro at gcc dot gnu.org
  2020-12-17 12:23 ` ro at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-16 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nathan at gcc dot gnu.org          |ro at gcc dot gnu.org

--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> ---
That's easiest, I guess.  With one minor addition (gcc/objcp/Make-lang.in needs
the same treatment), the Solaris 11.3 build completed successfully; make check
still running.

I'll try the patch on Solaris 11.4 and Linux/x86_64 tonight, then post it.

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-12-16 14:32 ` ro at gcc dot gnu.org
@ 2020-12-17 12:23 ` ro at gcc dot gnu.org
  2021-01-04 15:28 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-17 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2020-Decembe
                   |                            |r/562185.html

--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> ---
Final patch posted.

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-12-17 12:23 ` ro at gcc dot gnu.org
@ 2021-01-04 15:28 ` rguenth at gcc dot gnu.org
  2021-01-05 10:32 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-04 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
           Priority|P3                          |P1

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-01-04 15:28 ` rguenth at gcc dot gnu.org
@ 2021-01-05 10:32 ` cvs-commit at gcc dot gnu.org
  2021-01-05 10:33 ` ro at gcc dot gnu.org
  2021-01-05 13:37 ` nathan at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-05 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <ro@gcc.gnu.org>:

https://gcc.gnu.org/g:a20893cf6b95f60f5319b2196621acc65180125c

commit r11-6457-ga20893cf6b95f60f5319b2196621acc65180125c
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Tue Jan 5 11:32:31 2021 +0100

    build: libcody: Link with -lsocket -lnsl if necessary [PR98316]

    With the introduction of C++20 modules and libcody, cc1plus and
    cc1objplus gained a dependency on the socket functions.  Before those
    were merged into libc in Solaris 11.4, one needed to link with -lsocket
-lnsl
    on Solaris, so that merge broke the Solaris 11.3 build.

    While we already have 4 different checks for those libraries in the
    tree, I decided to import autoconf-archive's AX_LIB_SOCKET_NSL macro
    instead.  At the same time, the patch only links libcody and the
    networking libs where needed (cc1plus, cc1objplus).

    Bootstrapped without regressions on i386-pc-solaris2.11 (Solaris 11.3
    and 11.4), sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.

    2020-12-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

            c++tools:
            PR c++/98316
            * configure.ac: Include ../config/ax_lib_socket_nsl.m4.
            (NETLIBS): Determine using AX_LIB_SOCKET_NSL.
            * configure: Regenerate.
            * Makefile.in (NETLIBS): Define.
            (g++-mapper-server$(exeext)): Add $(NETLIBS).

            gcc/objcp:
            PR c++/98316
            * Make-lang.in (cc1objplus$(exeext)): Add $(CODYLIB), $(NETLIBS).

            gcc/cp:
            PR c++/98316
            * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).

            gcc:
            PR c++/98316
            * configure.ac (NETLIBS): Determine using AX_LIB_SOCKET_NSL.
            * aclocal.m4, configure: Regenerate.
            * Makefile.in (NETLIBS): Define.
            (BACKEND): Remove $(CODYLIB).

            config:
            PR c++/98316
            * ax_lib_socket_nsl.m4: Import from autoconf-archive.

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-01-05 10:32 ` cvs-commit at gcc dot gnu.org
@ 2021-01-05 10:33 ` ro at gcc dot gnu.org
  2021-01-05 13:37 ` nathan at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2021-01-05 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

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

--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> ---
Fixed for GCC 11.

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

* [Bug c++/98316] [11 regression] cc1plus doesn't link on Solaris 11.3
  2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-01-05 10:33 ` ro at gcc dot gnu.org
@ 2021-01-05 13:37 ` nathan at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-01-05 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
thanks Rainer!

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

end of thread, other threads:[~2021-01-05 13:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 10:11 [Bug c++/98316] New: [11 regression] cc1plus doesn't link on Solaris 11.3 ro at gcc dot gnu.org
2020-12-16 10:12 ` [Bug c++/98316] " ro at gcc dot gnu.org
2020-12-16 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
2020-12-16 12:59 ` nathan at gcc dot gnu.org
2020-12-16 13:19 ` ro at gcc dot gnu.org
2020-12-16 14:24 ` nathan at gcc dot gnu.org
2020-12-16 14:32 ` ro at gcc dot gnu.org
2020-12-17 12:23 ` ro at gcc dot gnu.org
2021-01-04 15:28 ` rguenth at gcc dot gnu.org
2021-01-05 10:32 ` cvs-commit at gcc dot gnu.org
2021-01-05 10:33 ` ro at gcc dot gnu.org
2021-01-05 13:37 ` nathan 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).