Hmm...there really needs to be a "how to debug emerge failures FAQ" or at least a "howto" on post for help :D

The error message posted is the diagnostic error for emerge/portage. To debug this we need the information above the line ">>> Failed to emerge media-libs/mesa-9.0.1, Log file: "

In the next line of the diagnostic there's a file ">>> '/var/tmp/portage/media-libs/mesa-9.0.1/temp/build.log' " - this contains the mess of stuff that printed out before it printed this diagnostic error. In this file, check the end of the file. Pastebin that file or post the last few lines before it says "failed to emerge."_________________Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSDWhat am I supposed to be advocating?

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:61,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:61,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/functexcept.h:36:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:62,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/cpp_type_traits.h:38:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:63,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndefIn file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/functexcept.h:36:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:62,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/ext/type_traits.h:34:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:64,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndefIn file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/cpp_type_traits.h:38:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:63,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/ext/type_traits.h:34:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:64,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:33:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:33:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:34,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndefIn file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:34,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/concept_check.h:35:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:35,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/concept_check.h:35:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/move.h:35,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_pair.h:60,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_iterator_base_types.h:65:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndefIn file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_iterator_base_types.h:65:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_iterator_base_types.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_iterator_base_types.h:66,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_algobase.h:67,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:61,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/new:41,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/ext/new_allocator.h:33,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h:34,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/allocator.h:48,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:62,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/exception:39:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/new:42,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/ext/new_allocator.h:33,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h:34,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/allocator.h:48,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:62,
from ../sigc++/signal_base.h:25,
from signal_base.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndefIn file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/cstddef:43:0,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/new:41,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/ext/new_allocator.h:33,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h:34,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/bits/allocator.h:48,
from /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/list:62,
from ../sigc++/signal.h:7,
from signal.cc:20:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h:31:0: error: unterminated #ifndef