问题在于在Mac上运行ScalaZ3时存在冲突的体系结构。

huangapple go评论54阅读模式
英文:

Problem with running ScalaZ3 on Mac due to conflicting architectures

问题

我正在使用苹果M2架构运行Scala项目,但遇到以下问题:

如果我从IntelliJ运行项目,会出现错误:
(mach-o文件,但架构不兼容(拥有'x86_64',需要'arm64'), 这是因为Z3依赖于x86的dlib文件。

然而,如果我运行sbt run,项目可以无缝运行,因为终端识别sbt为x86应用程序并通过rosetta运行。

我尝试过在新机器上从源代码重新编译dlibs,但它们仍然是x86。我还尝试过以x86方式运行IntelliJ,但没有成功。

有没有办法告诉IntelliJ以rosetta(作为x86)方式运行我的项目?

任何建议将不胜感激!

英文:

I am running a Scala project with Z3 on an Apple M2 architecture and I am stuck with the following issue:

If I run the project from IntellIJ, I get the error:
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), which makes sense since Z3 relies on x86 dlib files.

However, if I run sbt run the project runs seamlessly, since the terminal recognises sbt as an x86 app and runs it via rosetta.

I have tried to recompile the dlibs from sources on my new machine but they are still x86. I have also tried to run Intellij as x86 with no success.

Is there any way to tell IntellIJ to run my project under rosetta (as an x86?)

Any suggestion would be well appreciated!

答案1

得分: 0

问题已经奇迹般地通过下载x64 JDK并使用它来编译项目得到解决。JDK实际上强制了机器通过Rosetta来运行Java。

英文:

The problem was miraculously solved by downloading a x64 JDK and using it to compile the project.
The JDK practically forced the machine to run java via rosetta.

huangapple
  • 本文由 发表于 2023年4月10日 21:02:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/75977375.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定