title: GCC compilation yields "real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)"
body: <p>I'm trying to compile GCC 4.7.2 on a <a href="http://www.buffalo-technology.com/en/linkstatio-pro-duo.html" rel="nofollow">Buffalo LinkStation Pro Duo</a> (after <a href="http://buffalo.nas-central.org/wiki/Open_Stock_Firmware_LS-VL" rel="nofollow">unlocking</a> it) which runs Linux 2.6.31.8 armv5tel.</p>
  
  <p>Unfortunately, <code>make</code> throws quite some errors, starting with</p>
  
  <pre><code>gcc -c  -DIN_GCC_FRONTEND -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-formIn file included from ../../gcc-4.7.2/gcc/tree.h:32,
                   from ../../gcc-4.7.2/gcc/c-lang.c:27:
  ../../gcc-4.7.2/gcc/real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)
  In file included from ../../gcc-4.7.2/gcc/tree.h:32,
                   from ../../gcc-4.7.2/gcc/c-lang.c:27:
  ../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
  ../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
  ../../gcc-4.7.2/gcc/real.h:90:6: error: division by zero in #if
  </code></pre>
  
  <p>Line 53 of <code>real.h</code> reads <code>unsigned long sig[SIGSZ];</code>, where <code>SIGSZ</code> is defined at line 40 as<br>
  <code>#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)</code><br>
  while line 87 is <code>#if REAL_WIDTH == 1</code> with <code>REAL_WIDTH</code> defined starting at line 72 as<br>
  <code>#define REAL_WIDTH \<br>
    (REAL_VALUE_TYPE_SIZE/HOST_BITS_PER_WIDE_INT \<br>
     + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */</code></p>
  
  <p>This seems to boil down to the <code>HOST_BITS_PER_*</code> being zero. Do I have to define these manually with some <code>configure</code> parameter or how can this issue be resolved?</p>
  
  <hr>
  
  <p><strong>update</strong></p>
  
  <p><code>config.log</code> contains the following errors:</p>
  
  <pre><code>conftest.c:10:19: error: ppl_c.h: No such file or directory
  conftest.c: In function 'main':
  conftest.c:16: error: 'choke' undeclared (first use in this function)
  conftest.c:16: error: (Each undeclared identifier is reported only once
  conftest.c:16: error: for each function it appears in.)
  conftest.c:16: error: expected ';' before 'me'
  configure:5708: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | #define LT_OBJDIR ".libs/"
  | /* end confdefs.h.  */
  | #include "ppl_c.h"
  | int
  | main ()
  | {
  |.
  |     #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR &lt; 11
  |     choke me
  |     #endif
  |.
  |   ;
  |   r
  </code></pre>
  
  <p>Following <a href="https://groups.google.com/forum/?fromgroups=#!topic/gnu.gcc.help/72AMJrsw-IU" rel="nofollow">this post</a> I seem to have forgotten to install <a href="http://bugseng.com/products/ppl/Download/" rel="nofollow">ppl</a>, which I'll try now</p>