You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #18156 adds support for setting multiple architectures in VCPKG_OSX_ARCHITECTURES. This works great for ports that use CMake themselves, but does not work for ports that don't.
The problem is mostly with ports using Autotools, since they tend to revolve around a config.h file which controls what is included and which options are enabled instead of looking at the preprocessor definitions. This means that it'll try to use the config for a specific platform also when compiling for the other.
One example of such a port is ffmpeg. If you add multiple -arch options to the configure (e.g. -arch x86_64 -arch arm64) the build fails with some specific byte-swapping code that works only for a single arch. ffmpeg is clearly not interested in fixing this, looking at messages on their mailing list this is apparently how they like it.
This means that we will need to do two separate builds and then use lipo to join everything into a single, universal binary.
It's likely that there are many other ports which have this same issue, so it could be beneficial to create something that can be used between different ports.
category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed
1 participant
Converted from issue
This discussion was converted from issue #18508 on November 22, 2021 08:34.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
PR #18156 adds support for setting multiple architectures in
VCPKG_OSX_ARCHITECTURES
. This works great for ports that use CMake themselves, but does not work for ports that don't.The problem is mostly with ports using Autotools, since they tend to revolve around a
config.h
file which controls what is included and which options are enabled instead of looking at the preprocessor definitions. This means that it'll try to use the config for a specific platform also when compiling for the other.One example of such a port is ffmpeg. If you add multiple
-arch
options to the configure (e.g.-arch x86_64 -arch arm64
) the build fails with some specific byte-swapping code that works only for a single arch. ffmpeg is clearly not interested in fixing this, looking at messages on their mailing list this is apparently how they like it.This means that we will need to do two separate builds and then use
lipo
to join everything into a single, universal binary.It's likely that there are many other ports which have this same issue, so it could be beneficial to create something that can be used between different ports.
Beta Was this translation helpful? Give feedback.
All reactions