英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论