shijunjing / edk2

EDK II
http://www.tianocore.org/edk2/
Other
16 stars 3 forks source link

GnuMake Linker error while building Helloworld application in edk2 in windows using clang38 #2

Open shrishailp opened 2 years ago

shrishailp commented 2 years ago

Hi Shijunjing, I followed the steps mentioned in https://github.com/shijunjing/edk2/tree/2021-gsoc-llvm-gnumake-v2 to make infrastructure. I am trying to build Helloworld application in MSVC 2019 using CLANG38. I have added GnuMake as enviornment path as well. Made changes in ToolsDef.txt from CLANG38_MAKE_PATH = make to CLANG38_MAKE_PATH = gnumake After that able to compile, but during linking getting below errors. Please let me know if i miss anything edk2-working>build -t CLANG38 -a X64 -p MdeModulePkg\MdeModulePkg.dsc -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf --verbose

"GenFw" -o c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.rc -g 6987936E-ED34-44db-AE97-1FA5E4ED2116 --hiibinpackage c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldStrDefs.hpk "objcopy" -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.rc c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.lib Waiting for thread ending...(1) process_begin: CreateProcess(NULL, objcopy -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.rc c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.lib, ...) failed. make (e=2): The system cannot find the file specified. gnumake: *** [GNUmakefile:356: c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld\OUTPUT\HelloWorldhii.lib] Error 2

build.py... : error 7000: Failed to execute command gnumake tbuild [c:\users\i31184\patil\edk2-working\Build\MdeModule\DEBUG_CLANG38\X64\MdeModulePkg\Application\HelloWorld\HelloWorld]

build.py... : error F002: Failed to build module c:\users\i31184\patil\edk2-working\MdeModulePkg\Application\HelloWorld\HelloWorld.inf [X64, CLANG38, DEBUG]

C:\Users\I31184\Patil\edk2-working>

dmiller423 commented 1 year ago

This is a [stupid] joke, the 'cmake support' effectively does nothing whatsoever. All you have to do is look at his cmake file / commit log. It stuffs a few files with minimal header only deps into a static library (which doesn't have to link to anything) and pretends like they've added cmake support. Writing a readme tutorial about it is the real joke, there is more work into the readme than the cmake.