sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 347 forks source link

macOS 10.12.6 installation problem #211

Closed zacaikido closed 6 years ago

zacaikido commented 6 years ago

Hi, I can't manage to build libsourcey with WebRTC on macOs 10.12.6.

I tried to build WebRTC as said in the install guide but unsuccessfully. So I thought it could work with the precompiled-build from https://github.com/iBicha/webrtc-precompiled-builds/releases/tag/r21522.

I saw on other posts that we had to specify in argument the webrtc filepath so I did cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DWITH_FFMPEG=ON -DWITH_WEBRTC=ON -DWEBRTC_ROOT_DIR=/path/to/webrtcbuilds/

But all I get is

-- Could NOT find WEBRTC (missing: WEBRTC_LIBRARIES WEBRTC_INCLUDE_DIR) CMake Error at cmake/LibSourceyIncludes.cmake:72 (message): Failed to include dependency: WebRTC. Please build and install dependencies before using CMake. Call Stack (most recent call first): LibSourcey.cmake:262 (find_dependency) CMakeLists.txt:39 (include)

Then I tried to =OFF extralibrairies one by one and get finally the same problem with openssl althought brew confirm me that it is installed. It seems to be a libraries path problem but I'm kind of stuck on where to search solutions.

zacaikido commented 6 years ago

OK, for others in the same case, I managed to succesfully pass the cmake step by specifying the path for the debug & release webrtc libs and dirty-conforming ^^ this path to the windows one ( adding one extra "x64" file between lib folder and Debug folder & Release folder).

Now I can't compile succesfully in Xcode, because of a bunch of AVMediaType problems in the av library. Seems to be a conflict between ffmpeg and avfoundation. Tried to uncheck ffmpeg library in cmake gui but it don't seems to affect the generated file.

cbritopacheco commented 6 years ago

I think you contacted me by email. Please try to configure your build like this:

export CXX=clang++
export CC=clang

git clone https://github.com/sourcey/libsourcey
cd libsourcey
mkdir build
cd build
cmake .. -DWITH_WEBRTC=OFF
make -j4

And check which compiler you are using. You'll get conflicts if you don't use AppleClang. Please respond with the output of:

clang -v
zacaikido commented 6 years ago

Currently I tried to specify clang & clang ++, when I launch cmake I fall on

The C compiler identification is unknown
The CXX compiler identification is unknown
Check for working C compiler: /usr/bin/clang
Check for working C compiler: /usr/bin/clang -- broken
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/usr/bin/clang" is not able to compile a simple test
  program.

Althought I can see the clang & clang ++ files in /usr/bin folder that cmake GUI show me as compilers. Investigation continue

output of clang -v :

clang -v
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
cbritopacheco commented 6 years ago

You probably need to install command line tools and then accept the xcode license. Then configure the build like I showed in my previous message.

If that doesn't work, you may attempt to do the following:

export CXX=/Library/Developer/CommandLineTools/usr/bin/clang++
export CC=/Library/Developer/CommandLineTools/usr/bin/clang