[Craft] [Bug 454506] New: Dbus fails to build on arm64 macOS (Apple sillicon / M1 hardware)

Javier O. Cordero PĂ©rez bugzilla_noreply at kde.org
Fri May 27 22:07:25 BST 2022


https://bugs.kde.org/show_bug.cgi?id=454506

            Bug ID: 454506
           Summary: Dbus fails to build on arm64 macOS (Apple sillicon /
                    M1 hardware)
           Product: Craft
           Version: stable
          Platform: Other
                OS: macOS
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Blueprints
          Assignee: vonreth at kde.org
          Reporter: javiercorderoperez at gmail.com
                CC: kde-windows at kde.org
  Target Milestone: ---

SUMMARY
Dbus fails to build on arm64 macOS (Apple sillicon / M1 hardware). 

STEPS TO REPRODUCE
1. On an arm64 Mac, create a new Craft prefix:
> curl https://raw.githubusercontent.com/KDE/craft/master/setup/CraftBootstrap.py -o setup.py && python3 setup.py --prefix ~/CraftRoot
2. Start  the prefix:
> source ~/CraftRoot/craft/craftenv.sh
3. Install any KDE Framework, I've chosen extra-cmake-modules
> craft extra-cmake-modules

OBSERVED RESULT
While dbus is getting built, you get the following warning and errors:
>ld: warning: ignoring file /Users/javier/CraftRoot/lib/libexpat.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
>ld: warning: ignoring file /Users/javier/CraftRoot/lib/libexpat.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
>Undefined symbols for architecture arm64:
>  "_XML_ErrorString", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_GetCurrentColumnNumber", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_GetCurrentLineNumber", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_GetErrorCode", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_Parse", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_ParserCreate_MM", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_ParserFree", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_SetCharacterDataHandler", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_SetElementHandler", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>  "_XML_SetUserData", referenced from:
>      _bus_config_load in libdbus-daemon-internal.a(config-loader-expat.o)
>ld: symbol(s) not found for architecture arm64
>clang: error: linker command failed with exit code 1 (use -v to see invocation)
>make[2]: *** [dbus-daemon] Error 1
>make[2]: *** Waiting for unfinished jobs....
>Undefined symbols for architecture arm64:
>  "_XML_ErrorString", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_GetCurrentColumnNumber", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_GetCurrentLineNumber", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_GetErrorCode", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_Parse", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_ParserCreate_MM", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_ParserFree", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_SetCharacterDataHandler", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_SetElementHandler", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>  "_XML_SetUserData", referenced from:
>      _bus_config_load in liblaunch-helper-internal.a(config-loader-expat.o)
>ld: symbol(s) not found for architecture arm64
>clang: error: linker command failed with exit code 1 (use -v to see invocation)
>make[2]: *** [dbus-daemon-launch-helper] Error 1
>make[1]: *** [all-recursive] Error 1
>make: *** [all] Error 2
>Action: compile for libs/dbus:1.14.0 FAILED
>*** Craft all failed: libs/dbus after 26 seconds ***
>fatal error: package libs/dbus all failed
>Craft stopped with out completing ['libs/dbus', 'libs/libzstd', 'libs/libpng', 'dev-utils/nasm', 'libs/libjpeg-turbo', 'libs/sqlite', 'libs/libbzip2', 'libs/pcre2', 'libs/freetype', 'dev-utils/gperf', 'libs/fontconfig', 'libs/pixman', 'libs/cairo', 'libs/harfbuzz', 'dev-utils/flex', 'dev-utils/texinfo', 'dev-utils/help2man', 'dev-utils/bison', 'dev-utils/flexbison', 'libs/qt5/qtbase', 'libs/qt5/qtsvg', 'libs/qt5/qtdeclarative', 'libs/qt5/qttools', 'libs/qt5/qttranslations', 'dev-utils/icoutils', 'kde/frameworks/extra-cmake-modules']

EXPECTED RESULT
a) Arm64 binaries are provided and the build completes successfully, outputing
an arm64 binary.
b) Alternatively, I would expect the source code for all dependencies to be
downloaded and compiled locally, also resulting in an arm64 binary.
c) If making arm64 binaries for macOS were not a viable option with Qt5, I
would expect Craft to successfully output an x86_64 build from the arm64 mac
through emulation.

SOFTWARE/OS VERSIONS
macOS: macOS Monterrey 12.3.1

ADDITIONAL INFORMATION
Several months ago, Craft would run on macOS Big Sur and compile x86_64
binaries without an issue on the same hardware.

-- 
You are receiving this mail because:
You are watching all bug changes.



More information about the kde-mac mailing list