title: Compiling using gcc 3.2.3 on RHE 5.3
body: <p>Some work I'm doing for a client requires me to build using a very old version of gcc on Red Hat Enterprise. We recently shifted from 4.x to 5.3 and I'm hitting some compile errors when I try to build simple example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      std::cout &lt;&lt; "Hello World" &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>bash-3.2$ g++ -o hello hello.cpp
  In file included from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/bits/stl_alloc.h:90,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/memory:55,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/string:48,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/bits/localefwd.h:49,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/ios:48,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/ostream:45,
                   from /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/iostream:45,
                   from hello.cpp:1:
  /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/bits/stl_threads.h: In 
     constructor `std::_Refcount_Base::_Refcount_Base(unsigned int)':
  /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/bits/stl_threads.h:74: error: `
     __LOCK_INITIALIZER' undeclared (first use this function)
  /opt/ext/gcc-3.2.3.34rh/include/c++/3.2.3/bits/stl_threads.h:74: error: (Each
     undeclared identifier is reported only once for each function it appears 
     in.)
  </code></pre>
  
  <p><code>__LOCK_INITIALIZER</code> is a pthreads macro, but clearly I'm not using it directly here. Has anyone seen this kind of problem before or can offer any possible suggestions as tyo why this is happening?</p>