I successfully build on latest Hight Sierra.
I also had a lot of small problems while build, but neither with freetype2.
Here is proton 3.7 dist for MacOS High Sierra.
I'll hope it works out for you.
https://github.com/3t0n/Proton/releases/tag/20180822
It looks like the SDK libraries (or at least one of them) shipped in the 10.14 SDK are no longer multi-arch and only contain x86_64 sections. You won't be able to use them to link i386 binaries.
You can probably still use the 10.13 SDK under 10.14, but doing so is likely going to involve lots of fiddling with the build process.
I found a fix! Just go to https://developer.apple.com/download/more/ then download Command Line Tools (macOS 10.14) for Xcode 10 Beta 6, install it then run build_proton.sh and it works fine! (Bit inconvenient though.)
I found a fix! Just go to https://developer.apple.com/download/more/ then download Command Line Tools (macOS 10.14) for Xcode 10 Beta 6, install it then run build_proton.sh and it works fine! (Bit inconvenient though.)
Tried this. Still getting the same error? Fresh install Mojave.
configure: error: in `/Users/garethsomers/dev/steam-proton/proton/build/freetype.win32':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [setup] Error 77
@GarethSomers can you do gcc --version and clang --version please.
configure: error: C compiler cannot create executables points to an error with the compiler not being available.
have same error with MacOS 10.14 beta and Xcode 10 beta
gcc --version
Configured with: --prefix=/Users/oscar/Downloads/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Users/oscar/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.40.1)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Users/oscar/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
iMac:proton oscar$ clang --version
Apple LLVM version 10.0.0 (clang-1000.10.40.1)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Users/oscar/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@Luke-Nukem It's caused by an error that occurs in Mojave due to i386 architecture being deprecated.
The message is:
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@gu3st, oops, yeah I thought that was meant to be the macOS version after Mojave.
@milomc123 thank you! I install Line Tools (macOS 10.14) for Xcode 10 Beta 6 and Line Tools (macOS 10.13) for Xcode 10 Beta 6(https://developer.apple.com/download/more/). Then I open Xcode_beta to finish the install installation. Run the build_proton.sh and it works fine.
Though I don't know which file works.
finally, failed again.
/bin/sh -c /Users/senchgaliedon/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-banrxmgmvgchspfvjuajbnnpkicv/Build/Intermediates.noindex/MoltenVK.build/Release-iphoneos/MoltenVK-iOS.build/Script-A9731FAD1EDDAE39006B7298.sh
Undefined symbols for architecture arm64:
"mvk::SPIRVToMSLConverter::convert(mvk::SPIRVToMSLConverterContext&, bool, bool, bool)", referenced from:
MVKShaderModule::convert(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-arm64-master.o)
"mvk::SPIRVToMSLConverter::setSPIRV(unsigned int const*, unsigned long)", referenced from:
MVKShaderModule::MVKShaderModule(MVKDevice*, VkShaderModuleCreateInfo const*) in MoltenVK(MoltenVK-arm64-master.o)
"mvk::SPIRVToMSLConverterContext::alignUsageWith(mvk::SPIRVToMSLConverterContext const&)", referenced from:
MVKShaderLibraryCache::getShaderLibrary(mvk::SPIRVToMSLConverterContext*, MVKShaderModule*, bool*) in MoltenVK(MoltenVK-arm64-master.o)
MVKShaderLibraryCache::findShaderLibrary(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-arm64-master.o)
MVKShaderLibraryCache::merge(MVKShaderLibraryCache*) in MoltenVK(MoltenVK-arm64-master.o)
"mvk::SPIRVToMSLConverterContext::isVertexBufferUsed(unsigned int) const", referenced from:
MVKGraphicsPipeline::getMTLRenderPipelineDescriptor(VkGraphicsPipelineCreateInfo const*) in MoltenVK(MoltenVK-arm64-master.o)
"mvk::SPIRVToMSLConverterContext::isVertexAttributeLocationUsed(unsigned int) const", referenced from:
MVKGraphicsPipeline::getMTLRenderPipelineDescriptor(VkGraphicsPipelineCreateInfo const*) in MoltenVK(MoltenVK-arm64-master.o)
"mvk::SPIRVToMSLConverterContext::matches(mvk::SPIRVToMSLConverterContext const&) const", referenced from:
MVKShaderLibraryCache::getShaderLibrary(mvk::SPIRVToMSLConverterContext*, MVKShaderModule*, bool*) in MoltenVK(MoltenVK-arm64-master.o)
MVKShaderLibraryCache::findShaderLibrary(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-arm64-master.o)
MVKShaderLibraryCache::merge(MVKShaderLibraryCache*) in MoltenVK(MoltenVK-arm64-master.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Create\ Dynamic\ Library /Users/senchgaliedon/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-banrxmgmvgchspfvjuajbnnpkicv/Build/Intermediates.noindex/MoltenVK.build/Release-iphoneos/MoltenVK-iOS.build/Script-A9731FAD1EDDAE39006B7298.sh
(1 failure)
I made a little progress on the build without installing the old commandline tools by bringing back the old sdks via https://github.com/phracker/MacOSX-SDKs w/ https://github.com/phracker/MacOSX-SDKs/pull/14 and symlinking them into the Xcode 10 app bundle, much like https://github.com/devernay/xcodelegacy does, using https://github.com/kergoth/dotfiles/blob/master/osx/scripts/link-xcode-sdks, then setting flags like the command from xcodelegacy's readme:
export CFLAGS="-g -O2 -mmacosx-version-min=10.13 -isysroot /SDKs/MacOSX.platform/MacOSX10.13.sdk" CXXFLAGS="-g -O2 -mmacosx-version-min=10.13 -isysroot /SDKs/MacOSX.platform/MacOSX10.13.sdk" LDFLAGS="-mmacosx-version-min=10.13 -isysroot /SDKs/MacOSX.platform/MacOSX10.13.sdk"
while experimenting with the WIP makefile based buildsystem + https://github.com/ValveSoftware/Proton/compare/makefile-buildsystem...kergoth:makefile-buildsystem to get it to obey the exported global flags. Still hitting other failures, but just noting it in case anyone else wants to try building with xcode 10 clt and an old macOS 10.3 SDK.
updated to command line tools 10.14 beta 6, ran xcode select, opened x-code beta, still got:
❯ ./build_proton.sh 3s 51ms
generating `configure.ac'
running `aclocal -I . --force'
running `glibtoolize --force --copy --install'
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './config.guess'
glibtoolize: copying file './config.sub'
glibtoolize: copying file './install-sh'
glibtoolize: copying file './ltmain.sh'
glibtoolize: You should add the contents of the following files to 'aclocal.m4':
glibtoolize: '/usr/local/Cellar/libtool/2.4.6_1/share/aclocal/libtool.m4'
glibtoolize: '/usr/local/Cellar/libtool/2.4.6_1/share/aclocal/ltoptions.m4'
glibtoolize: '/usr/local/Cellar/libtool/2.4.6_1/share/aclocal/ltsugar.m4'
glibtoolize: '/usr/local/Cellar/libtool/2.4.6_1/share/aclocal/ltversion.m4'
glibtoolize: '/usr/local/Cellar/libtool/2.4.6_1/share/aclocal/lt~obsolete.m4'
glibtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
glibtoolize: and rerunning glibtoolize and aclocal.
glibtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
running `autoconf --force'
Generating `Makefile'
FreeType build system -- automatic system detection
The following settings are used:
platform unix
compiler cc
configuration directory /Users/daniel/Dev/proton/freetype2/builds/unix
configuration rules /Users/daniel/Dev/proton/freetype2/builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make' again to build the library,
or `/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make refdoc' to build the API reference (this needs python >= 2.6).
/Users/daniel/Dev/proton/freetype2/builds/unix/configure '--prefix=/Users/daniel/Dev/proton/build/tools.win32' '--without-png' '--host' 'i686-apple-darwin' 'CFLAGS=-m32 -g -O2' 'LDFLAGS=-m32' 'PKG_CONFIG=false'
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... i686-apple-darwin
checking for i686-apple-darwin-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/daniel/Dev/proton/build/freetype.win32':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [setup] Error 77
Can't no longer build openal-soft as i386, see https://github.com/kcat/openal-soft/issues/229
up?
Failing, with the same error reported by @galiedon :
/bin/sh -c /Users/xyz/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-fczhtslohtqczeddybrzkxfsqpkk/Build/Intermediates.noindex/MoltenVK.build/Release/MoltenVK-macOS.build/Script-A93F47C91D7E389E002AF700.sh
Undefined symbols for architecture x86_64:
"mvk::SPIRVToMSLConverter::convert(mvk::SPIRVToMSLConverterContext&, bool, bool, bool)", referenced from:
MVKShaderModule::convert(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-x86_64-master.o)
"mvk::SPIRVToMSLConverter::setSPIRV(unsigned int const*, unsigned long)", referenced from:
MVKShaderModule::MVKShaderModule(MVKDevice*, VkShaderModuleCreateInfo const*) in MoltenVK(MoltenVK-x86_64-master.o)
"mvk::SPIRVToMSLConverterContext::alignUsageWith(mvk::SPIRVToMSLConverterContext const&)", referenced from:
MVKShaderLibraryCache::getShaderLibrary(mvk::SPIRVToMSLConverterContext*, MVKShaderModule*, bool*) in MoltenVK(MoltenVK-x86_64-master.o)
MVKShaderLibraryCache::findShaderLibrary(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-x86_64-master.o)
MVKShaderLibraryCache::merge(MVKShaderLibraryCache*) in MoltenVK(MoltenVK-x86_64-master.o)
"mvk::SPIRVToMSLConverterContext::isVertexBufferUsed(unsigned int) const", referenced from:
MVKGraphicsPipeline::getMTLRenderPipelineDescriptor(VkGraphicsPipelineCreateInfo const*) in MoltenVK(MoltenVK-x86_64-master.o)
"mvk::SPIRVToMSLConverterContext::isVertexAttributeLocationUsed(unsigned int) const", referenced from:
MVKGraphicsPipeline::getMTLRenderPipelineDescriptor(VkGraphicsPipelineCreateInfo const*) in MoltenVK(MoltenVK-x86_64-master.o)
"mvk::SPIRVToMSLConverterContext::matches(mvk::SPIRVToMSLConverterContext const&) const", referenced from:
MVKShaderLibraryCache::getShaderLibrary(mvk::SPIRVToMSLConverterContext*, MVKShaderModule*, bool*) in MoltenVK(MoltenVK-x86_64-master.o)
MVKShaderLibraryCache::findShaderLibrary(mvk::SPIRVToMSLConverterContext*) in MoltenVK(MoltenVK-x86_64-master.o)
MVKShaderLibraryCache::merge(MVKShaderLibraryCache*) in MoltenVK(MoltenVK-x86_64-master.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Create\ Dynamic\ Library /Users/xyz/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-fczhtslohtqczeddybrzkxfsqpkk/Build/Intermediates.noindex/MoltenVK.build/Release/MoltenVK-macOS.build/Script-A93F47C91D7E389E002AF700.sh
(1 failure)
Any clue?
(I'm pretty new to MacOS)
@xarvh this can be solved by manually updating MoltenVK subrepo and also updating build scheme for MoltenVK to MoltenVK Package (Debug).
@yurikoles Thank you, that worked.
Now the build succeeds:
/bin/sh -c /Users/xyz/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-fczhtslohtqczeddybrzkxfsqpkk/Build/Intermediates.noindex/MoltenVKPackaging.build/Debug/MoltenVK.build/Script-A9FEADD61F3517480010240E.sh
MVK_BUILT_PROD_PATH = /Users/xyz/Library/Developer/Xcode/DerivedData/MoltenVKPackaging-fczhtslohtqczeddybrzkxfsqpkk/Build/Products/Debug-iphoneos
** BUILD SUCCEEDED **
cp: Package/Release/MoltenVK/include/*: No such file or directory
However dist/, build/wine.win32/ and build/wine.win64/ are completely empty.
Am I missing something?
(Thank you for your patience, much appreciated).
Tried again with a fresh clone.
git clone https://github.com/ValveSoftware/Proton.git proton
cd proton
git submodule update --init
git submodule update MoltenVK
vi build_proton.sh # "MoltenVK (Release)" => "MoltenVK Package (Debug)"
./build_proton.sh
This fails; digging in build/freetype.win32/config.log the error is:
configure:2935: $? = 0
configure:2924: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2935: $? = 1
configure:2924: gcc -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:2935: $? = 1
configure:2955: checking whether the C compiler works
configure:2977: gcc -m32 -g -O2 -m32 conftest.c >&5
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:2981: $? = 1
configure:3019: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "FreeType"
| #define PACKAGE_TARNAME "freetype"
| #define PACKAGE_VERSION "2.9"
| #define PACKAGE_STRING "FreeType 2.9"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3024: error: in `/Users/xyz/proton/build/freetype.win32':
configure:3026: error: C compiler cannot create executables
To fix build issues on macOS, you're going to need Xcode 9 and the Xcode 9 command line tools, you can get them both at
https://developer.apple.com/download/more/
You're going to need to remove Xcode 10 from macOS to build successfully. MoltenVK and freetype2 blow up otherwise. MoltenVK is particularly problematic as it requires Xcode 9.x.x to compile successfully. freetype2 simply needs a version of gcc that can cross compile i686.
First, remove Xcode 10 as you would any other application, you'll also want to purge the command line tools for Xcode 10 if you have them installed. You can purge the command line tools via sudo rm -rf /Library/Developer/CommandLineTools
Then install Xcode 9, in my instance I used Xcode 9.3.
Next install the Xcode 9 command line tools, I used the version that corresponded to the full Xcode version I have installed so again, 9.3.
There is one other thing that needs to be done to build successfully. meson install is used to move the compiled windows DLL files to their correct paths. The problem here is that meson detects that we're on macOS and instead looks for *.dylib files to move instead. We can fix that by modifying the script that calls this function. /usr/local/lib/python3.7/site-packages/mesonbuild/scripts/depfixer.py
simply comment out the following block of code at the bottom of the script:
if shutil.which('install_name_tool'):
fix_darwin(fname, new_rpath, final_path, install_name_mappings)
So it should become
#if shutil.which('install_name_tool'):
# fix_darwin(fname, new_rpath, final_path, install_name_mappings)
Build and voila.
Once you've built proton, be sure to undo the commented out lines at the bottom of depfixer as meson ordinarily needs this.
In the worst case you may also need to purge and re-clone the Proton repo to remove anything you might've altered when originally trying to fix this issue. Hope this helps!
I guess I'll just wait for a 64-bit version. 🤦🏼♂️
@DanielHaroldLane thanks a lot for the instructions. I did try them, but it's well beyond my ability to use a mac. =(
I'll wait until it's a bit more mature.
macOS support has been removed: https://github.com/ValveSoftware/Proton/commit/a84120449d8177fa40f3de729e55d238d3c24877
It was fun while it lasted.
proton 3.7x2 2018-10
Trying to build on macOS Mojave 10.14 (18A371a).
Portion of
config.log: