This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Really weird build problem: please help
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Date: Mon, 28 Jun 2004 17:52:12 +0200
- Subject: Really weird build problem: please help
Hi,
I'm playing with finally changing some algorithms to use cpp_type_traits
instead of type_traits, and class templates instead of function templates as
advised by Gaby some time ago, and stumbled upon this real mystery.
If I apply the trivial attached patch, then the build FAILS in
ios_init.cc (!!!),
like below.
I'm lost. Perhaps an #include guard is missing somewhere? I have no clue...
Paolo.
/////////////////
/home/paolo/Gcc/cvs-dirs/gcc-head-build/gcc/xgcc -shared-libgcc
-B/home/paolo/Gcc/cvs-dirs/gcc-head-build/gcc/ -nostdinc++
-L/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gcc-exp/i686-pc-linux-gnu/bin/
-B/usr/local/gcc-exp/i686-pc-linux-gnu/lib/ -isystem
/usr/local/gcc-exp/i686-pc-linux-gnu/include -isystem
/usr/local/gcc-exp/i686-pc-linux-gnu/sys-include
-I/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu
-I/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include
-I/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/libsupc++ -O2 -g
-O2 -g -O2 -D_GNU_SOURCE -fno-implicit-templates -Wall -Wextra
-Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -c
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc -fPIC -DPIC -o
.libs/ios_init.o
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc: In constructor
`std::ios_base::Init::Init()':
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:90: error:
`buf_cout_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:90: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:90: error: ISO C++
forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:90: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:91: error:
`buf_cin_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:91: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:91: error: ISO C++
forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:91: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:92: error:
`buf_cerr_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:92: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:92: error: ISO C++
forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:92: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:104: error:
`buf_wcout_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:104: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:104: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:104: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:105: error:
`buf_wcin_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:105: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:105: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:105: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:106: error:
`buf_wcerr_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:106: error:
expected type-specifier before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:106: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:106: error:
expected `;' before "stdio_sync_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc: In static member
function `static bool std::ios_base::sync_with_stdio(bool)':
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:163: error:
`buf_cout_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:163: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:163: error:
expected primary-expression before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:163: error:
expected `;' before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:164: error:
`buf_cin_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:164: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:164: error:
expected primary-expression before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:164: error:
expected `;' before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:165: error:
`buf_cerr_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:165: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:165: error:
expected primary-expression before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:165: error:
expected `;' before "char"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:168: error:
`buf_wcout_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:168: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:168: error:
expected primary-expression before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:168: error:
expected `;' before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:169: error:
`buf_wcin_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:169: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:169: error:
expected primary-expression before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:169: error:
expected `;' before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:170: error:
`buf_wcerr_sync' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:170: error:
expected template-name before '<' token
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:170: error:
expected primary-expression before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:170: error:
expected `;' before "wchar_t"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:176: error:
`buf_cout' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:176: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:176: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:176: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:177: error:
`buf_cin' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:177: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:177: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:177: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:178: error:
`buf_cerr' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:178: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:178: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:178: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:185: error:
`buf_wcout' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:185: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:185: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:185: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:186: error:
`buf_wcin' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:186: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:186: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:186: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:187: error:
`buf_wcerr' was not declared in this scope
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:187: error:
expected type-specifier before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:187: error: ISO
C++ forbids declaration of `type name' with no type
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:187: error:
expected `;' before "stdio_filebuf"
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:163: warning:
unused variable 'buf_cout_sync'
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:164: warning:
unused variable 'buf_cin_sync'
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:165: warning:
unused variable 'buf_cerr_sync'
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:168: warning:
unused variable 'buf_wcout_sync'
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:169: warning:
unused variable 'buf_wcin_sync'
../../../../gcc-head/gcc/libstdc++-v3/src/ios_init.cc:170: warning:
unused variable 'buf_wcerr_sync'
make[2]: *** [ios_init.lo] Error 1
make[2]: Leaving directory
`/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3'
make: *** [all] Error 2
diff -urN libstdc++-v3-orig/include/bits/stl_algobase.h libstdc++-v3/include/bits/stl_algobase.h
--- libstdc++-v3-orig/include/bits/stl_algobase.h 2004-06-25 16:17:58.000000000 +0200
+++ libstdc++-v3/include/bits/stl_algobase.h 2004-06-28 17:39:46.000000000 +0200
@@ -70,6 +70,7 @@
#include <iosfwd>
#include <bits/stl_pair.h>
#include <bits/type_traits.h>
+#include <bits/cpp_type_traits.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>