This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

'no matching function' error while building egcs 1.1.2


Greetings,

I encountered a couple of 'no matching function ...' errors while building
egcs-1.1.2 on SUN Solaris 2.5.1 (SPARC). The compiler I used to build egcs-1.1.2
is egcs-1.1.1(egcs-2.91.57).

I configured it as follows:

cd <egcs_top_dir>
mkdir objs
cd objs
../configure --enable-languages="c,c++"
make


The first error was:

=====
test x"no" != xyes || \
  /mnt/egcs-1.1.2/objs/gcc/xgcc -B/mnt/egcs-1.1.2/objs/gcc/ -c -g -O2
-fno-implicit-templates -I. -I../../../libio -nostdinc++  
../../../libio/isscan.cc -o pic/isscan.o
/mnt/egcs-1.1.2/objs/gcc/xgcc -B/mnt/egcs-1.1.2/objs/gcc/ -c -g -O2
-fno-implicit-templates -I. -I../../../libio -nostdinc++  ../../../libio/isscan.cc
../../../libio/isscan.cc: In method `class istream & istream::scan(const char * ...)':
../../../libio/isscan.cc:34: no matching function for call to `streambuf::vscan
(const char *&, void *&, istream *)'
../../../libio/streambuf.h:403: candidates are: streambuf::vscan(const char *,
char *, ios *)
make[1]: *** [isscan.o] Error 1
make[1]: Leaving directory `/mnt/egcs-1.1.2/objs/sparc-sun-solaris2.5.1/libio'
make: *** [all-target-libio] Error 2
=====

and then:

=====
test x"no" != xyes || \
  /mnt/egcs-1.1.2/objs/gcc/xgcc -B/mnt/egcs-1.1.2/objs/gcc/ -c -g -O2
-fno-implicit-templates -I. -I../../../libio -nostdinc++  
../../../libio/stream.cc -o pic/stream.o
/mnt/egcs-1.1.2/objs/gcc/xgcc -B/mnt/egcs-1.1.2/objs/gcc/ -c -g -O2
-fno-implicit-templates -I. -I../../../libio -nostdinc++  ../../../libio/stream.cc
../../../libio/stream.cc: In function `char * form(const char * ...)':
../../../libio/stream.cc:46: no matching function for call to `strstreambuf::vform
(const char *&, void *&)'
../../../libio/streambuf.h:405: candidates are: streambuf::vform(const char *,
char *)
make[1]: *** [stream.o] Error 1
make[1]: Leaving directory `/mnt/egcs-1.1.2/objs/sparc-sun-solaris2.5.1/libio'
make: *** [all-target-libio] Error 2
=====


I needed to change the sources as follows to make it build successfully.


diff -ur ./libio/isscan.cc ../after/libio/isscan.cc
--- ./libio/isscan.cc   Mon May 10 14:03:46 1999
+++ ../after/libio/isscan.cc    Mon May 10 14:04:55 1999
@@ -31,7 +31,8 @@
     if (ipfx0()) {
        va_list ap;
        va_start(ap, format);
-       _strbuf->vscan(format, ap, this);
+       // _strbuf->vscan(format, ap, this);
+       _strbuf->vscan(format, static_cast<char*>(ap), this);
        va_end(ap);
     }
     return *this;
@@ -40,6 +41,7 @@
 istream& istream::vscan(const char *format, _IO_va_list args)
 {
     if (ipfx0())
-       _strbuf->vscan(format, args, this);
+       // _strbuf->vscan(format, args, this);
+       _strbuf->vscan(format, static_cast<char*>(args), this);
     return *this;
 }
diff -ur ./libio/stream.cc ../after/libio/stream.cc
--- ./libio/stream.cc   Mon May 10 14:03:46 1999
+++ ../after/libio/stream.cc    Mon May 10 14:05:05 1999
@@ -43,7 +43,8 @@
     strstreambuf stream(buf, EndBuffer-buf-1, buf);
     va_list ap;
     va_start(ap, format);
-    int count = stream.vform(format, ap);
+    // int count = stream.vform(format, ap);
+    int count = stream.vform(format, static_cast<char*>(ap));
     va_end(ap);
     stream.sputc(0);
     next_chunk = buf + stream.pcount();


--KI

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]