Can't build Tianocore on OS X Yosemite

I am trying to create an EFI Development Kit (EDK2) for OS X Yosemite. I have the latest development tools. I followed the instructions exactly described here right up to build UnixPkg

. Then I tried to build EmulatorPkg

as recommended in the documentation; I had to install nasm

via Homebrew to get the error. Apple ships nasm

without supporting the required format.

Now it is missing the error about nasm

, but the build fails with this error:

Initializing workspace
/Users/user/Code/EFI/edk2/BaseTools
Loading previous configuration from $WORKSPACE/Conf/BuildEnv.sh
WORKSPACE: /Users/user/Code/EFI/edk2
EDK_TOOLS_PATH: /Users/user/Code/EFI/edk2/BaseTools
using prebuilt tools
Build environment: Darwin-14.0.0-x86_64-i386-32bit
Build start time: 13:46:37, Nov.02 2014

WORKSPACE        = /Users/user/Code/EFI/edk2
ECP_SOURCE       = /Users/user/Code/EFI/edk2/EdkCompatibilityPkg
EDK_SOURCE       = /Users/user/Code/EFI/edk2/EdkCompatibilityPkg
EFI_SOURCE       = /Users/user/Code/EFI/edk2/EdkCompatibilityPkg
EDK_TOOLS_PATH   = /Users/user/Code/EFI/edk2/BaseTools


Architecture(s)  = X64
Build target     = DEBUG
Toolchain        = XCODE32

Active Platform          =   /Users/user/Code/EFI/edk2/EmulatorPkg/EmulatorPkg.dsc
Flash Image Definition   = /Users/user/Code/EFI/edk2/EmulatorPkg/EmulatorPkg.fdf

Processing meta-data .. done!
Generating code . done!
Generating makefile . done!
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BaseLib/BaseLib.inf [X64]
Building ...  /Users/user/Code/EFI/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf [X64]
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [X64]
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf [X64]
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf [X64]
Building ... /Users/user/Code/EFI/edk2/EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf [X64]
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf  [X64]
Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf [X64]
Building ... /Users/user/Code/EFI/edk2/EmulatorPkg/Library/ThunkPpiList/ThunkPpiList.inf [X64]
Building ... /Users/user/Code/EFI/edk2/EmulatorPkg/Library/ThunkProtocolList/ThunkProtocolList.inf [X64]
Building ... /Users/user/Code/EFI/edk2/EmulatorPkg/Library/SecPeiServicesLib/SecPeiServicesLib.inf [X64]
 Building ... /Users/user/Code/EFI/edk2/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf [X64]

 Building ... /Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/Host.inf [X64]
 "gcc" -arch x86_64 -save-temps -g -O0 -mms-bitfields -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-address -fomit-frame-pointer -static -c -include AutoGen.h -fno-stack-protector -I/Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/X11IncludeHack -o /Users/user/Code/EFI/edk2/Build/Emulator/DEBUG_XCODE32/X64/EmulatorPkg/Unix/Host/Host/OUTPUT/./BerkeleyPacketFilter.obj -I/Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/X64 -I/Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host -I/Users/user/Code/EFI/edk2/Build/Emulator/DEBUG_XCODE32/X64/EmulatorPkg/Unix/Host/Host/DEBUG -I/Users/user/Code/EFI/edk2/MdePkg -I/Users/user/Code/EFI/edk2/MdePkg/Include -I/Users/user/Code/EFI/edk2/MdePkg/Include/X64 -I/Users/user/Code/EFI/edk2/MdeModulePkg -I/Users/user/Code/EFI/edk2/MdeModulePkg/Include -I/Users/user/Code/EFI/edk2/EmulatorPkg -I/Users/user/Code/EFI/edk2/EmulatorPkg/Include /Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c
In file included from /Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c:26:
/Users/user/Code/EFI/edk2/MdeModulePkg/Include/Library/NetLib.h:193:9: error: 'NTOHLL' macro redefined [-Werror]
#define NTOHLL(x)  SwapBytes64 (x)
        ^
/usr/include/sys/_endian.h:145:9: note: previous definition is here
#define NTOHLL(x)       (x) = ntohll((__uint64_t)x)
        ^
In file included from    /Users/user/Code/EFI/edk2/EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c:26:
/Users/user/Code/EFI/edk2/MdeModulePkg/Include/Library/NetLib.h:194:9: error: 'HTONLL' macro redefined [-Werror]
#define HTONLL(x)  NTOHLL(x)
        ^
/usr/include/sys/_endian.h:148:9: note: previous definition is here
#define HTONLL(x)       (x) = htonll((__uint64_t)x)
        ^
2 errors generated.
make: ***    [/Users/user/Code/EFI/edk2/Build/Emulator/DEBUG_XCODE32/X64/EmulatorPkg/Unix/Host/Host/OUTPUT/BerkeleyPacketFilter.obj] Error 1


build.py...
  : error 7000: Failed to execute command
make -f   /Users/user/Code/EFI/edk2/Build/Emulator/DEBUG_XCODE32/X64/EmulatorPkg/Unix/Host/Hos   t/GNUmakefile pbuild [/Users/user/Code/EFI/edk2/Build/Emulator/DEBUG_XCODE32/X64]

- Failed -
Build end time: 13:46:41, Nov.02 2014
Build total time: 00:00:04

      

Do I need to install gcc

? If so, which version? Running Xcode 6.1 and Apple clang 6.0 (based on LLVM 3.5svn)

+3


source to share





All Articles