Qt embedded compile error => undefined reference to `__sync_fetch_and_add_4'
-
Hi guys,
I am trying to cross compile Qt Embedded for an ARM architecture using shared libraries. But I receive this error:
...
const&)]+0x1a0): more undefined references to__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status make[1]: *** [../../lib/libQtScript.so.4.7.3] Error 1 make[1]: Leaving directory
/home/ubuntu/Downloads/qt-everywhere-opensource-src-4.7.3/src/script'
make: *** [sub-script-make_default-ordered] Error 2
ubuntu@ubuntu-AMILO-Pro-Edition-V3545:~/Downloads/qt-everywhere-opensource-src-4.7.3$I am using the arm-angstrom-linux-gnueabi toolchain for cross compliling. Compiling Qt for x86 or VFB is not a problem. The strange thing is when I add the option -static to the configuration command of Qt, it compiles without any errors.
Does anybody know how I can fix this problem?
Thanks
-
I am also trying to recompile QtWebKit 2.2.0 for iMax53 using arm-none-linux-gnueabi-g++ (GCC) 4.5.3 20110311 (prerelease) tool-chain with --netscape-plugin since i want NPAPI plugin enabled.
But its giving me below error :
@pectorBackendStub.o -L../../WebCore/release -L../../JavaScriptCore/release -L/home/tushar/HTML5/X11_rootfs/media/DISK/CREATE_ROOTFS/rootfs_kivix_iMX51_20111214/usr/lib -lwebcore -ljscore -lsqlite3 -lgio-2.0 -lgstapp-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -pthread -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0 -lQtGuiE -lQtNetworkE -lQtCoreE -lpthread
obj/release/JSWebKitBlobBuilder.o: In function__gnu_cxx::__exchange_and_add(int volatile*, int)': JSWebKitBlobBuilder.cpp:(.text._ZN9__gnu_cxxL18__exchange_and_addEPVii+0x20): undefined reference to
__sync_fetch_and_add_4'
obj/release/JSDOMWindow.o: In function__gnu_cxx::__exchange_and_add(int volatile*, int)': JSDOMWindow.cpp:(.text._ZN9__gnu_cxxL18__exchange_and_addEPVii+0x20): undefined reference to
__sync_fetch_and_add_4'
../../WebCore/release/libwebcore.a(PluginPackageQt.o): In functionWebCore::initializeGtk(QLibrary*)': PluginPackageQt.cpp:(.text._ZN7WebCoreL13initializeGtkEP8QLibrary+0x48): undefined reference to
XSetIOErrorHandler'
PluginPackageQt.cpp:(.text._ZN7WebCoreL13initializeGtkEP8QLibrary+0x6c): undefined reference toXSetIOErrorHandler' ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function
WebCore::PluginView::updatePluginWidget()':
PluginViewQt.cpp:(.text._ZN7WebCore10PluginView18updatePluginWidgetEv+0x2e0): undefined reference toXFreePixmap' PluginViewQt.cpp:(.text._ZN7WebCore10PluginView18updatePluginWidgetEv+0x348): undefined reference to
XCreatePixmap'
../../WebCore/release/libwebcore.a(PluginViewQt.o): In functionWebCore::PluginView::paintUsingXPixmap(QPainter*, QRect const&)': PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x2bc): undefined reference to
XDefaultGC'
PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x3d0): undefined reference toXCopyArea' PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x520): undefined reference to
XSync'
../../WebCore/release/libwebcore.a(PluginViewQt.o): In functionWebCore::setXKeyEventSpecificFields(_XEvent*, WebCore::KeyboardEvent*)': PluginViewQt.cpp:(.text._ZN7WebCore26setXKeyEventSpecificFieldsEP7_XEventPNS_13KeyboardEventE+0x184): undefined reference to
XStringToKeysym'
PluginViewQt.cpp:(.text._ZN7WebCore26setXKeyEventSpecificFieldsEP7_XEventPNS_13KeyboardEventE+0x194): undefined reference toXKeysymToKeycode' ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function
WebCore::getVisualAndColormap(int, Visual**, unsigned long*)':
PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x130): undefined reference toXGetVisualInfo' PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x194): undefined reference to
XRenderFindVisualFormat'
PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x234): undefined reference toXFree' PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x27c): undefined reference to
XCreateColormap'
../../WebCore/release/libwebcore.a(PluginViewQt.o): In functionWebCore::PluginView::platformDestroy()': PluginViewQt.cpp:(.text._ZN7WebCore10PluginView15platformDestroyEv+0x8c): undefined reference to
XFreePixmap'
PluginViewQt.cpp:(.text._ZN7WebCore10PluginView15platformDestroyEv+0xbc): undefined reference toXFreeColormap' ../../WebCore/release/libwebcore.a(PluginContainerQt.o): In function
WebCore::PluginContainerQt::redirectWheelEventsToParent(bool)':
PluginContainerQt.cpp:(.text._ZN7WebCore17PluginContainerQt27redirectWheelEventsToParentEb+0x98): undefined reference toXGrabButton' PluginContainerQt.cpp:(.text._ZN7WebCore17PluginContainerQt27redirectWheelEventsToParentEb+0xd8): undefined reference to
XUngrabButton'
../../JavaScriptCore/release/libjscore.a(StringImpl.o): In functionWTF::StringImpl::~StringImpl()': StringImpl.cpp:(.text+0x1648): undefined reference to
__sync_fetch_and_add_4'
../../JavaScriptCore/release/libjscore.a(StringImpl.o): In functionWTF::StringImpl::crossThreadString()': StringImpl.cpp:(.text+0x1aec): undefined reference to
__sync_fetch_and_add_4'
../../JavaScriptCore/release/libjscore.a(StringImpl.o): In functionvoid WTF::derefIfNotNull<WTF::CrossThreadRefCounted<WTF::OwnFastMallocPtr<unsigned short const> > >(WTF::CrossThreadRefCounted<WTF::OwnFastMallocPtr<unsigned short const> >*)': StringImpl.cpp:(.text._ZN3WTF14derefIfNotNullINS_21CrossThreadRefCountedINS_16OwnFastMallocPtrIKtEEEEEEvPT_[void WTF::derefIfNotNull<WTF::CrossThreadRefCounted<WTF::OwnFastMallocPtr<unsigned short const> > >(WTF::CrossThreadRefCounted<WTF::OwnFastMallocPtr<unsigned short const> >*)]+0x38): undefined reference to
__sync_fetch_and_add_4'
../../JavaScriptCore/release/libjscore.a(JSValueRef.o): In functionJSValueToStringCopy': JSValueRef.cpp:(.text+0x5ae8): undefined reference to
__sync_fetch_and_add_4'
../../JavaScriptCore/release/libjscore.a(JSValueRef.o): In functionvoid WTF::derefIfNotNull<OpaqueJSString>(OpaqueJSString*)': JSValueRef.cpp:(.text._ZN3WTF14derefIfNotNullI14OpaqueJSStringEEvPT_[void WTF::derefIfNotNull<OpaqueJSString>(OpaqueJSString*)]+0x10): undefined reference to
__sync_fetch_and_add_4'
../../JavaScriptCore/release/libjscore.a(JSClassRef.o):JSClassRef.cpp:(.text+0x5b4): more undefined references to__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status make[1]: *** [../../lib/libQtWebKit.so.4.9.0] Error 1 make[1]: Leaving directory
/home/tushar/HTML5/QtWebKit-2.2.0/WebKitBuild/Release/WebKit/qt'
make: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2
@Please give some pointers to solve the issue...