Just as an update...
I'm running into this same link error with a number of other packages. It's
really looking like something wrong with the interaction between gcc 2.95.3,
and glibc 2.2.5. :(
Mark Post
-----Original Message-----
From: Post, Mark K
Sent: Tuesday, December 03, 2002 6:13 PM
To: 'Ulrich Weigand'
Cc: [EMAIL PROTECTED]
Subject: RE: Compilation (link) failure for libsigc++ package
Ulrich,
I changed the bastring.cc file as you suggested. It made no difference. I
get exactly the same error as before. The .ii file showed that the modified
line was being included:
template <class charT, class traits, class Allocator>
ostream &
operator<< (ostream &o, const basic_string <charT, traits, Allocator>& s)
{
return o.write (s.data (), (streamsize) s.length ());
}
Mark Post
-----Original Message-----
From: Ulrich Weigand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 5:44 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Compilation (link) failure for libsigc++ package
Mark,
> That's where things get a little strange. The source module is only 44
> lines line, and line 25 is a blank line. :( Here's the entire module:
I'm not sure, but I guess this means it happens during template
expansion for a template needed in main. This would be the
'retbind' invokation, I guess. Could you compile with --save-temps
and send me the resulting .ii file?
> parser.o: In function `ostream & operator<<<char,
string_char_traits<char>,
> __default_alloc_template
> <true, 0> >(ostream &, basic_string<char, string_char_traits<char>,
> __default_alloc_template<true, 0
> > > const &)':
>
parser.o(.gnu.linkonce.t.__ls__H3ZcZt18string_char_traits1ZcZt24__default_al
> loc_template2b1i0_R7ostr
> eamRCt12basic_string3ZX01ZX11ZX21_R7ostream+0x10): undefined reference to
> `ostream::write(char const
> *, long)'
Hmm, this looks like a bug in the standard headers themselves ...
I'm assuming you are using gcc 2.95.3, right? This comes with a
header file /usr/include/g++/std/bastring.cc, which reads around
line 470:
template <class charT, class traits, class Allocator>
ostream &
operator<< (ostream &o, const basic_string <charT, traits, Allocator>& s)
{
return o.write (s.data (), s.length ());
}
This calls ostream::write with a second argument of type
size_t, which is long on s390, not streamsize, which is
int on s390 ...
Does it help if you change that line to:
return o.write (s.data (), (streamsize) s.length ());
Bye,
Ulrich
--
Dr. Ulrich Weigand
[EMAIL PROTECTED]