[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1 test ( tests/mdemo2-make.test ) fails on Solaris 10
From: |
Bob Friesenhahn |
Subject: |
Re: 1 test ( tests/mdemo2-make.test ) fails on Solaris 10 |
Date: |
Sun, 14 Jun 2009 15:15:09 -0500 (CDT) |
On Sun, 14 Jun 2009, Dr. David Kirkby wrote:
However, it was pointed out to me by a Sun employee that there is no need to
ever link libpthread in Solaris 10. Al the functionality has been moved to
libc.
Are you absolutely sure about this? For many years, Solaris libc has
used weak references so that if libpthread was added to the link it
behaved differently. This results in pthread symbols in libc. The
reason for this approach was so that libraries/applications could use
the same libc, but without penalizing thread safe libraries linked
into single-threaded applications. It also allowed the same libc to
be used with UI threads (-lthread).
Note these 'undefined reference' messages with SUNW in the name have come up
for years with different versions of gcc. In gcc 4.3.2 I don't see them, but
I do see them in 4.4.0
Perhaps there is a difference with how your 4.3.2 and 4.4.0 were built
and the misbehaving one is using the GNU linker from binutils. I
found it necessary to use the GNU linker to build GCC 4.4.0 on x86 but
the GNU linker is otherwise not very useful under Solaris and using it
under Solaris is like (slowly) digging your own grave. Once GCC 4.4.X
can use Solaris ld again then I will start to use it. Complaints
about weak symbols are just the tip of the iceberg when using GNU ld
under Solaris.
Check the output of 'gcc -v'. In my GCC 4.3.3 build I have this:
--without-gnu-ld --with-ld=/usr/ccs/bin/ld
but in my GCC 4.4.0 build I have this:
--with-ld=/usr/local/lib/binutils-2.19/bin/ld
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/