google / gapid

Graphics API Debugger
https://gapid.dev
Apache License 2.0
2.2k stars 327 forks source link

Build Failure on Windows #196

Closed zfk0531 closed 7 years ago

zfk0531 commented 7 years ago

I try to build GAPID on windows 10, but got build error like this:

[60/358] Linking Go executable test\test-core-os-device.exe FAILED: test/test-core-os-device.exe cmd.exe /C "cd . && "C:/Program Files/CMake/bin/cmake.exe" -DGO_ENV=C:/Users/zfk/gapid/release/go/goenv.cmake -DBUILDBOT=OFF -DGO_BUILD=test\test-core-os-device.exe -static -DGO_PACKAGE=github.com/google/gapid/core/os/device -P D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoCompile.cmake && cmd.exe /C "cd /D D:\GoProjects\src\github.com\google\gapid\core\os\device && "C:\Program Files\CMake\bin\cmake.exe" -DTESTER=C:/Users/zfk/gapid/release/test/test-core-os-device.exe -DGO_PATH="D:/GoProjects/src/github.com/google/gapid/third_party;D:/GoProjects" -P D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoTest.cmake"" RAN: C:/Users/zfk/gapid/release/test/test-core-os-device.exe GOT: --- FAIL: TestHost (0.34s) testing.go:37: 04:11:43.823 E: Error:Host.Name Got Expect != FAIL

CMake Error at D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoTest.cmake:25 (message): RESULT: 1

ben-clayton commented 7 years ago

It's likely that a GL context couldn't be created. I've added additional error logging which should describe exactly where this is failing. Please can you pull latest and post the error message raised?

zfk0531 commented 7 years ago

I have pulled the latest version, but I still get the following error message:

-- Generating done -- Build files have been written to: C:/Users/zfk/gapid/release [474/920] Linking Go executable test\test-core-os-device.exe FAILED: test/test-core-os-device.exe cmd.exe /C "cd . && "C:/Program Files/CMake/bin/cmake.exe" -DGO_ENV=C:/Users/zfk/gapid/release/go/goenv.cmake -DBUILDBOT=OFF -DGO_BUILD=test\test-core-os-device.exe -static -DGO_PACKAGE=github.com/google/gapid/core/os/device -P D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoCompile.cmake && cmd.exe /C "cd /D D:\GoProjects\src\github.com\google\gapid\core\os\device && "C:\Program Files\CMake\bin\cmake.exe" -DTESTER=C:/Users/zfk/gapid/release/test/test-core-os-device.exe -DGO_PATH="D:/GoProjects/src/github.com/google/gapid/third_party;D:/GoProjects" -P D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoTest.cmake"" RAN: C:/Users/zfk/gapid/release/test/test-core-os-device.exe GOT: --- FAIL: TestHost (0.32s) testing.go:37: 05:11:31.261 E: Error:Host.Name Got Expect != FAIL

CMake Error at D:/GoProjects/src/github.com/google/gapid/cmake/Modules/GoTest.cmake:25 (message): RESULT: 1

And finally I got: -- LLVMHello ignored -- Loadable modules not supported on this platform. -- Targeting AArch64 -- Targeting AMDGPU -- Targeting ARM -- Targeting BPF -- Targeting Hexagon -- Targeting Lanai -- Targeting Mips -- Targeting MSP430 -- Targeting NVPTX -- Targeting PowerPC -- Targeting RISCV -- Targeting Sparc -- Targeting SystemZ -- Targeting X86 -- Targeting XCore -- BugpointPasses ignored -- Loadable modules not supported on this platform. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/zfk/gapid/release/llvm/src/llvm-build ninja: build stopped: subcommand failed. Error running D:\Downloads\ninja-win\ninja.exe [install]: Process returned error Cause: exit status 1 exit status 1

There is no more error messages. I have pulled the code again and found the addtional logging code in my test code:

"snprintf(gContext.mError, sizeof(gContext.mError), \ "EGL error: 0x%x when executing:\n " #x, error); \"

So I am sure my test version is a new copy. Is there anything wrong with my building operation? I just follow the BUILDING.md guide to setup the environment and run commands in console:(