title: How to compile doom on ubuntu?
body: <p>I am trying to compile the source code for the original doom as a way to learn C. I downloaded it from <a href="https://github.com/id-Software/DOOM" rel="noreferrer">github</a> and fixed an obvious mistake in i_video.c line 49 (errnos.h -> errno.h). </p>
  
  <p>I now get this:</p>
  
  <pre><code>m_misc.c:257:5: warning: initialization from incompatible pointer type [enabled by default]
  m_misc.c:257:5: warning: (near initialization for ‘defaults[14].location’) [enabled by default]
  m_misc.c:257:5: error: initializer element is not computable at load time
  m_misc.c:257:5: error: (near initialization for ‘defaults[14].defaultvalue’)
  m_misc.c:264:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:264:5: error: initializer element is not constant
  m_misc.c:264:5: error: (near initialization for ‘defaults[16].defaultvalue’)
  m_misc.c:265:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:265:5: error: initializer element is not constant
  m_misc.c:265:5: error: (near initialization for ‘defaults[17].defaultvalue’)
  m_misc.c:288:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:288:5: error: initializer element is not constant
  m_misc.c:288:5: error: (near initialization for ‘defaults[31].defaultvalue’)
  m_misc.c:289:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:289:5: error: initializer element is not constant
  m_misc.c:289:5: error: (near initialization for ‘defaults[32].defaultvalue’)
  m_misc.c:290:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:290:5: error: initializer element is not constant
  m_misc.c:290:5: error: (near initialization for ‘defaults[33].defaultvalue’)
  m_misc.c:291:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:291:5: error: initializer element is not constant
  m_misc.c:291:5: error: (near initialization for ‘defaults[34].defaultvalue’)
  m_misc.c:292:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:292:5: error: initializer element is not constant
  m_misc.c:292:5: error: (near initialization for ‘defaults[35].defaultvalue’)
  m_misc.c:293:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:293:5: error: initializer element is not constant
  m_misc.c:293:5: error: (near initialization for ‘defaults[36].defaultvalue’)
  m_misc.c:294:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:294:5: error: initializer element is not constant
  m_misc.c:294:5: error: (near initialization for ‘defaults[37].defaultvalue’)
  m_misc.c:295:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:295:5: error: initializer element is not constant
  m_misc.c:295:5: error: (near initialization for ‘defaults[38].defaultvalue’)
  m_misc.c:296:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:296:5: error: initializer element is not constant
  m_misc.c:296:5: error: (near initialization for ‘defaults[39].defaultvalue’)
  m_misc.c:297:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  m_misc.c:297:5: error: initializer element is not constant
  m_misc.c:297:5: error: (near initialization for ‘defaults[40].defaultvalue’)
  m_misc.c: In function ‘M_LoadDefaults’:
  m_misc.c:395:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  make: *** [linux/m_misc.o] Error 1
  </code></pre>
  
  <p>in the m_misc.c file during this declaration on the lines that contain casts:</p>
  
  <pre><code>default_t   defaults[] =
  {
      {"mouse_sensitivity",&amp;mouseSensitivity, 5},
      {"sfx_volume",&amp;snd_SfxVolume, 8},
      {"music_volume",&amp;snd_MusicVolume, 8},
      {"show_messages",&amp;showMessages, 1},
  
  
  #ifdef NORMALUNIX
      {"key_right",&amp;key_right, KEY_RIGHTARROW},
      {"key_left",&amp;key_left, KEY_LEFTARROW},
      {"key_up",&amp;key_up, KEY_UPARROW},
      {"key_down",&amp;key_down, KEY_DOWNARROW},
      {"key_strafeleft",&amp;key_strafeleft, ','},
      {"key_straferight",&amp;key_straferight, '.'},
  
      {"key_fire",&amp;key_fire, KEY_RCTRL},
      {"key_use",&amp;key_use, ' '},
      {"key_strafe",&amp;key_strafe, KEY_RALT},
      {"key_speed",&amp;key_speed, KEY_RSHIFT},
  
  // UNIX hack, to be removed. 
  #ifdef SNDSERV
      {"sndserver", (int *) &amp;sndserver_filename, (int) "sndserver"},
      {"mb_used", &amp;mb_used, 2},
  #endif
  
  #endif
  
  #ifdef LINUX
      {"mousedev", (int*)&amp;mousedev, (int)"/dev/ttyS0"},
      {"mousetype", (int*)&amp;mousetype, (int)"microsoft"},
  #endif
  
      {"use_mouse",&amp;usemouse, 1}, 
      {"mouseb_fire",&amp;mousebfire,0},
      {"mouseb_strafe",&amp;mousebstrafe,1},
      {"mouseb_forward",&amp;mousebforward,2},
  
      {"use_joystick",&amp;usejoystick, 0}, 
      {"joyb_fire",&amp;joybfire,0},
      {"joyb_strafe",&amp;joybstrafe,1},
      {"joyb_use",&amp;joybuse,3},
      {"joyb_speed",&amp;joybspeed,2},
  
      {"screenblocks",&amp;screenblocks, 9}, 
      {"detaillevel",&amp;detailLevel, 0}, 
  
      {"snd_channels",&amp;numChannels, 3}, 
  
  
  
      {"usegamma",&amp;usegamma, 0},
      {"chatmacro0", (int *) &amp;chat_macros[0], (int) HUSTR_CHATMACRO0 },
      {"chatmacro1", (int *) &amp;chat_macros[1], (int) HUSTR_CHATMACRO1 },
      {"chatmacro2", (int *) &amp;chat_macros[2], (int) HUSTR_CHATMACRO2 },
      {"chatmacro3", (int *) &amp;chat_macros[3], (int) HUSTR_CHATMACRO3 },
      {"chatmacro4", (int *) &amp;chat_macros[4], (int) HUSTR_CHATMACRO4 },
      {"chatmacro5", (int *) &amp;chat_macros[5], (int) HUSTR_CHATMACRO5 },
      {"chatmacro6", (int *) &amp;chat_macros[6], (int) HUSTR_CHATMACRO6 },
      {"chatmacro7", (int *) &amp;chat_macros[7], (int) HUSTR_CHATMACRO7 },
      {"chatmacro8", (int *) &amp;chat_macros[8], (int) HUSTR_CHATMACRO8 },
      {"chatmacro9", (int *) &amp;chat_macros[9], (int) HUSTR_CHATMACRO9 }
  
  };
  </code></pre>
  
  <p>Is this an incompatibility with modern compilers? Has anyone managed to get passed it?</p>