Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt embedded compile error => undefined reference to `__sync_fetch_and_add_4'
Forum Updated to NodeBB v4.3 + New Features

Qt embedded compile error => undefined reference to `__sync_fetch_and_add_4'

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 3 Posters 9.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt_imx25
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • W Offline
      W Offline
      Weilly
      wrote on last edited by
      #2

      I want to know why too. I use arm-none-linux-gnueabi toolchain for cross compiling. I shows error at ../3rdparty/webkit/JavaScriptCore section.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Weilly
        wrote on last edited by
        #3

        If I add option '-no-webkit' to my ./configure, make error disappered.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tusharforever
          wrote on last edited by
          #4

          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 function WebCore::initializeGtk(QLibrary*)': PluginPackageQt.cpp:(.text._ZN7WebCoreL13initializeGtkEP8QLibrary+0x48): undefined reference to XSetIOErrorHandler'
          PluginPackageQt.cpp:(.text._ZN7WebCoreL13initializeGtkEP8QLibrary+0x6c): undefined reference to XSetIOErrorHandler' ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function WebCore::PluginView::updatePluginWidget()':
          PluginViewQt.cpp:(.text._ZN7WebCore10PluginView18updatePluginWidgetEv+0x2e0): undefined reference to XFreePixmap' PluginViewQt.cpp:(.text._ZN7WebCore10PluginView18updatePluginWidgetEv+0x348): undefined reference to XCreatePixmap'
          ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function WebCore::PluginView::paintUsingXPixmap(QPainter*, QRect const&)': PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x2bc): undefined reference to XDefaultGC'
          PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x3d0): undefined reference to XCopyArea' PluginViewQt.cpp:(.text._ZN7WebCore10PluginView17paintUsingXPixmapEP8QPainterRK5QRect+0x520): undefined reference to XSync'
          ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function WebCore::setXKeyEventSpecificFields(_XEvent*, WebCore::KeyboardEvent*)': PluginViewQt.cpp:(.text._ZN7WebCore26setXKeyEventSpecificFieldsEP7_XEventPNS_13KeyboardEventE+0x184): undefined reference to XStringToKeysym'
          PluginViewQt.cpp:(.text._ZN7WebCore26setXKeyEventSpecificFieldsEP7_XEventPNS_13KeyboardEventE+0x194): undefined reference to XKeysymToKeycode' ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function WebCore::getVisualAndColormap(int, Visual**, unsigned long*)':
          PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x130): undefined reference to XGetVisualInfo' PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x194): undefined reference to XRenderFindVisualFormat'
          PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x234): undefined reference to XFree' PluginViewQt.cpp:(.text._ZN7WebCoreL20getVisualAndColormapEiPP6VisualPm+0x27c): undefined reference to XCreateColormap'
          ../../WebCore/release/libwebcore.a(PluginViewQt.o): In function WebCore::PluginView::platformDestroy()': PluginViewQt.cpp:(.text._ZN7WebCore10PluginView15platformDestroyEv+0x8c): undefined reference to XFreePixmap'
          PluginViewQt.cpp:(.text._ZN7WebCore10PluginView15platformDestroyEv+0xbc): undefined reference to XFreeColormap' ../../WebCore/release/libwebcore.a(PluginContainerQt.o): In function WebCore::PluginContainerQt::redirectWheelEventsToParent(bool)':
          PluginContainerQt.cpp:(.text._ZN7WebCore17PluginContainerQt27redirectWheelEventsToParentEb+0x98): undefined reference to XGrabButton' PluginContainerQt.cpp:(.text._ZN7WebCore17PluginContainerQt27redirectWheelEventsToParentEb+0xd8): undefined reference to XUngrabButton'
          ../../JavaScriptCore/release/libjscore.a(StringImpl.o): In function WTF::StringImpl::~StringImpl()': StringImpl.cpp:(.text+0x1648): undefined reference to __sync_fetch_and_add_4'
          ../../JavaScriptCore/release/libjscore.a(StringImpl.o): In function WTF::StringImpl::crossThreadString()': StringImpl.cpp:(.text+0x1aec): undefined reference to __sync_fetch_and_add_4'
          ../../JavaScriptCore/release/libjscore.a(StringImpl.o): In function void 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 function JSValueToStringCopy': JSValueRef.cpp:(.text+0x5ae8): undefined reference to __sync_fetch_and_add_4'
          ../../JavaScriptCore/release/libjscore.a(JSValueRef.o): In function void 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...

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved