<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Wojno: X11R6-R7 Upgrade Problem: elf_load_section: truncated ELF file</title>
    <link>http://christopher.wojno.com/articles/2007/11/17/x11r6-r7-upgrade-problem-elf_load_section-truncated-elf-file</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Exploration through Code</description>
    <item>
      <title>X11R6-R7 Upgrade Problem: elf_load_section: truncated ELF file</title>
      <description>&lt;h1&gt;The Problem&lt;/h1&gt;


	&lt;p&gt;I attempted to update &lt;span class="caps"&gt;X11&lt;/span&gt; from &lt;span class="caps"&gt;X11R6&lt;/span&gt;.7 to &lt;span class="caps"&gt;X11R7&lt;/span&gt;.3 about a month ago. However, I was not successful and after getting this cryptic message when running startxfce4:&lt;/p&gt;


&lt;pre&gt;elf_load_section: truncated ELF file
Abort&lt;/pre&gt;

	&lt;p&gt;Launching startx yields that same message repeated six times. Oddly enough, launching X worked and also had two truncated &lt;span class="caps"&gt;ELF&lt;/span&gt; files (or the same one repeated). So, X worked, despite the inability to read a few files. I was confounded to say the least.&lt;/p&gt;


	&lt;p&gt;I spent hours, which lead to days trying to find what &lt;span class="caps"&gt;ELF&lt;/span&gt; file was truncated. Google searches and digging through help forums turned up nothing. I did:&lt;/p&gt;


&lt;pre&gt;pkg_delete -rx ".*xorg.*" 
pkg_delete -rx ".*font-.*"&lt;/pre&gt;

	&lt;p&gt;(deleted everything xorg and that which depended on it), then reinstalled xorg (/usr/ports/x11/xorg) to no avail. I even updated from FreeBSD-6.1-RELEASE to FreeBSD-6.2-RELEASE.&lt;/p&gt;


	&lt;p&gt;As of today, I have resolved the problem and I almost lost my mind when I discovered that xinit, a critical component of startx (startx is invoked by startxfce4), was not even installed. Keep in mind, I was getting this error before I deinstalled everything, so I did not deinstall it inadventently and send myself on a wild goose chase.&lt;/p&gt;


	&lt;p&gt;I assume the port maintainers moved this component out of the xorg port for some reason when they went from &lt;span class="caps"&gt;X11R6&lt;/span&gt;.9 to R7.2. Indeed, the &lt;a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/xinit/distinfo"&gt;dist file&lt;/a&gt; for the port xinit supports that conjecture.&lt;/p&gt;


	&lt;h1&gt;In Summary&lt;/h1&gt;


	&lt;p&gt;Simply &lt;span class="caps"&gt;INSTALL&lt;/span&gt;: /usr/ports/x11/xinit and you&amp;#8217;ll be able to use &lt;span class="caps"&gt;X11&lt;/span&gt; again. You need not deleted everything. Oh, please be sure you updated according to the /usr/ports/UPDATING file&amp;#8217;s directions. &lt;span class="caps"&gt;X11&lt;/span&gt; upgrades have always required special treatment (this one&amp;#8217;s no different).&lt;/p&gt;


	&lt;p&gt;Best of luck to you.&lt;/p&gt;</description>
      <pubDate>Sat, 17 Nov 2007 21:09:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:4a596106-27c5-43de-bcbf-578c6754c13b</guid>
      <author>Christopher Wojno</author>
      <link>http://christopher.wojno.com/articles/2007/11/17/x11r6-r7-upgrade-problem-elf_load_section-truncated-elf-file</link>
      <category>How-Tos</category>
      <category>freebsd</category>
      <category>file</category>
      <category>ELF</category>
      <category>truncated</category>
      <category>xinit</category>
      <category>X11</category>
      <category>update</category>
      <category>port</category>
    </item>
  </channel>
</rss>
