X11R6-R7 Upgrade Problem: elf_load_section: truncated ELF file
Posted by Christopher Wojno Sun, 18 Nov 2007 05:09:00 GMT
The Problem
I attempted to update X11 from X11R6.7 to X11R7.3 about a month ago. However, I was not successful and after getting this cryptic message when running startxfce4:
elf_load_section: truncated ELF file Abort
Launching startx yields that same message repeated six times. Oddly enough, launching X worked and also had two truncated ELF files (or the same one repeated). So, X worked, despite the inability to read a few files. I was confounded to say the least.
I spent hours, which lead to days trying to find what ELF file was truncated. Google searches and digging through help forums turned up nothing. I did:
pkg_delete -rx ".*xorg.*" pkg_delete -rx ".*font-.*"
(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.
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.
I assume the port maintainers moved this component out of the xorg port for some reason when they went from X11R6.9 to R7.2. Indeed, the dist file for the port xinit supports that conjecture.
In Summary
Simply INSTALL: /usr/ports/x11/xinit and you’ll be able to use X11 again. You need not deleted everything. Oh, please be sure you updated according to the /usr/ports/UPDATING file’s directions. X11 upgrades have always required special treatment (this one’s no different).
Best of luck to you.
