Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Undefined symbols for architecture arm64
Qt 6.11 is out! See what's new in the release blog

Undefined symbols for architecture arm64

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 9.5k Views 3 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.
  • S Offline
    S Offline
    stepos
    wrote on last edited by stepos
    #1

    Hi, I am having this problem for a while and I can't find the solution anywhere. I'm trying to build and run this github project named Mapper https://github.com/OpenOrienteering/mapper. I want to build it a run it. I am building it with Qt 5.12.12, and tried with 6.3.2 but I don't think this is the source of the problem. I am building on mac with apple silicon M2 chip/architecture. Tried compiling with clang and gcc but it makes no difference. Thanks in advance. It compiles just fine but when I try to build it this message shows up in the 20% of the building process.

    here's the error message: ParallelImageProcessingTest.cpp.o:-1: error: Undefined symbols for architecture arm64:
    "qstrdup(char const*)", referenced from:
    std::__1::enable_if<QtPrivate::IsQEnumHelperQImage::Format::Value, char*>::type QTest::Internal::toStringQImage::Format(QImage::Format) in ParallelImageProcessingTest.cpp.o
    "qBadAlloc()", referenced from:
    QVector<unsigned int>::QVector(std::initializer_list<unsigned int>) in ParallelImageProcessingTest.cpp.o
    "qt_assert(char const*, char const*, int)", referenced from:
    QArrayData::data() in ParallelImageProcessingTest.cpp.o
    QArrayData::data() const in ParallelImageProcessingTest.cpp.o
    QArrayData::data() in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from:
    QTypedArrayData<unsigned int>::deallocate(QArrayData*) in ParallelImageProcessingTest.cpp.o
    QTypedArrayData<unsigned int>::deallocate(QArrayData*) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QArrayData::shared_null", referenced from:
    QArrayData::sharedNull() in ParallelImageProcessingTest.cpp.o
    "QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlagsQArrayData::AllocationOption)", referenced from:
    QTypedArrayData<unsigned int>::allocate(unsigned long, QFlagsQArrayData::AllocationOption) in ParallelImageProcessingTest.cpp.o
    "QCoreApplication::setAttribute(Qt::ApplicationAttribute, bool)", referenced from:
    _main in ParallelImageProcessingTest.cpp.o
    "QCoreApplication::QCoreApplication(int&, char**, int)", referenced from:
    _main in ParallelImageProcessingTest.cpp.o
    "QCoreApplication::~QCoreApplication()", referenced from:
    _main in ParallelImageProcessingTest.cpp.o
    "QTest::compare_helper(bool, char const*, char*, char*, char const*, char const*, char const*, int)", referenced from:
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    bool QTest::qCompareQImage::Format(QImage::Format const&, QImage::Format const&, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    QTest::compare_ptr_helper(void const volatile*, void const volatile*, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    "QTest::addColumnInternal(int, char const*)", referenced from:
    void QTest::addColumn<QSize>(char const*, QSize*) in ParallelImageProcessingTest.cpp.o
    void QTest::addColumn<int>(char const*, int*) in ParallelImageProcessingTest.cpp.o
    "QTest::setMainSourcePath(char const*, char const*)", referenced from:
    _main in ParallelImageProcessingTest.cpp.o
    "QTest::qData(char const*, int)", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QTest::qExec(QObject*, int, char**)", referenced from:
    _main in ParallelImageProcessingTest.cpp.o
    "QTest::newRow(char const*)", referenced from:
    ParallelImageProcessingTest::makeStripeTest_data() in ParallelImageProcessingTest.cpp.o
    "QTest::qVerify(bool, char const*, char const*, char const*, int)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "char* QTest::toString<int>(int const&)", referenced from:
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    "char* QTest::toString<unsigned int>(unsigned int const&)", referenced from:
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int) in ParallelImageProcessingTest.cpp.o
    "QColor::QColor(Qt::GlobalColor)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QImage::setColorTable(QVector<unsigned int>)", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::staticMetaObject", referenced from:
    qt_getEnumMetaObject(QImage::Format) in ParallelImageProcessingTest.cpp.o
    "QImage::bits()", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    "QImage::fill(Qt::GlobalColor)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    "QImage::fill(unsigned int)", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QImage::scanLine(int)", referenced from:
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::QImage(unsigned char const*, int, int, int, QImage::Format, void ()(void), void*)", referenced from:
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::QImage(unsigned char*, int, int, int, QImage::Format, void ()(void), void*)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::QImage(QSize const&, QImage::Format)", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QImage::QImage(QImage const&)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    "QImage::QImage(int, int, QImage::Format)", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    "QImage::QImage()", referenced from:
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::~QImage()", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::operator=(QImage const&)", referenced from:
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QObject::childEvent(QChildEvent*)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::timerEvent(QTimerEvent*)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::customEvent(QEvent*)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::eventFilter(QObject*, QEvent*)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::qt_metacall(QMetaObject::Call, int, void**)", referenced from:
    ParallelImageProcessingTest::qt_metacall(QMetaObject::Call, int, void**) in ParallelImageProcessingTest.cpp.o
    "QObject::qt_metacast(char const*)", referenced from:
    ParallelImageProcessingTest::qt_metacast(char const*) in ParallelImageProcessingTest.cpp.o
    "QObject::connectNotify(QMetaMethod const&)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::disconnectNotify(QMetaMethod const&)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::staticMetaObject", referenced from:
    ParallelImageProcessingTest::staticMetaObject in ParallelImageProcessingTest.cpp.o
    "QObject::event(QEvent*)", referenced from:
    vtable for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o
    "QObject::QObject(QObject*)", referenced from:
    ParallelImageProcessingTest::ParallelImageProcessingTest() in ParallelImageProcessingTest.cpp.o
    "QObject::~QObject()", referenced from:
    ParallelImageProcessingTest::~ParallelImageProcessingTest() in ParallelImageProcessingTest.cpp.o
    "QTestData::append(int, void const*)", referenced from:
    QTestData& operator<<<int>(QTestData&, int const&) in ParallelImageProcessingTest.cpp.o
    QTestData& operator<<<QSize>(QTestData&, QSize const&) in ParallelImageProcessingTest.cpp.o
    "QMetaObject::enumerator(int) const", referenced from:
    QMetaEnum QMetaEnum::fromTypeQImage::Format() in ParallelImageProcessingTest.cpp.o
    "QMetaObject::indexOfEnumerator(char const*) const", referenced from:
    QMetaEnum QMetaEnum::fromTypeQImage::Format() in ParallelImageProcessingTest.cpp.o
    "QObjectData::dynamicMetaObject() const", referenced from:
    ParallelImageProcessingTest::metaObject() const in ParallelImageProcessingTest.cpp.o
    "QColor::rgb() const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QImage::colorCount() const", referenced from:
    cove::HorizontalStripes::makeStripe(QImage const&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::colorTable() const", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::pixelIndex(int, int) const", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QImage::bytesPerLine() const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::constScanLine(int) const", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::pixel(int, int) const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    "QImage::width() const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::format() const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::height() const", referenced from:
    ParallelImageProcessingTest::inplaceImageTest() in ParallelImageProcessingTest.cpp.o
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    cove::HorizontalStripes::makeStripe(QImage&, int, int) in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_0::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    cove::HorizontalStripes::makeStripe(QImage const&, int, int)::$_1::operator()(QImage const&, int, int) const in libcove-vectorizer.a(ParallelImageProcessing.cpp.o)
    "QImage::constBits() const", referenced from:
    ParallelImageProcessingTest::makeStripeTest() in ParallelImageProcessingTest.cpp.o
    "QMetaEnum::valueToKey(int) const", referenced from:
    std::__1::enable_if<QtPrivate::IsQEnumHelperQImage::Format::Value, char*>::type QTest::Internal::toStringQImage::Format(QImage::Format) in ParallelImageProcessingTest.cpp.o
    "typeinfo for QImage", referenced from:
    l___unnamed_13 in ParallelImageProcessingTest.cpp.o
    l___unnamed_14 in ParallelImageProcessingTest.cpp.o
    l___unnamed_15 in ParallelImageProcessingTest.cpp.o
    l___unnamed_16 in ParallelImageProcessingTest.cpp.o
    l___unnamed_17 in ParallelImageProcessingTest.cpp.o
    l___unnamed_18 in ParallelImageProcessingTest.cpp.o
    l___unnamed_19 in ParallelImageProcessingTest.cpp.o
    ...
    "typeinfo for QObject", referenced from:
    l___unnamed_84 in ParallelImageProcessingTest.cpp.o
    l___unnamed_90 in ParallelImageProcessingTest.cpp.o
    l___unnamed_97 in ParallelImageProcessingTest.cpp.o
    l___unnamed_100 in ParallelImageProcessingTest.cpp.o
    typeinfo for ParallelImageProcessingTest in ParallelImageProcessingTest.cpp.o

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Qt 5.12.12 is not available (in prebuilt form) for arm64 arch. You need to compile for x86.

      (Z(:^

      1 Reply Last reply
      1
      • S Offline
        S Offline
        stepos
        wrote on last edited by
        #3

        Even when I compile with Qt 6.3.2 with Apple Clang x86_64 it shows the same message

        jsulmJ sierdzioS 2 Replies Last reply
        0
        • S stepos

          Even when I compile with Qt 6.3.2 with Apple Clang x86_64 it shows the same message

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @stepos said in Undefined symbols for architecture arm64:

          Apple Clang x86_64

          This is also not ARM64

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • S stepos

            Even when I compile with Qt 6.3.2 with Apple Clang x86_64 it shows the same message

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            @stepos said in Undefined symbols for architecture arm64:

            Even when I compile with Qt 6.3.2 with Apple Clang x86_64 it shows the same message

            OK, how do you compile, then? Looks like qmake / cmake selects wrong architecture.

            (Z(:^

            S 1 Reply Last reply
            0
            • jsulmJ jsulm

              @stepos said in Undefined symbols for architecture arm64:

              Apple Clang x86_64

              This is also not ARM64

              S Offline
              S Offline
              stepos
              wrote on last edited by
              #6

              @jsulm even if i use apple's clang arm64 from Xcode. Still the same message

              1 Reply Last reply
              0
              • sierdzioS sierdzio

                @stepos said in Undefined symbols for architecture arm64:

                Even when I compile with Qt 6.3.2 with Apple Clang x86_64 it shows the same message

                OK, how do you compile, then? Looks like qmake / cmake selects wrong architecture.

                S Offline
                S Offline
                stepos
                wrote on last edited by stepos
                #7

                @sierdzio I don't really know how to answer this. I am using cmake 3.24.2. How do I check what architecture cmake selects?

                jsulmJ 1 Reply Last reply
                0
                • S stepos

                  @sierdzio I don't really know how to answer this. I am using cmake 3.24.2. How do I check what architecture cmake selects?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @stepos said in Undefined symbols for architecture arm64:

                  How do I check what architecture cmake selects?

                  How exactly do you call CMake?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  S 1 Reply Last reply
                  1
                  • jsulmJ jsulm

                    @stepos said in Undefined symbols for architecture arm64:

                    How do I check what architecture cmake selects?

                    How exactly do you call CMake?

                    S Offline
                    S Offline
                    stepos
                    wrote on last edited by stepos
                    #9

                    @jsulm in the root directory of the project/
                    mkdir build
                    cd build
                    cmake ..
                    make
                    Or in Qt Creator simpy on clicking the build button if that’s what you mean

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mchinand
                      wrote on last edited by
                      #10

                      You can try defining CMAKE_OSX_ARCHITECTURES when executing cmake. For example:

                      cmake -DCMAKE_OSX_ARCHITECTURES=arm64 ..
                      
                      1 Reply Last reply
                      1

                      • Login

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