devopvoid / webrtc-java

WebRTC for desktop platforms running Java
Apache License 2.0
248 stars 60 forks source link

Maven compile error (Windows) #8

Closed meeeee12 closed 3 years ago

meeeee12 commented 3 years ago

How do I get past this:

[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] webrtc-java-parent [pom] [INFO] webrtc-java-jni [pom] [INFO] webrtc-java [jar] [INFO] webrtc-java-demo [pom] [INFO] webrtc-java-demo-api [jar] [INFO] webrtc-java-demo-javafx [jar] [INFO] [INFO] ----------------< dev.onvoid.webrtc:webrtc-java-parent >---------------- [INFO] Building webrtc-java-parent 0.3.0-SNAPSHOT [1/6] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] -----------------< dev.onvoid.webrtc:webrtc-java-jni >------------------ [INFO] Building webrtc-java-jni 0.3.0-SNAPSHOT [2/6] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- cmake-maven-plugin:3.16.3-b2:generate (cmake-generate) @ webrtc-java-jni --- [INFO] Downloading binaries to C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\dependency\cmake [INFO] Configured Artifact: com.googlecode.cmake-maven-project:cmake-binaries:windows-x86_64:3.16.3-b2:jar [INFO] cmake-binaries-3.16.3-b2-windows-x86_64.jar already unpacked. [INFO] Executing C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\dependency\cmake\bin\cmake.exe -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042. -- WebRTC checkout path: C:/Users/User/webrtc -- WebRTC checkout branch: branch-heads/4044 -- WebRTC target CPU: x64 -- WebRTC build type: Release -- WebRTC install path: C:/Users/User/webrtc/build -- WebRTC: fetch Running: 'C:\Users\User.vpython-root\84e578\Scripts\python.exe' 'C:\Users\User\webrtc\depot_tools\gclient.py' root Your current directory appears to already contain, or be part of, a checkout. "fetch" is used only to get new checkouts. Use "gclient sync" to update existing checkouts.

Fetch also does not yet deal with partial checkouts, so if fetch failed, delete the checkout and start over (crbug.com/230691). -- WebRTC: sync WARNING: 'src\third_party\breakpad\breakpad' is no longer part of this client. It is recommended that you manually remove it or use 'gclient sync -D' next time.

WARNING: 'src\third_party\ced\src' is no longer part of this client. It is recommended that you manually remove it or use 'gclient sync -D' next time.

WARNING: 'src\third_party\google_benchmark\src' is no longer part of this client. It is recommended that you manually remove it or use 'gclient sync -D' next time.

WARNING: 'src\third_party\libaom\source\libaom' is no longer part of this client. It is recommended that you manually remove it or use 'gclient sync -D' next time.

WARNING: 'src\third_party\perfetto' is no longer part of this client. It is recommended that you manually remove it or use 'gclient sync -D' next time. ____ running 'vpython.bat src/build/landmines.py --landmine-scripts src/tools_webrtc/get_landmines.py --src-dir src' in 'C:\Users\User\webrtc' ____ running 'vpython.bat src/third_party/depot_tools/update_depot_tools_toggle.py --disable' in 'C:\Users\User\webrtc' ____ running 'vpython.bat src/build/vs_toolchain.py update --force' in 'C:\Users\User\webrtc' ____ running 'vpython.bat src/tools/clang/scripts/update.py' in 'C:\Users\User\webrtc' ____ running 'vpython.bat src/build/util/lastchange.py -o src/build/util/LASTCHANGE' in 'C:\Users\User\webrtc' ____ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-clang-format -s src/buildtools/win/clang-format.exe.sha1' in 'C:\Users\User\webrtc' ____ running 'vpython.bat src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang/rc -s src/build/toolchain/win/rc/win/rc.exe.sha1' in 'C:\Users\User\webrtc' -- WebRTC: checkout "branch-heads/4044" Updated 1 path from the index HEAD is now at 76725a6a63 Merge selective fallback to M81 branch (r30427+r30504) -- WebRTC: generate ERROR at //build/toolchain/win/BUILD.gn:49:3: Script returned non-zero exit code. exec_script("../../vs_toolchain.py", ^---------- Current dir: C:/Users/User/webrtc/src/out/x64/ Command: C:/Users/User/webrtc/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe C:/Users/User/webrtc/src/build/vs_toolchain.py copy_dlls C:/Users/User/webrtc/src/out/x64 Release x64 Returned 1. See //BUILD.gn:29:3: which caused the file to be included. group("default") { ^----------------- Traceback (most recent call last): File "C:/Users/User/webrtc/src/build/vs_toolchain.py", line 561, in sys.exit(main()) File "C:/Users/User/webrtc/src/build/vs_toolchain.py", line 557, in main return commandssys.argv[1] File "C:/Users/User/webrtc/src/build/vs_toolchain.py", line 374, in CopyDlls _CopyDebugger(target_dir, target_cpu) File "C:/Users/User/webrtc/src/build/vs_toolchain.py", line 407, in _CopyDebugger % (debug_file, full_path)) Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll" You must install the "Debugging Tools for Windows" feature from the Windows 10 SDK. -- WebRTC: compile ninja: Entering directory `out/x64' ninja: error: loading 'build.ninja': The system cannot find the file specified. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/User/Desktop/webrtc-java-master/webrtc-jni/target/windows-x86_64 [INFO] [INFO] --- cmake-maven-plugin:3.16.3-b2:compile (cmake-compile) @ webrtc-java-jni --- [INFO] Downloading binaries to C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\dependency\cmake [INFO] Configured Artifact: com.googlecode.cmake-maven-project:cmake-binaries:windows-x86_64:3.16.3-b2:jar [INFO] cmake-binaries-3.16.3-b2-windows-x86_64.jar already unpacked. [INFO] Executing C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\dependency\cmake\bin\cmake.exe Microsoft (R) Build Engine version 16.8.1+bd2ea1e3c for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.

jni-voithos.vcxproj -> C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\windows-x86_64\dependencies\jni-voithos\Release\jni-voithos.lib pseudo.cxx webrtc.vcxproj -> C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\windows-x86_64\dependencies\webrtc\Release\webrtc.lib LINK : fatal error LNK1181: cannot open input file 'C:\Users\User\webrtc\src\out\x64\obj\webrtc.lib' [C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\windows-x86_64\webrtc-java.vcxproj] [WARNING] Command: [C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\dependency\cmake\bin\cmake.exe, --build, C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\windows-x86_64, --target, install, --config, Release] [WARNING] Directory: null [WARNING] Environment: {USERDOMAIN_ROAMINGPROFILE=JONO-PC, PROCESSOR_LEVEL=6, SESSIONNAME=Console, ALLUSERSPROFILE=C:\ProgramData, PROCESSOR_ARCHITECTURE=AMD64, VSCODE_GIT_IPC_HANDLE=\.\pipe\vscode-git-f88eabc80a-sock, jvmConfig=.mvn\jvm.config, PSModulePath=C:\Users\User\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules, SystemDrive=C:, FILE_ARG=c:\Users\User\Desktop\webrtc-java-master\pom.xml, MAVEN_HOME=C:\Program Files\maven\apache-maven-3.6.3\bin.., COLORTERM=truecolor, USERNAME=User, VSCODE_GIT_ASKPASS_NODE=C:\Users\User\AppData\Local\Programs\Microsoft VS Code\Code.exe, TERM_PROGRAM_VERSION=1.51.1, ProgramFiles(x86)=C:\Program Files (x86), GIT_ASKPASS=c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh, WDIR=C:\, CHROME_CRASHPAD_PIPE_NAME=\.\pipe\crashpad_1960_BBMAUYWVKPYCNALC, FPS_BROWSER_USER_PROFILE_STRING=Default, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL, DriverData=C:\Windows\System32\Drivers\DriverData, CLASSWORLDS_JAR="C:\Program Files\maven\apache-maven-3.6.3\bin..\boot\plexus-classworlds-2.6.0.jar", ORIGINAL_XDG_CURRENT_DESKTOP=undefined, ProgramData=C:\ProgramData, ProgramW6432=C:\Program Files, HOMEPATH=\Users\User, PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel, ProgramFiles=C:\Program Files, PUBLIC=C:\Users\Public, windir=C:\Windows, LOCALAPPDATA=C:\Users\User\AppData\Local, USERDOMAIN=JONO-PC, FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer, LOGONSERVER=\JONO-PC, PROMPT=$P$G, LANG=en_US.UTF-8, ERROR_CODE=0, EXEC_DIR=C:\Users\User\Desktop\webrtc-java-master, VSCODE_GIT_ASKPASS_MAIN=c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass-main.js, OneDrive=C:\Users\User\OneDrive, =C:=C:\Users\User\Desktop\webrtc-java-master, APPDATA=C:\Users\User\AppData\Roaming, MAVEN_CMD_LINE_ARGS=compile -f c:\Users\User\Desktop\webrtc-java-master\pom.xml, CommonProgramFiles=C:\Program Files\Common Files, Path=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PuTTY\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\maven\apache-maven-3.6.3\bin;C:\Users\User\AppData\Local\Microsoft\WindowsApps;;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin, OS=Windows_NT, TERM_PROGRAM=vscode, COMPUTERNAME=JONO-PC, JAVACMD=C:\Program Files\Common Files\Oracle\Java\javapath\java.exe, MAVEN_PROJECTBASEDIR=C:\Users\User\Desktop\webrtc-java-master, PROCESSOR_REVISION=5e03, CommonProgramW6432=C:\Program Files\Common Files, ComSpec=C:\Windows\system32\cmd.exe, CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher, SystemRoot=C:\Windows, TEMP=C:\Users\User\AppData\Local\Temp, HOMEDRIVE=C:, USERPROFILE=C:\Users\User, POM_DIR=c:\Users\User\Desktop\webrtc-java-master, TMP=C:\Users\User\AppData\Local\Temp, CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files, NUMBER_OF_PROCESSORS=4} [WARNING] Exit code: 1 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for webrtc-java-parent 0.3.0-SNAPSHOT: [INFO] [INFO] webrtc-java-parent ................................. SUCCESS [ 0.029 s] [INFO] webrtc-java-jni .................................... FAILURE [ 25.749 s] [INFO] webrtc-java ........................................ SKIPPED [INFO] webrtc-java-demo ................................... SKIPPED [INFO] webrtc-java-demo-api ............................... SKIPPED [INFO] webrtc-java-demo-javafx ............................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.049 s [INFO] Finished at: 2020-11-22T10:34:39+11:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.googlecode.cmake-maven-project:cmake-maven-plugin:3.16.3-b2:compile (cmake-compile) on project webrtc-java-jni: Return code: 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :webrtc-java-jni

devopvoid commented 3 years ago

Hi, try to delete the following directories: C:\Users\User.vpython-root and C:\Users\User\webrtc, then try to compile again.

greetings

meeeee12 commented 3 years ago

Hello devopvoid,

I was able to get a bit further by updating Windows SDK to version 10.0.19041.0 (taken from https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md) but now I get a bunch of ninja errors, starting with:

...

-- WebRTC: generate Done. Made 757 targets from 188 files in 7738ms -- WebRTC: compile ninja: Entering directory `out/x64' [1/3027] CXX obj/api/libjingle_peerconnection_api/jsep.obj FAILED: obj/api/libjingle_peerconnection_api/jsep.obj ....\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /nologo /showIncludes "-imsvc............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\ATLMFC\include" "-imsvc............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include" "-imsvc............\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-imsvc............\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-imsvc............\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-imsvc............\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-imsvc............\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-imsvc............\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -DUSE_AURA=1 "-DCR_CLANG_REVISION=\"n332890-c2443155-2\"" -D_HAS_NODISCARD -D_HAS_EXCEPTIONS=0 -DSTD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -D_USING_V110SDK71 -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_RS2 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=1 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DHAVE_SCTP -DWEBRTC_LIBRARY_IMPL -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_WIN -DABSL_ALLOCATOR_NOTHROW=1 -I../.. -Igen -I../../third_party/abseil-cpp -I../../third_party/libyuv/include -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers /Gy /FS /bigobj /utf-8 /Zc:twoPhase /Zc:sizedDealloc- /X -fmsc-version=1916 /guard:cf,nochecks -m64 /Brepro -Wno-builtin-macro-redefined -DDATE= -DTIME= -DTIMESTAMP__= -no-canonical-prefixes /W4 -Wimplicit-fallthrough -Wthread-safety -Wextra-semi /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-bitwise-conditional-parentheses -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi -ftrivial-auto-var-init=pattern /MT -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wc++11-narrowing -Wimplicit-fallthrough -Wthread-safety -Winconsistent-missing-override -Wundef -Wunused-lambda-capture -Wno-shorten-64-to-32 /TP /wd4577 /c ../../api/jsep.cc /Foobj/api/libjingle_peerconnection_api/jsep.obj /Fd"obj/api/libjingle_peerconnection_api_cc.pdb" In file included from ../../api/jsep.cc:11: In file included from ../..\api/jsep.h:25: In file included from ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory:15:In file included from ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory:16: In file included from ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xutility:15: ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\utility(135,9): error: expected member name or ';' after declaration specifiers !conjunction_v<_Is_implicitly_default_constructible<_Uty1>, _Is_implicitly_default_constructible<_Uty2>>) ^ ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\utility(135,9): error: expected ')' ............\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\utility(134,23): note: to match this '(' constexpr explicit( ....

but ultimately fails at the same point as before with :

LINK : fatal error LNK1181: cannot open input file 'C:\Users\User\webrtc\src\out\x64\obj\webrtc.lib' [C:\Users\User\Desktop\webrtc-java-master\webrtc-jni\target\windows-x86_64\webrtc-java.vcxproj]

devopvoid commented 3 years ago

The configuration works, but the very first source file can't be compiled. From your first error report, it notes: 'You must install the "Debugging Tools for Windows" feature from the Windows 10 SDK'. Did you install that feature with your Windows 10 SDK?

but ultimately fails at the same point as before with : LINK : fatal error LNK1181: cannot open input file 'C:\Users\User\webrtc\src\out\x64\obj\webrtc.lib'

Obviously, the library can't be linked because the compilation of WebRTC fails.

meeeee12 commented 3 years ago

Yes I did install the debugging tools with new SDK and I no longer get that exception.

devopvoid commented 3 years ago

Tested it on Windows and it runs through. I'm not sure what is wrong with your setup. As it's an issue with the WebRTC library there is probably more help in the official discussion forums.

Still, I will update the source code soon, maybe it will then work better with your setup.

devopvoid commented 3 years ago

Hi, switched to the latest WebRTC version M88, you could give it a try.