acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

Compile OpenCore on legacy macOS's with build_OC.tool #2405

Closed startergo closed 6 months ago

startergo commented 6 months ago

Cannot compile OpenCore on Mavericks. Disregard if Mavericks is unsupported platform. Legacy macOS's do not support HomeBrew. Macports is the only option. I had to upgrade git through Macports, disable self sign ed certificate verification with:

git config --global http.sslVerify false

Double clicked on the build_OC.tool and it failed. The build log is attached. OpenCore_compile_error.zip

Also tried building as per the manual:

. ./edksetup.sh
Loading previous configuration from /Users/mavericks/UDK/Conf/BuildEnv.sh
Using EDK2 in-source Basetools
WORKSPACE: /Users/mavericks/UDK
EDK_TOOLS_PATH: /Users/mavericks/UDK/BaseTools
CONF_PATH: /Users/mavericks/UDK/Conf
Maverickss-Mac-mini:UDK mavericks$ make -C BaseTools 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Source/C
Attempting to detect HOST_ARCH from 'uname -m': x86_64
Detected HOST_ARCH of X64 using uname.
mkdir -p .
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Common
cc  -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../../../../MdePkg/Include/X64/ -I ../../../../MdePkg/Include/ -I ../../../../MdeModulePkg/Include/ -I ../../../../OpenCorePkg/User/Include -fshort-wchar -flto -DUSING_LTO "-DEFIAPI=__attribute__((ms_abi))" -arch x86_64 -arch arm64 -mmacosx-version-min=10.9 -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g -arch x86_64 -arch arm64 -mmacosx-version-min=10.9 -DUEFI_IMAGE_FORMAT_SUPPORT_SOURCES=0x02 -O2  BinderFuncs.c -o BinderFuncs.o
In file included from BinderFuncs.c:9:
In file included from ../Common/BinderFuncs.h:14:
In file included from ../Include/Common/UefiBaseTypes.h:13:
In file included from ../Include/Common/BaseTypes.h:34:
In file included from ../../../../MdePkg/Include/Base.h:21:
../../../../MdePkg/Include/X64/ProcessorBind.h:132:9: error: unknown type name '__UINT64_TYPE__'
typedef __UINT64_TYPE__ UINT64;
        ^
In file included from BinderFuncs.c:9:
In file included from ../Common/BinderFuncs.h:14:
In file included from ../Include/Common/UefiBaseTypes.h:13:
In file included from ../Include/Common/BaseTypes.h:34:
../../../../MdePkg/Include/Base.h:607:9: error: unknown type name '__builtin_ms_va_list'; did you mean '__builtin_va_list'?
typedef __builtin_ms_va_list VA_LIST;
        ^~~~~~~~~~~~~~~~~~~~
        __builtin_va_list
note: '__builtin_va_list' declared here
../../../../MdePkg/Include/Base.h:831:1: error: static_assert failed "sizeof (UINT64) does not meet UEFI Specification Data Type
      requirements"
STATIC_ASSERT (sizeof (UINT64)  == 8, "sizeof (UINT64) does not meet UEFI Specification Data Type requirements");
^              ~~~~~~~~~~~~~~~~~~~~~
../../../../MdePkg/Include/Base.h:815:24: note: expanded from macro 'STATIC_ASSERT'
#define STATIC_ASSERT  _Static_assert
                       ^
3 errors generated.
make[2]: *** [BinderFuncs.o] Error 1
make[1]: *** [Common] Error 2
make: *** [Source/C] Error 2
Maverickss-Mac-mini:UDK mavericks$ 
vit9696 commented 6 months ago

I am afraid we cannot offer support for this moderately old compiler. The set issues are relatively heavy requirements on the toolchain we are not ready to lift. You can try building with a newer clang, but I do not know a reliable step by step guide to set it up.