【问题标题】:Install Qt4 on macOS Big Sur在 macOS Big Sur 上安装 Qt4
【发布时间】:2021-06-19 07:28:40
【问题描述】:

我想在我的 mac 上安装 qt4,但每当我输入 brew install qt@4 时都会收到错误提示

x86_64cpuid.s:273:7: error: invalid token in expression
cmpq $0,%rax
     ^
x86_64cpuid.s:273:7: error: invalid operand
cmpq $0,%rax
     ^
x86_64cpuid.s:274:9: error: invalid token in expression
cmoveq %rcx,%rax
       ^
x86_64cpuid.s:274:9: error: invalid operand
cmoveq %rcx,%rax
       ^

我尝试了 brew install openssl@1.0 并得到了同样的错误。

我尝试按照 Qt 文档中的 here 说明进行操作,但在运行 make 时出现两个错误。

../../include/QtCore/../../src/corelib/arch/qatomic_powerpc.h:126:36: error:
    invalid output constraint '=&b' in asm
             : [originalValue] "=&b" (originalValue),
                               ^

../../include/QtCore/../../src/corelib/arch/qatomic_powerpc.h:143:36: error:
    invalid output constraint '=&b' in asm
             : [originalValue] "=&b" (originalValue),
                               ^

【问题讨论】:

    标签: macos qt4 macos-big-sur


    【解决方案1】:

    从文件名 qatomic_powerpc.h 我可以猜到它试图构建 powerpc 二进制文件,而该架构自 10.6 “雪豹”以来已被删除。

    虽然我认为可以修补 Qt 4 源代码以使其可在 Big Sur 上构建,但我想问一下您需要它做什么?很可能更好的方法是将代码移植到 Qt 5.15.2。

    请注意,有一个已解决的错误报告:https://trac.macports.org/ticket/61886

    【讨论】:

      猜你喜欢
      • 2021-08-04
      • 2021-05-31
      • 2021-06-08
      • 1970-01-01
      • 1970-01-01
      • 2021-06-08
      • 2021-03-01
      • 2021-09-04
      • 2021-11-26
      相关资源
      最近更新 更多