Solved x11-toolkits/qt4-gui build failure on FreeBSD 10: "elf_load_section: truncated ELF file"

As indicated in the title, I am unable to build x11-toolkits/qt4-gui on a computer running FreeBSD10. The system on which the build fails is an amazon.com virtual machine which is very close to its initial pristine post-installation state. The only thing that has been done to it post-installation is that a few ports have been built. But when I tried to build databases/sqlitebrowser a failure occurred while building the x11-toolkits/qt4-gui dependency:

Code:
elf_load_section: truncated ELF file
Abort trap
*** [.rcc/release-shared/qrc_qprintdialog.cpp] Error code 134

make[2]: stopped in /usr/ports/x11-toolkits/qt4-gui/work/qt-everywhere-opensource-src-4.8.7/src/gui
1 error

make[2]: stopped in /usr/ports/x11-toolkits/qt4-gui/work/qt-everywhere-opensource-src-4.8.7/src/gui
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11-toolkits/qt4-gui
*** Error code 1

Search engines have been fruitless, because
1. It seems that no one has reported the "truncated ELF file" error in 8 years.
2. Most of the reported errors occurred while building the kernel, not a port.
3. No one who has reported the error ever reported a fix for it, or been provided with one.

So I now turn to you for help in fixing this problem. Why am I getting this fatal error on a pristine post-installation system, and what can I do to fix it or get around it? I have already tried building it with CC set to clang and CXX set to clang++ and there was absolutely no change in the error (I have not yet undertaken the huge, daylong, task of building one of the gcc ports and trying again with the CC and CXX variables suitably modified).

I don't even care about x11-toolkits/qt4-gui, it is only databases/sqlitebrowser about which I care; if I could configure databases/sqlitebrowser to use something other than the QT4 look-and-feel, I would be content. But the make config command reports that databases/sqlitebrowser has no configurable options.

As always, thank you in advance for any and all replies.

Jay Shachter
jay at m5 dot chicago dot il dot us
 
Last edited by a moderator:
I've seen similar messages happen when the disk is full somewhere half way into the build. Did you check if there's enough free space?
 
There is plenty of free space:
Code:
[root@ip-172-31-31-26 /usr/ports/x11-toolkits/qt4-gui]# df
Filesystem  1K-blocks  Used  Avail Capacity  Mounted on
/dev/gpt/rootfs  2022728 1202196  658716  65%  /
devfs  1  1  0  100%  /dev
/dev/xbd6  40614492 1541272 35824064  4%  /usr/ports
/dev/xbd7  32487548 1424932 28463616  5%  /usr/local

I had not suspected that I was exceeding the storage capacity of the disk, but I had suspected that I didn't have enough memory. However, according to amazon.com my virtual computer is a "t2.large" which means that it has 8 gigabytes of memory, and 2 virtual CPUs. That should be enough to build any port.

And yet, the build is failing:
Code:
--- .obj/release-shared/qmenubar_x11.o ---
c++ -c -O2 -pipe -fstack-protector -fno-strict-aliasing -I../../include/QtCore -I../../include/QtGui -I../../include/Qt -I../../include -I. -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -pthread -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -pthread -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/freetype2 -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -Iimage -I/usr/local/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/local/include -I.uic/release-shared -I/usr/local/include/qt4 -I/usr/local/include -o .obj/release-shared/qmenubar_x11.o widgets/qmenubar_x11.cpp
--- .rcc/release-shared/qrc_qprintdialog.cpp ---
/usr/ports/x11-toolkits/qt4-gui/work/qt-everywhere-opensource-src-4.8.7/bin/rcc -name qprintdialog dialogs/qprintdialog.qrc -o .rcc/release-shared/qrc_qprintdialog.cpp
elf_load_section: truncated ELF file
Abort trap
*** [.rcc/release-shared/qrc_qprintdialog.cpp] Error code 134

make[1]: stopped in /usr/ports/x11-toolkits/qt4-gui/work/qt-everywhere-opensource-src-4.8.7/src/gui
1 error

make[1]: stopped in /usr/ports/x11-toolkits/qt4-gui/work/qt-everywhere-opensource-src-4.8.7/src/gui
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/x11-toolkits/qt4-gui
[root@ip-172-31-31-26 /usr/ports/x11-toolkits/qt4-gui]#
 
Last edited by a moderator:
So I gave up on building x11-toolkits/qt4-gui and did a pkg install qt4-gui. No errors were reported. Then I tried to build databases/sqlitebrowser (which was the only reason I had wanted x11-toolkits/qt4-gui in the first place). The build on databases/sqlitebrowser failed for the same reason:
Code:
[ 76%] Generating ui_VacuumDialog.h
[ 76%] Generating ui_CipherDialog.h
[ 76%] Generating ui_ExportSqlDialog.h
[ 77%] Generating src/moc_sqlitedb.cxx
[ 77%] Generating src/moc_AboutDialog.cxx
[ 77%] Generating src/moc_CreateIndexDialog.cxx
[ 77%] Generating src/moc_EditDialog.cxx
[ 78%] Generating src/moc_EditTableDialog.cxx
[ 78%] Generating src/moc_ExportCsvDialog.cxx
[ 78%] Generating src/moc_ExtendedTableWidget.cxx
[ 79%] Generating src/moc_FilterTableHeader.cxx
[ 79%] Generating src/moc_ImportCsvDialog.cxx
[ 79%] Generating src/moc_MainWindow.cxx
[ 80%] Generating src/moc_PreferencesDialog.cxx
[ 80%] Generating src/moc_SqlExecutionArea.cxx
[ 80%] Generating src/moc_VacuumDialog.cxx
[ 81%] Generating src/moc_sqlitetablemodel.cxx
[ 81%] Generating src/moc_sqltextedit.cxx
[ 81%] Generating src/moc_DbStructureModel.cxx
[ 82%] Generating src/moc_Application.cxx
[ 82%] Generating src/moc_CipherDialog.cxx
[ 82%] Generating src/moc_ExportSqlDialog.cxx
[ 83%] Generating src/moc_SqlUiLexer.cxx
[ 83%] Generating qrc_icons.cxx
elf_load_section: truncated ELF file
Abort trap
--- qrc_icons.cxx ---
*** [qrc_icons.cxx] Error code 134

make[3]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
1 error

make[3]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
--- CMakeFiles/sqlitebrowser.dir/all ---
*** [CMakeFiles/sqlitebrowser.dir/all] Error code 2

make[2]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
1 error

make[2]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
*** [all] Error code 2

make[1]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
1 error

make[1]: stopped in /usr/ports/databases/sqlitebrowser/work/sqlitebrowser-e703344
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/sqlitebrowser

===>>> make build failed for databases/sqlitebrowser
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
  portmaster <flags> databases/sqlitebrowser


real   0m34.173s
user   0m52.973s
sys   0m3.706s
[root@ip-172-31-31-26 /usr/ports]#

And yet this is, as I mentioned, a pristine 10.2-RELEASE machine. The only thing that I have done to it post-installation is build a few ports, and install one package. Why am I getting that error? What does it mean?
 
Last edited by a moderator:
I got this error:
Code:
[ 99%] Building CXX object CMakeFiles/sqlitebrowser.dir/qrc_flags.cxx.o
[ 99%] Linking CXX executable sqlitebrowser
CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o: In function `DBBrowserDB::loadExtension(QString const&)':
sqlitedb.cpp:(.text+0xcf6): undefined reference to `sqlite3_load_extension'
CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o: In function `DBBrowserDB::create(QString const&)':
sqlitedb.cpp:(.text+0x5614): undefined reference to `sqlite3_enable_load_extension'
CMakeFiles/sqlitebrowser.dir/src/sqlitedb.cpp.o: In function `DBBrowserDB::open(QString const&)':
sqlitedb.cpp:(.text+0x74ee): undefined reference to `sqlite3_enable_load_extension'
collect2: error: ld returned 1 exit status
--- sqlitebrowser ---
*** [sqlitebrowser] Error code 1
 
Folks, this is really getting annoying. There were three ports that I could not install, all because of that same bloody "truncated ELF file" error. I got around it by doing pkg install on qt4-gui, sqlitebrowser and qt4-xmlpatterns. But now I am trying to build devel/qscintilla2, and the portmaster command thinks that in order to do so, it must first build www/webkit-qt4 on which it depends, and after 17 minutes of trying to build www/webkit-qt4 (yes, it really does take that long, and this is a fast computer), the build fails with the same bloody "truncated ELF file" error:
Code:
c++ -c -O2 -pipe -fstack-protector -fno-strict-aliasing -I../../../../include/Qt -I../../../../include -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -pthread -D_THREAD_SAFE -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -I/usr/local/include/freetype2 -fPIC -DQT_SHARED -DBUILDING_WEBKIT -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -DBUILDING_JavaScriptCore -DBUILDING_WTF -DENABLE_XSLT=0 -DENABLE_WEB_TIMING=0 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_DATABASE=1 -DENABLE_EVENTSOURCE=1 -DENABLE_OFFLINE_WEB_APPLICATIONS=1 -DENABLE_DOM_STORAGE=1 -DENABLE_ICONDATABASE=1 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_QUOTA=0 -DENABLE_SQLITE=1 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_FILTERS=1 -DENABLE_XPATH=1 -DENABLE_WCSS=0 -DENABLE_SHARED_WORKERS=1 -DENABLE_WORKERS=1 -DENABLE_XHTMLMP=0 -DENABLE_DETAILS=1 -DENABLE_METER_TAG=1 -DENABLE_PROGRESS_TAG=1 -DENABLE_BLOB=1 -DENABLE_NOTIFICATIONS=1 -DENABLE_INPUT_SPEECH=0 -DENABLE_INSPECTOR=1 -DENABLE_3D_RENDERING=1 -DENABLE_WEB_AUDIO=0 -DENABLE_WEBGL=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_VIDEO_TRACK=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_ANIMATION_API=0 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_SVG_FOREIGN_OBJECT=1 -DENABLE_SVG_ANIMATION=1 -DENABLE_SVG_AS_IMAGE=1 -DENABLE_SVG_USE=1 -DENABLE_DATALIST=1 -DENABLE_TILED_BACKING_STORE=1 -DENABLE_NETSCAPE_PLUGIN_API=1 -DENABLE_WEB_SOCKETS=1 -DWTF_USE_QT_BEARER=1 -DENABLE_TOUCH_EVENTS=1 -DENABLE_VIDEO=1 -DWTF_USE_GSTREAMER=1 -DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DXP_UNIX -DENABLE_NETSCAPE_PLUGIN_METADATA_CACHE=1 -DENABLE_GLIB_SUPPORT=1 -DENABLE_XSLT=0 -DENABLE_WEB_TIMING=0 -DQT_NO_CAST_TO_ASCII -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_MAKEDLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I../../../../../../include/QtCore -I../../../../../../include/QtNetwork -I../../../../../../include/QtGui -I../../../../../../include -I../../WebCore/bridge/qt -I../../WebCore/page/qt -I../../WebCore/platform/graphics/qt -I../../WebCore/platform/network/qt -I../../WebCore/platform/qt -IApi -IWebCoreSupport -I../../WebCore -I../../WebCore/accessibility -I../../WebCore/bindings -I../../WebCore/bindings/generic -I../../WebCore/bridge -I../../WebCore/css -I../../WebCore/dom -I../../WebCore/dom/default -I../../WebCore/editing -I../../WebCore/fileapi -I../../WebCore/history -I../../WebCore/html -I../../WebCore/html/canvas -I../../WebCore/html/parser -I../../WebCore/html/shadow -I../../WebCore/inspector -I../../WebCore/loader -I../../WebCore/loader/appcache -I../../WebCore/loader/archive -I../../WebCore/loader/cache -I../../WebCore/loader/icon -I../../WebCore/mathml -I../../WebCore/notifications -I../../WebCore/page -I../../WebCore/page/animation -I../../WebCore/platform -I../../WebCore/platform/animation -I../../WebCore/platform/audio -I../../WebCore/platform/graphics -I../../WebCore/platform/graphics/filters -I../../WebCore/platform/graphics/filters/arm -I../../WebCore/platform/graphics/texmap -I../../WebCore/platform/graphics/transforms -I../../WebCore/platform/image-decoders -I../../WebCore/platform/leveldb -I../../WebCore/platform/mock -I../../WebCore/platform/network -I../../WebCore/platform/sql -I../../WebCore/platform/text -I../../WebCore/platform/text/transcoder -I../../WebCore/plugins -I../../WebCore/rendering -I../../WebCore/rendering/mathml -I../../WebCore/rendering/style -I../../WebCore/rendering/svg -I../../WebCore/storage -I../../WebCore/svg -I../../WebCore/svg/animation -I../../WebCore/svg/graphics -I../../WebCore/svg/graphics/filters -I../../WebCore/svg/properties -I../../WebCore/testing -I../../WebCore/webaudio -I../../WebCore/websockets -I/usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebCore/wml -I../../WebCore/workers -I../../WebCore/xml -I../../WebCore/bridge/jsc -I../../WebCore/bindings/js -I/usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebCore/bindings/js/specialization -I../../WebCore/bridge/c -I../../WebCore/testing/js -I../../WebCore/generated -I../../JavaScriptCore -I../../../Source -I../../ThirdParty -I../../JavaScriptCore/assembler -I../../JavaScriptCore/bytecode -I../../JavaScriptCore/bytecompiler -I../../JavaScriptCore/heap -I../../JavaScriptCore/dfg -I../../JavaScriptCore/debugger -I../../JavaScriptCore/interpreter -I../../JavaScriptCore/jit -I../../JavaScriptCore/parser -I../../JavaScriptCore/profiler -I../../JavaScriptCore/runtime -I../../JavaScriptCore/wtf -I../../JavaScriptCore/wtf/gobject -I/usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/JavaScriptCore/wtf/symbian -I../../JavaScriptCore/wtf/unicode -I../../JavaScriptCore/yarr -I../../JavaScriptCore/API -I../../JavaScriptCore/ForwardingHeaders -I../../JavaScriptCore/generated -I../../../Source -I../../../include -I/include/QtWebKit -I/include -I../../../../sqlite -I../../WebCore/platform/graphics/gstreamer -I../../../../../../include/QtWebKit -I.rcc/release-shared -I.moc/release-shared -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/gstreamer-0.10 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/qt4 -I/usr/local/include -o .obj/release-shared/moc_FullScreenVideoQt.o .moc/release-shared/moc_FullScreenVideoQt.cpp
--- .obj/release-shared/NotificationPresenterClientQt.o ---
In file included from WebCoreSupport/NotificationPresenterClientQt.cpp:33:
In file included from WebCoreSupport/NotificationPresenterClientQt.h:35:
In file included from ../../WebCore/notifications/Notification.h:36:
In file included from ../../WebCore/dom/Event.h:27:
In file included from ../../WebCore/dom/Clipboard.h:27:
In file included from ../../WebCore/loader/cache/CachedResourceHandle.h:29:
In file included from ../../WebCore/loader/cache/CachedResource.h:28:
In file included from ../../WebCore/platform/text/PlatformString.h:28:
In file included from ../../JavaScriptCore/wtf/text/WTFString.h:28:
In file included from ../../JavaScriptCore/wtf/text/StringImpl.h:28:
In file included from ../../JavaScriptCore/wtf/CrossThreadRefCounted.h:36:
../../JavaScriptCore/wtf/RefCounted.h:141:13: warning: delete called on 'WebCore::Frame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
            delete static_cast<T*>(this);
            ^
../../JavaScriptCore/wtf/PassRefPtr.h:59:18: note: in instantiation of member function 'WTF::RefCounted<WebCore::Frame>::deref' requested here
            ptr->deref();
                 ^
../../JavaScriptCore/wtf/RefPtr.h:58:35: note: in instantiation of function template specialization 'WTF::derefIfNotNull<WebCore::Frame>' requested here
        ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
                                  ^
../../WebCore/page/FrameTree.h:32:9: note: in instantiation of member function 'WTF::RefPtr<WebCore::Frame>::~RefPtr' requested here
        FrameTree(Frame* thisFrame, Frame* parentFrame)
        ^
--- .rcc/release-shared/qrc_WebCore.cpp ---
/usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/bin/rcc -name WebCore ../../WebCore/WebCore.qrc -o .rcc/release-shared/qrc_WebCore.cpp
elf_load_section: truncated ELF file
Abort trap
*** [.rcc/release-shared/qrc_WebCore.cpp] Error code 134

make[3]: stopped in /usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebKit/qt
--- .obj/release-shared/NotificationPresenterClientQt.o ---
3 warnings generated.
1 error

make[3]: stopped in /usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source/WebKit/qt
*** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error code 2

make[2]: stopped in /usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source
1 error

make[2]: stopped in /usr/ports/www/webkit-qt4/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/webkit/Source
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/webkit-qt4
*** Error code 1

Stop.
make: stopped in /usr/ports/www/webkit-qt4

===>>> make build failed for www/webkit-qt4
===>>> Aborting update

===>>> Update for www/webkit-qt4 failed
===>>> Aborting update

===>>> Update for devel/qt4-designer failed
===>>> Aborting update

===>>> Update for devel/qscintilla2 failed
===>>> Aborting update
Only this time, when I try to pkg install webkit-qt4 the pkg command chokes:
Code:
[root@ip-172-31-31-26 /usr/ports]# pkg install webkit-qt4
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'webkit-qt4' have been found in the repositories
[root@ip-172-31-31-26 /usr/ports]#
So instead, I did a pkg install on qt4-webkit, and that worked. Don't ask me how I knew to try qt4-webkit instead of webkit-qt4 because I don't know how I knew, but I tried it, and it worked.

And then, if you are still with me, I tried once more to build devel/qscintilla2, and 2 minutes later, I got the same bloody "elf_load_section: truncated ELF file" fatal error while trying to build devel/qt4-designer:
Code:
--- .obj/release-shared/moc_qdesigner_formwindowmanager_p.o ---
c++ -c -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pthread -D_THREAD_SAFE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQDESIGNER_SDK_LIBRARY -DQDESIGNER_EXTENSION_LIBRARY -DQDESIGNER_UILIB_LIBRARY -DQDESIGNER_SHARED_LIBRARY -DQT_DESIGNER -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I../../../../include/QtCore -I../../../../include/QtGui -I../../../../include/QtXml -I../../../../include/QtScript -I../../../../include -Iextension -Isdk -Iuilib -Ishared -I../../../shared/qtpropertybrowser -I../../../shared/deviceskin -I../../../../src/tools/rcc -I../../../shared/findwidget -I../../../shared/qtgradienteditor -I.moc/release-shared -I.uic/release-shared -I/usr/local/include/qt4 -I/usr/local/include -o .obj/release-shared/moc_qdesigner_formwindowmanager_p.o .moc/release-shared/moc_qdesigner_formwindowmanager_p.cpp
--- .obj/release-shared/moc_newformwidget_p.o ---
c++ -c -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pthread -D_THREAD_SAFE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQDESIGNER_SDK_LIBRARY -DQDESIGNER_EXTENSION_LIBRARY -DQDESIGNER_UILIB_LIBRARY -DQDESIGNER_SHARED_LIBRARY -DQT_DESIGNER -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I/usr/local/share/qt4/mkspecs/freebsd-clang -I. -I../../../../include/QtCore -I../../../../include/QtGui -I../../../../include/QtXml -I../../../../include/QtScript -I../../../../include -Iextension -Isdk -Iuilib -Ishared -I../../../shared/qtpropertybrowser -I../../../shared/deviceskin -I../../../../src/tools/rcc -I../../../shared/findwidget -I../../../shared/qtgradienteditor -I.moc/release-shared -I.uic/release-shared -I/usr/local/include/qt4 -I/usr/local/include -o .obj/release-shared/moc_newformwidget_p.o .moc/release-shared/moc_newformwidget_p.cpp
--- .rcc/release-shared/qrc_ClamshellPhone.cpp ---
/usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/bin/rcc -name ClamshellPhone ../../../shared/deviceskin/skins/ClamshellPhone.qrc -o .rcc/release-shared/qrc_ClamshellPhone.cpp
elf_load_section: truncated ELF file
Abort trap
*** [.rcc/release-shared/qrc_ClamshellPhone.cpp] Error code 134

make[4]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src/lib
1 error

make[4]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src/lib
*** [first] Error code 2

make[3]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src/lib
1 error

make[3]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src/lib
*** [sub-lib-make_default-ordered] Error code 2

make[2]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src
1 error

make[2]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer/src
*** [sub-src-make_default] Error code 2

make[1]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer
1 error

make[1]: stopped in /usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.7/tools/designer
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/qt4-designer

===>>> make build failed for devel/qt4-designer
===>>> Aborting update

===>>> Update for devel/qt4-designer failed
===>>> Aborting update

===>>> Update for devel/qscintilla2 failed
===>>> Aborting update
I had to do a pkg install on qt4-designer, which succeeded. And then I was able to build devel/qscintilla2. But what in bloody heck is going on? I don't want to have to install packages, which I cannot customize, I want to install ports, which I can. What in bloody heck does "elf_load_section: truncated ELF file" mean, and, more to the point, since I don't care what it means, under what circumstances is that fatal error emitted, and what do I do to bring about circumstances in which that fatal error will not be emitted?
 
Last edited by a moderator:
You are brilliant! I thought that the error message "elf_load_section: truncated ELF file" was being issued by qt4-rcc, which was reporting a failure to compile a file, for some reason.

In fact, the message was being issued by the shell, which was reporting a failure to invoke the qt4-rcc command, because qt4-rcc itself was truncated, perhaps because I originally built it when my virtual computer was low on disk storage, before I purchased two more virtual filesystems from amazon.com for /usr/ports and /usr/local.

I rebuilt devel/qt4-rcc, and this problem is now totally solved.
 
Back
Top