Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137546

A Clang universal binary build fails with a "malformed object" error.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.9.1
    • Build tools: rcc
    • None
    • macOS 15.5
      Homebrew clang version 17.0.6
    • macOS

    Description

      After a recent commit that introduced data de-duplication, Universal Binary builds with two architectures (x86_64 and arm64) are failing when there are duplicate files in the resources. This issue does not occur when building for a single architecture.

      Commit: https://github.com/qt/qtbase/commit/607b3b2feb1328fdf8cf01768276d615c110e304
      Error logs:

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 0 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 1 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 2 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 3 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 4 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 5 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 6 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 7 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 8 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 9 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 10 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 11 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 12 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 13 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 14 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 15 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 16 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 17 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 18 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 19 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 20 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 21 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 22 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 23 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 24 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 25 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 26 n_strx field extends past the end of the string table)

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: for architecture: arm64 file: libemoji.a(qrc_emoji_resources.o) malformed object (symbol 27 n_strx field extends past the end of the string table)

      A minimal CMake project to reproduce the issue is attached.
      test_project.zip

      Attachments

        1. test_project.zip
          11 kB
          Roman Zhilkin

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hjk hjk
              dthspk Roman Zhilkin
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes