Rosetta Xcode 14.3

0 views
Skip to first unread message

Mohammed Huberty

unread,
Aug 5, 2024, 12:03:31 AM8/5/24
to neuwerprahou
Notsure if this will solve your problem, but it resolved some of the errors I was getting on the M1. Right click on the Xcode application in your Applications folder and click 'Get Info' and check the box for 'Open using Rosetta'.

I think I've solved it. I was running the command under tmux, which I believe was running under rosetta. When I run those commands from the bare metal terminal, they return arm64. Starting a new build now to test


The problem is with --test I think, you could try to build removing --test because that will just build the compiler and not run the tests against Xcode build. It is common for people to run two builds one Xcode(used for development and debugging) and one ninja build to run the tests. This comes with a little disk space impact but normally not a big hit.

For example, the workflow I normally have is to build with Xcode using ./swift/utils/build-script --xcode --debug --debug-swift --skip-build-benchmarks --swift-darwin-supported-archs "$(uname -m)" --sccache --skip-ios --skip-tvos --skip-watchos --bootstrapping=off to devopment and debugging.

Then have a ninja build using:


I have used Xcode to debug rosetta projects in the past. It requires a little setup, but it works pretty well. Your system resources are identical to the MacBook Pro that I have used in the past, so it should work. What version of Xcode are you trying to use and how did you set up the executable to debug?


I am brand new to rosetta. Just found out that just to run an FlexPepDocking example is a very tedious trial-and-error procedure. Would be better if there are ways to help improve the code commenting and updating.


I think to make simulators appear you need to go to Xcode > Product > Destination > Destination architectures and then select both (rosetta and apple silicon). So now you can basically see the simulators.


For anyone missing simulators on ARM-based macs with Xcode 14.3+ you need to enable Rosetta Destination Architecture in Xcode, go to: Product / Destination / Destination Architectures chose Show Rosetta Destinations Show Both. Apple introduced this option in 14.3. Now you do not need to put Xcode itself in Rosetta mode as existed workaround before 14.3


I have the same problem with intel-based mac, my xcode is 15.1

What I have done is changing the Architecture in Building Settings to Standard Architectures (arm64) from arm64, then all simulators appear again.


Hello,I am trying to build Rosetta using Rosetta Xcode Project.My Mac's system version is 10.12.4 and Xcode's is 8.3.3.I have read the link : _documentation/Build-Documentation#setting-up-rosetta-3_alternative-setup-for-individual-workstations_build-rosetta-using-the-rosetta-xcode-project-mac for building Rosetta. However,i am still confused about how to build Rosetta.


I'm sorry I made you confused.My question is how to built Rosetta through Rosetta Xcode project.I don't know what shoud I do to add Rosetta source code to Xcode project and then compile Rosetta successfully.


Xcode project files are used to group together the files, build targets and compilation settings and serve as the mechanism by which projects are opened and saved. The canonical build tool for Rosetta is SCons and Xcode can be configured to use SCons as an external build system. However, Xcode will not index code that it does not compile, which severely limits its utility. A python script that reads the src.settings files and updates the Xcode project file is used to make Xcode aware of files added by other developers. This script can be found in Rosetta/main/source/xcode/make_project.py. To update your Xcode project file, use the following command :


By default, the Xcode project only contains and builds the libraries, however it is likely that you will want to build an application that is of interest to you. It's pretty easy to add a new application to Xcode, but it consists of a few steps that will be detailed below.


For any academic or commercial use, you need to request a license. Obtaining a license is free for academic users. After you obtained the license, you can download Rosetta. Make sure you download the version corresponding to the license you have. When you click, you can see the latest numbered release as well as several weekly releases. Numbered releases (since Rosetta3.6) are simply weekly releases that have been specially labeled - all weekly releases pass the same suite of tests that the numbered releases do.


For many version, we offer both a source and a binary version. The binary version may allow you to skip the compilation stage, but are more limited in the platforms on which they work. The "source" distribution should be useful on all platforms on which Rosetta can run. (If you're interested in noncanonical amino acids, download the NCAA rotamer libraries as well.)


To compile Rosetta you need a C++ compiler. Rosetta developers typically use GCC or Clang, although other standard-compliant compilers can be used. (See Install a complier for more information on installing a compiler.)


NOTE when you build with different extras, the extension will change. For example if you use extras=mpi, you use rosetta_scripts.mpi.linuxgccrelease instead of rosetta_scripts.default.linuxgccrelease


If you are interested in working with Rosetta code, you can build Rosetta using the Rosetta Xcode project. You can use it to build, run, debug, browse, and edit the source code. You can find the instructions on how to use Xcode to build Rosetta here.


PyRosetta is an interactive Python-based interface to Rosetta, allowing users to create custom molecular modeling algorithms with Rosetta sampling and scoring functions using Python scripting. PyRosetta was written for Python 2.6. You can follow instructions to download and install PyRosetta here and here.


For Linux, you will want to install the compiler package from your package management system. For Ubuntu and similar systems, the package "build-essential" can be installed with a command like sudo apt-get install build-essential.


it also looks like you are maybe using an m1 and trying to build for simulator which means you are running into architeture issues. For a quick workaround turn on rosetta for xcode and simulator so that it doesn't try to build everything as arm64 architecture for the sim


LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.


Developers using Xcode 15.4 with the new M3 chip might encounter the error "Undefined symbol: objc_class_$" while building their projects. This article explores this error, the role of Rosetta in Mac development, and the key differences between Rosetta and native compilation.


Missing class definition: The class referenced might not be properly defined in your project or imported incorrectly. Incorrect build settings: Build settings might not be configured to target the correct architecture (arm64 for M3). Framework issues: If you're using external frameworks, ensure they are compatible with the M3 architecture.


Translation: Rosetta translates instructions written for one processor architecture (e.g., Intel x86_64) into instructions that can be understood by a different architecture (e.g., Apple Silicon arm64). Purpose: Rosetta facilitates a smooth transition during hardware upgrades. It allows users to run applications designed for older processors on newer machines with different chipsets. Example: With the introduction of Apple Silicon Macs (M1 chip), Rosetta 2 enabled Intel-based Mac applications to run on these new machines.


Native Compilation: This involves compiling the application code specifically for the M1, M2, or M3 chip's architecture (arm64). This results in the best performance and efficiency. Rosetta: Rosetta allows you to run applications built for Intel-based Macs (x86_64) on Apple Silicon machines. This provides compatibility but might incur a slight performance penalty compared to native compilation.


For new development projects, it's highly recommended to target native compilation for the Apple Silicon architecture to leverage the full potential of the M3 chip. For existing projects built for Intel Macs, Rosetta can provide a temporary solution while you migrate to native compilation.


Verify Class Definition: Ensure the referenced class is properly defined in your project or imported correctly. Check Build Settings: Make sure your build settings target the arm64 architecture for the M3 chip. Update Frameworks: Consider updating any external frameworks to versions compatible with the M3 architecture.

3a8082e126
Reply all
Reply to author
Forward
0 new messages