[Bug c++/51204] New: g++ does not link getaddrinfo with -lxnet on OpenIndiana

2011-11-17 Thread johann at myrkraverk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51204

 Bug #: 51204
   Summary: g++ does not link getaddrinfo with -lxnet on
OpenIndiana
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: joh...@myrkraverk.com


Created attachment 25851
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25851
Preprocessed source code that does not link with libxnet.

The c++ compiler, g++, does not link the getaddrinfo symbol with libxnet.

  johann@asuka:C++/CompilerBugs% g++ SolarisG++4.6.2-lxnet.c++ -lxnet
  /var/tmp//ccDVaaGw.o: In function `main':
  SolarisG++4.6.2-lxnet.c:(.text+0x29): undefined reference
to`__xnet_getaddrinfo'
  collect2: ld returned 1 exit status
  johann@asuka:C++/CompilerBugs(1)%

On the other hand, gcc does (the file has been renamed).

  % gcc SolarisG++4.6.2-lxnet.c -lxnet
  johann@asuka:C++/CompilerBugs%

The system is OpenIndiana 151a.

  johann@asuka:C++/CompilerBugs% uname -a
  SunOS asuka 5.11 oi_151a i86pc i386 i86pc

This is vanilla GCC 4.6.2.

  johann@asuka:C++/CompilerBugs(1)% g++ --version   g++ (GCC) 4.6.2
  Copyright (C) 2011 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  johann@asuka:C++/CompilerBugs%

And the configure flags are:

  /opt/myrkraverk/src/gcc/4.6.2/configure \
--prefix=/opt/myrkraverk/gcc/4.6.2 \
--with-local-prefix=/opt/myrkraverk/include \
--with-gnu-as \
--with-as=/usr/gnu/bin/as \
--with-gnu-ld \
--with-ld=/usr/gnu/bin/ld \
--enable-version-specific-runtime-libs \
--with-gmp=/usr/gnu --with-mpfr=/usr/gnu \
--with-libiconv-prefix=/usr/gnu \
--with-ecj-jar=/opt/myrkraverk/src/gcc/ecj-4.5.jar

And for the record, there is nothing in /usr/local, hence --with-local-prefix.


[Bug c++/51204] g++ does not link getaddrinfo with -lxnet on OpenIndiana

2011-11-18 Thread johann at myrkraverk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51204

Johann 'Myrkraverk' Oskarsson  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|WORKSFORME  |

--- Comment #4 from Johann 'Myrkraverk' Oskarsson  2011-11-18 19:54:40 UTC ---
The system supplied g++, 4.6.1, which uses the Sun ld also fails:

  johann@asuka:C++/CompilerBugs(1)% g++ SolarisG++4.6.2-lxnet.c++ -lxnet
  Undefined  first referenced
   symbolin file
  __xnet_getaddrinfo  /var/tmp//ccFXaiyD.o
  ld: fatal: symbol referencing errors. No output written to a.out
  collect2: ld returned 1 exit status
  johann@asuka:C++/CompilerBugs(1)%


[Bug target/51204] g++ does not link getaddrinfo with -lxnet on OpenIndiana

2011-11-18 Thread johann at myrkraverk dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51204

Johann 'Myrkraverk' Oskarsson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #5 from Johann 'Myrkraverk' Oskarsson  2011-11-18 22:24:08 UTC ---
This has been reported as a bug 1794 in Illumos.