Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake fails when WEBRTC_REVISION is set on Windows and Linux #29

Closed
juliao opened this issue Mar 7, 2017 · 11 comments
Closed

Cmake fails when WEBRTC_REVISION is set on Windows and Linux #29

juliao opened this issue Mar 7, 2017 · 11 comments
Assignees
Milestone

Comments

@juliao
Copy link

juliao commented Mar 7, 2017

Hi, I am using the HEAD version and stuck while setting a specific revision.

Using the cmake-gui 3.7.1 and VisualStudio 2015 x64 on Windows 8.1, I got the following messages when set WEBRTC_REVISION to 9660627c9dc3a9e53b66e6baa5417e16b964a744.

   Entering             D:/_Projects/libwebrtc/Targets
CMake Error at CMakeModules/LibWebRTCCommand.cmake:22 (add_dependencies):
  add_dependencies called with incorrect number of arguments
Call Stack (most recent call first):
  Targets/CMakeLists.txt:42 (libwebrtc_command)


   Returning to         D:/_Projects/libwebrtc
Configuring incomplete, errors occurred!

And in Ubuntu 16.04 x64 with cmake 3.5.1, I got the following messages while running this command:

juliao@server:~/tmp/libwebrtc2/build$ cmake -DWEBRTC_REVISION=9660627c9dc3a9e53b66e6baa5417e16b964a744 ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Found DepotTools: /home/juliao/webrtc/depot_tools/gclient
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Looking for __i386__
-- Looking for __i386__ - not found
-- Looking for __x86_64__
-- Looking for __x86_64__ - found
-- Looking for __arm__
-- Looking for __arm__ - not found
-- Looking for __aarch64__
-- Looking for __aarch64__ - not found
-- Looking for __mips__
-- Looking for __mips__ - not found
CMake Error at CMakeModules/LibWebRTCCommand.cmake:22 (add_dependencies):
  add_dependencies called with incorrect number of arguments
Call Stack (most recent call first):
  Targets/CMakeLists.txt:42 (libwebrtc_command)


-- Configuring incomplete, errors occurred!
See also "/home/juliao/tmp/libwebrtc2/build/CMakeFiles/CMakeOutput.log".
See also "/home/juliao/tmp/libwebrtc2/build/CMakeFiles/CMakeError.log".

Edit: Previously I pasted the wrong message from linux, because I was on the wrong commit. I am now on the commit b668195.

Thank you.

@juliao juliao changed the title Cmake fails when WEBRTC_REVISION is set on Windows and have no effect on Linux Cmake fails when WEBRTC_REVISION is set on Windows and Linux Mar 7, 2017
@aisouard
Copy link
Owner

aisouard commented Mar 8, 2017

Hello, thank you for the report.
The issue has been fixed quickly in bc67c8f, I'm testing under Windows right now.

@aisouard aisouard added this to the 0.1.0 milestone Mar 8, 2017
@juliao
Copy link
Author

juliao commented Mar 8, 2017

It is working now, I tested in Linux and Windows, thank you for the quick fix.

Edit: Actually just the cmake pass worked in Windows, I got an error compiling in VisualStudio 2015, see the attached log. The build in Linux works fine.

build_vs2015.txt

Best regards.

@thedracle
Copy link

Any details on the least recent version of WebRTC the build scripts are compatible with?

I'm trying to go back to an early revision:
75c8fb4b2c138b99f6bb7ffa6e2f415594116eed

And it is bombing out on the webrtc-update-clang steps because certain scripts are missing.

@aisouard
Copy link
Owner

aisouard commented Mar 8, 2017

@thedracle I've removed support for older revisions needing to retrieve the whole Chromium repository. See #19 and https://groups.google.com/forum/#!searchin/discuss-webrtc/chromium/discuss-webrtc/xAp2t1EDbDY/Q9-kn6U_DgAJ

I'll take a deeper look tonight and tell if I can add support to retrieve revisions older than December 22nd 2016: https://chromium.googlesource.com/external/webrtc/+/177567c518b121731e507e9b9c4049c4dc96e4c8

It wouldn't be the same as before, since it was just cloning a minimalist version of the Chromium repository, it will simply call sync_chromium.py instead.

@thedracle
Copy link

@aisouard

Awesome, this is an incredibly useful tool, and is saving me an enormous amount of time.

I'm simply having some issues with the master build that weren't occurring in the build hash (Deployed and used in production now), so this is at least a starting point for me to bisect where it started breaking.

Thanks for the details, and for this project.

@aisouard
Copy link
Owner

aisouard commented Mar 9, 2017

Your welcome, I'm glad to see that this project is useful for you :)
#30 has been opened to track the backward compatibility progress.

@aisouard aisouard closed this as completed Mar 9, 2017
@aisouard
Copy link
Owner

aisouard commented Mar 9, 2017

@juliao, just saw your edit!

8>    CMake Error at cmake_install.cmake:38 (file):
8>      file INSTALL cannot find
8>      "D:/_Projects/libwebrtc/build/libwebrtc/Release/webrtc.lib".

Did you try to delete the build folder and regenerate a clean Visual Studio project ?
Cleaning the whole Visual Studio solution should be enough.

@aisouard aisouard reopened this Mar 9, 2017
@juliao
Copy link
Author

juliao commented Mar 9, 2017

Hi, I did a new git clone and submodules init and update, but in that specific commit (9660627c9dc3a9e53b66e6baa5417e16b964a744) this error occurs. I tested with the default config, without setting WEBRTC_REVISION and works, except that I have to hit REBUILD_ALL one time, because an error always occur, this was happening before, just in VisualStudio, I hit the BUILD_ALL and after all code is downloaded, the error occurs, so I hit REBUILD_ALL and the compile time starts and finish without errors. Attached you can see the log of this happening, first the BUILD_ALL and then the REBUILD_ALL.

I realized that I don't need to use this specific commit on Windows, I can use the HEAD of 57 which is working, I will use this commit only on Linux, that is now working after your fix.

Since the default config don't build in the first time, just after a rebuild, maybe there is some problem. I am using the Visual Studio Enterprise 2015 Update 3, let me know if you wish I make some test.

Thank you.

1-default_config-build.txt
2-default_config-rebuild.txt

@aisouard aisouard self-assigned this Mar 11, 2017
@aisouard
Copy link
Owner

I have the same issue, the webrtc-vs-toolchain is failing with the following error:

9>  IOError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64\\cdb.exe'
9>  ERROR at //build/toolchain/win/BUILD.gn:38:3: Script returned non-zero exit code.
9>    exec_script("../../vs_toolchain.py",
9>    ^----------

Happening in Debug mode, with the latest depot_tools.

@aisouard
Copy link
Owner

Things have changed since December 8, 2016: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Visual-Studio

Install the Windows SDK 10, and choose Debugging Tools For Windows when you install this in order to get windbg and cdb. The latter is required for the build to succeed as some tests use it for symbolizing crash dumps.

I'm installing the Windows Driver Kit, then I'll update the README.md file with new instructions for Windows.

@aisouard
Copy link
Owner

Fixed in 80281d8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants