Logo used to indicate a Universal application
Mac transition to Intel processors

The universal binary format is, in Apple parlance, a format for executable files that run natively on either PowerPC or Intel-manufactured IA-32 or Intel 64-based Macintosh computers. The format originated on NeXTStep as 'Multi-Architecture Binaries', and the concept is more generally known as a fat binary, as seen on Power Macintosh.

Why can't I install telnet on my macOS catalina with Homebrew? Ask Question. Constructing build description error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. (in target 'libtelnet' from project 'libtelnet'). BUILD FAILED. Do not report this issue to Homebrew/brew. The macOS 10.14 SDK no longer contains support for compiling 32-bit applications. If developers need to compile for i386, Xcode 9.4 or earlier is required. (39858111) Devices Known Issues. Devices running iOS 12 may fail to take screenshots requested from Xcode’s Devices window. (42873539) Workaround: Take the screenshot on the device. The universal binary format is, in Apple parlance, a format for executable files that run natively on either PowerPC or Intel-manufactured IA-32 or Intel 64-based Macintosh computers. The format originated on NeXTStep as 'Multi-Architecture Binaries', and the concept is more generally known as a fat binary, as seen on Power Macintosh. With the release of Mac OS X Snow Leopard, and before that. I checked the file later and it had been edited to contain the line 'foreign-i386 architecture'. Sudo apt-get update worked just fine. Sudo apt-get install wine:i386 returned Do you want to continue? Y/n y after which it returned. Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps.A replacement for the a.out format, Mach-O offers more extensibility and faster access to information in the symbol table. On a side note, I believe Apple has officially dropped support for i386 arch with the release of Xcode 10.x and is only supporting x8664 for macOS development at the moment. That said, I submitted a PR #82 to this repo that is awaiting review from @alperakcan and if it gets merged in to master than a simple clone and build should suffice.

With the release of Mac OS X Snow Leopard, and before that, since the move to 64-bit architectures in general, some software publishers such as Mozilla[1] have used the term 'universal' to refer to a fat binary that includes builds for both i386 (32-bit Intel) and x86_64 systems. The same mechanism that is used to select between the PowerPC or Intel builds of an application is also used to select between the 32-bit or 64-bit builds of either PowerPC or Intel architectures.

Apple, however, continued to require native compatibility with both PowerPC and Intel in order to grant third-party software publishers permission to use Apple's trademarks related to universal binaries.[2] Apple does not specify whether or not such third-party software publishers must (or should) bundle separate builds for all architectures.

Universal binaries were introduced into Mac OS at the 2005 Apple Worldwide Developers Conference as a means to ease the transition from the existing PowerPC architecture to systems based on Intel processors, which began shipping in 2006. Universal binaries typically include both PowerPC and x86 versions of a compiled application. The operating system detects a universal binary by its header, and executes the appropriate section for the architecture in use. This allows the application to run natively on any supported architecture, with no negative performance impact beyond an increase in the storage space taken up by the larger binary.

Starting with Mac OS X Snow Leopard, only Intel-based Macs are supported, so software that specifically depends upon capabilities present only in Mac OS X 10.6 or newer will only run on Intel-based Macs and therefore does not require Intel/PPC fat binaries. Additionally, starting with OS X Lion, only 64-bit Intel Macs are supported, so software that specifically depends on new features in OS X 10.7 or newer will only run on 64-bit processors and therefore does not require 32-bit/64-bit fat binaries.[3][4] Fat binaries would only be necessary for software that is designed to have backward compatibility with older versions of Mac OS X running on older hardware.

The new Universal 2 binary format was introduced at the 2020 Worldwide Developers Conference.[5] Universal 2 allows applications to run on both Intelx86-64-based and ARM64-based Macintosh computers, for Apple's transition to ARM processors.

Motivation[edit]

There are two general alternative solutions. The first is to simply provide two separate binaries, one compiled for the x86 architecture and one for the PowerPC architecture. However, this can be confusing to software users unfamiliar with the difference between the two, although the confusion can be remedied through improved documentation, or the use of hybrid CDs. The other alternative is to rely on emulation of one architecture by a system running the other architecture. This approach results in lower performance, and is generally regarded an interim solution to be used only until universal binaries or specifically compiled binaries are available as with Rosetta.

Universal binaries are larger than single-platform binaries, because multiple copies of the compiled code must be stored. However, because some non-executable resources are shared by the two architectures, the size of the resulting universal binary can be, and usually is, smaller than both binaries combined. They also do not require extra RAM because only one of those two copies is loaded for execution.

History[edit]

The concept of a universal binary originated with 'Multi-Architecture Binaries' in NeXTSTEP, the main architectural foundation of Mac OS X. NeXTSTEP supports universal binaries so that one executable image can run on multiple architectures, including Motorola's m68k, Intel's x86, Sun Microsystems's SPARC, and Hewlett-Packard's PA-RISC. NeXTSTEP and macOS use Mach-O archive as the binary format underlying the universal binary.

Apple previously used a similar technique during the transition from 68k processors to PowerPC in the mid-1990s. These dual-platform executables are called fat binaries, referring to their larger file size.

Apple's Xcode 2.1 supports the creation of these files, a new feature in that release. A simple application developed with processor-independence in mind might require very few changes to compile as a universal binary, but a complex application designed to take advantage of architecture-specific features might require substantial modification. How to clear space on mac for catalina. Applications originally built using other development tools might require additional modification. These reasons have been given for the delay between the introduction of Intel-based Macintosh computers and the availability of third-party applications in universal binary format. Apple's delivery of Intel-based computers several months ahead of their previously announced schedule is another factor in this gap.

Apple's Xcode 2.4 takes the concept of universal binaries even further, by allowing four-architecture binaries to be created (32- and 64-bit for both Intel and PowerPC), therefore allowing a single executable to take full advantage of the CPU capabilities of any Mac OS X machine.

Universal applications[edit]

Many software developers have provided universal binary updates for their products since the 2005 WWDC. As of December 2008, Apple's website listed more than 7,500 Universal applications.[6]

On April 16, 2007, Adobe Systems announced the release of Adobe Creative Suite 3, the first version of the application suite in the Universal Binary format.[7]

From 2006 to 2010, many Mac OS X applications were ported to Universal Binary format, including QuarkXPress, Apple's own Final Cut Studio, Adobe Creative Suite, Microsoft Office 2008, and Shockwave Player with version 11 - after that time most were made Intel-only apps. Non-Universal 32-bit PowerPC programs will run on Intel Macs running Mac OS X 10.4, 10.5, and 10.6 (in most cases), but with non-optimal performance, since they must be translated on-the-fly by Rosetta; they will not run on Mac OS X 10.7 Lion and later as Rosetta is no longer part of the OS.

iOS[edit]

Apple has used the same binary format as Universal Binaries for iOS applications by default on multiple occasions of architectural co-existence: around 2010 during the armv6-armv7-armv7s transition and around 2016 during the armv7-arm64 transition. The App Store automatically thins the binaries. No trade names were derived for this practice, as it is only a concern of the developer.[8]

Universal 2[edit]

Mac transition to ARM

On June 22, 2020, Apple announced a two-year permanent transition from Intelx86-64-based processors to ARM64-based Apple Silicon beginning with macOS Big Sur in late 2020.[9] To aid in this transition, a new Universal 2 binary was introduced to enable applications to be run on either x86-64-based processors or ARM64-based processors.[5]

Tools[edit]

The main tool for handling (creating or splitting) universal binaries is the lipo command found in XCode. The file command on macOS and several other Unix-like systems can identify Mach-O universal binaries and report architecture support.[10]Snow Leopard's System Profiler provides this information on the Applications tab.

See also[edit]

  • Xslimmer, a commercial Mac OS X application that allows the user to slim down the fat universal binaries by removing the code for the platform that's not in use.

References[edit]

  1. ^'Firefox 4 for Mac OS X: Under the Hood'. November 10, 2010. Retrieved March 3, 2017.
  2. ^'Mac OS X Universal Logo: Guidelines for Mac OS X Universal Logo Licenses'(PDF). Apple Inc. June 2007. Retrieved October 18, 2013.
  3. ^'Mac OS X: 64-bit kernel frequently asked questions'. Apple Inc. October 4, 2012. Retrieved October 18, 2013.
  4. ^'Does Mac OS X 10.7 'Lion' run on Macs with a 32-bit EFI? How does the performance of Mac OS X 10.7 'Lion' compare to Mac OS X 10.6 'Snow Leopard' in 'real-world' tests? @ EveryMac.com'. everymac.com. Kyle Media. Retrieved October 6, 2017.
  5. ^ abAxon, Samuel (June 22, 2020). 'This is Apple's roadmap for moving the first Macs away from Intel'. Ars Technica. Retrieved June 23, 2020.
  6. ^'Macintosh Products Guide: Universal Applications'. Apple Computer. Retrieved December 22, 2008.
  7. ^'Adobe Ships Creative Suite 3'. Adobe Systems. April 16, 2007. Archived from the original on July 8, 2012. Retrieved October 18, 2013.
  8. ^'lipo - iOS fat binaries and thinning out'. Stack Overflow.
  9. ^Amadeo, Ron (June 22, 2020). 'Apple announces macOS 11, 'Big Sur,' with an emphasis on design'. Ars Technica. Retrieved June 23, 2020.
  10. ^stany (September 6, 2005). 'Mac OS X: Trimming fat from Mach-O fat files'. theconsultant.net. Retrieved October 18, 2013.

External links[edit]

  • Apple Developer Transition Resource Center
  • Apple Universal Binary Programming Guidelines
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Universal_binary&oldid=965880973'

The first part of this document describes issues you should consider when bringing code to a 64-bit architecture. You should read through those chapters before you compile your code for the first time, to help you determine whether the compiler warnings are useful or relevant (and possibly do an initial code scrub to look for common errors).

After you have read those chapters, it's time to compile your code with a 64-bit target architecture. You can either compile your code directly (using GCC) or through Xcode. This chapter takes you through the process of setting up your build environment for 64-bit compilation.

Compiling 64-Bit Code Using GCC

/disk-utility-for-el-capitan-is-located.html. For the most part, compiling 64-bit code using GCC works the same way as compiling 32-bit code; there are a few exceptions, however:

  • You must use GCC 4.0 or later. To choose a GCC version to be used when typing gcc on the command line, type gcc_select 4.0. To change the GCC version to be used in Xcode, see Compiling 64-Bit Code Using Xcode.

  • You should turn on the -Wall flag (and possibly the -Wconversion flag if you are debugging conversion problems) in order to get additional warnings about potential pointer truncation and other issues.

  • You must specify a 64-bit architecture with -arch x86_64. You can also compile binaries with multiple architectures, such as -arch ppc -arch i386 -arch x86_64.

In addition to these exceptions, there are a few new flags and features added for 64-bit architectures. Also, a few flags are not available for 64-bit architectures. The key differences are described in the next section.

New Flags and Features for 64-Bit Architectures

Several flags related to 64-bit architectures have been added or modified in GCC:

-arch x86_64

The 64-bit x86 architecture option.

-Wconversion

Although not technically new for 64-bit architectures, this option is mostly useful when transitioning 32-bit code to 64-bit. This flag causes additional warnings to be printed when certain conversions occur between data types of different sizes. Most of these warnings will not be useful, so you should not necessarily fix everything that generates a warning with this flag. However, you may sometimes find this flag useful for tracking down hard-to-find edge cases.

In particular, this flag can also help track down edge cases in which a series of legal conversions result in an illegal conversion. For example, with this flag, the compiler will issue a warning if you assign a pointer to a 64-bit integer, pass that pointer into a 32-bit function argument, and subsequently convert the 64-bit function result back into a pointer.

Of course, this flag also produces numerous unexpected warnings that are harmless. For example, in ANSI C, a character literal (for example, 'c') is of type int, so passing it to a function that takes type char gives a truncation warning. Although the warning is pedantically correct, it is largely irrelevant. You’ll have to sort through all these warnings by hand and determine which ones are legitimate and which ones are fiction.

-Wformat

While not a 64-bit-specific flag, this flag will help you catch mistakes in format arguments to printf, sprintf, and similar functions. This flag is turned on by default if you use the -Wall flag.

-Wshorten-64-to-32

This flag is like -Wconversion, but is specific to 64-bit data types. This flag causes GCC to issue a warning whenever a value is implicitly converted (truncated) from a 64-bit type to a 32-bit type. You should fix any warnings generated by this flag, as they are likely to be bugs.

In addition, the following flags are highly recommended:

-Wall

Turns on a lot of generally useful warnings.

-Wimplicit-function-declaration

Warns if a function is used prior to its declaration. This can help catch many mistakes caused by differing sizes of function arguments and return types.

Compiling 64-Bit Code Using Xcode

This section explains how to get started compiling 64-bit code using Xcode. These instructions assume that you have already installed the necessary command-line components—that is, a 64-bit–aware version of the compiler, linker, assembler, and other low-level tools.

The I386 Architecture Is Deprecated For Macos Mac

With Xcode 1.0 and later, you can build multiarchitecture binaries (MABs). Because each target can define the set of architectures for the target being built, you can disallow architectures on a per-target basis. You might, for example, choose to build a target with a reduced list of architectures if the target contains assembler code for a particular processor or is not 64-bit-clean.

Each time you run the command-line tool xcodebuild, you can specify which target architectures to build. You can also configure a 'build style' to build a particular set of architectures from within Xcode.

Xcode then builds the target for each of the architectures specified, skipping any architectures that the target does not support. If the target doesn't support any of the specified architectures, that target is skipped entirely.

The build setting VALID_ARCHS defines the architectures for which a given target can be built. This setting should contain a list of architectures separated by spaces. For example, to specify that your target can be built for i386, and x86_64, set VALID_ARCHS to 'i386 x86_64' (without the quotes) in the Xcode inspector for your target.

The build setting ARCHS defines the architectures for which the entire project should be built. This setting should also contain a space-delimited list of architectures. This build setting can be defined either on the command-line to xcodebuild, or in a build style in Xcode.

For example, to build your project for both 32-bit and 64-bit Intel architectures, type:

You can also set ARCHS='i386 x86_64' in a build style in your project. Similarly, if you want to build only a 64-bit Intel version, specify ARCHS='x86_64'.

If your source code includes special 64-bit versions of framework headers or library headers, you may need to add search paths to the Header Search Paths and Framework Search Paths build settings in the target inspector.

If you are building a target for more than one architecture at the same time, you will see each source file being compiled more than once. This is normal behavior. Xcode compiles each source file once for each architecture so that you can pass different compiler flags for each architecture. The files are glued together at the end of compilation using lipo. For more information, see lipo.

Using Architecture-Specific Flags

Normally, any build settings you specify in the target inspector are used for all architectures for which the target is built. In many cases, however, you need to specify different flags for 64-bit architectures.

If you want to specify additional per-architecture compiler flags, you can use the PER_ARCH_CFLAGS_<arch> family of build settings, where <arch> is the name of the architecture. For example, to specify compiler flags that apply only to 64-bit Intel compilation, add them to the PER_ARCH_CFLAGS_x86_64 build setting.

The I386 Architecture Is Deprecated For Macos Download

For example, if you want to make your 64-bit slice run only on OS X v10.6 instead of v10.5, you could set a per-architecture value for “OS X Deployment Target”:

  • Click the target and choose “Get Info” from the File menu.

  • Click “OS X Deployment Target”.

  • Click the gear at the lower left corner of the info window and choose “Add Build Condition Setting” from the resulting pop-up menu.

  • Change the architecture to “Intel 64-bit” and specify the x86-64 setting for this option.

  • Add additional conditions as needed for additional architectures.

  • Change the main setting (above the constrained settings) to whatever you want the default value to be.


The I386 Architecture Is Deprecated For Macos Mac


The I386 Architecture Is Deprecated For Macos X

Copyright © 2004, 2012 Apple Inc. All Rights Reserved. Terms of Use Privacy Policy Updated: 2012-12-13