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.32k stars 350 forks source link

MacOS 10.12 compile error #168

Closed qulyf closed 7 years ago

qulyf commented 7 years ago

Hi there, I'm trying to build libsourcy on MacOS 10.12 with WEBRTC ON, after changing the FindWebRTC.cmake, Makefile generated successful. Clang genenarated Unsupported platform error, BTW, I used the webrtcbuilds to compile webrtc. Added some #define WEBRTC_POSIX WEBRTC_MAC, error gone. Then comes the following

In file included from /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:12: In file included from /Users/qulyf/Github/libsourcey/src/webrtc/include/scy/webrtc/streamrecorder.h:21: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/multiplexencoder.h:20: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/audioencoder.h:21: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/audiocontext.h:23: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/fpscounter.h:16: In file included from /Users/qulyf/Github/libsourcey/src/base/include/scy/packetstream.h:19: In file included from /Users/qulyf/Github/libsourcey/src/base/include/scy/memory.h:18: /Users/qulyf/Github/libsourcey/src/base/include/scy/timer.h:52:10: warning: 'start' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void start(std::function<void()> func); ^ /Users/qulyf/Github/libsourcey/src/base/include/scy/runner.h:44:18: note: overridden virtual function is here virtual void start(std::function<void()> target) = 0; ^ In file included from /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:12: In file included from /Users/qulyf/Github/libsourcey/src/webrtc/include/scy/webrtc/streamrecorder.h:21: /Users/qulyf/Github/libsourcey/src/av/include/scy/av/multiplexencoder.h:81:21: warning: 'options' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] EncoderOptions& options(); ^ /Users/qulyf/Github/libsourcey/src/av/include/scy/av/iencoder.h:94:29: note: overridden virtual function is here virtual EncoderOptions& options() = 0; ^ /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:92:67: error: no member named 'DataY' in 'webrtc::VideoFrameBuffer' frame->data[0] = (uint8_t*)yuvframe.video_frame_buffer()->DataY();


/Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:93:67: error: no member named
      'DataU' in 'webrtc::VideoFrameBuffer'
        frame->data[1] = (uint8_t*)yuvframe.video_frame_buffer()->DataU();
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
/Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:94:67: error: no member named
      'DataV' in 'webrtc::VideoFrameBuffer'
        frame->data[2] = (uint8_t*)yuvframe.video_frame_buffer()->DataV();
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
5 warnings and 3 errors generated.
make[2]: *** [webrtc/CMakeFiles/webrtc.dir/src/streamrecorder.cpp.o] Error 1
make[1]: *** [webrtc/CMakeFiles/webrtc.dir/all] Error 2
make: *** [all] Error 2

Stucked. 
Any help would be much appreciated. Thanks
--
auscaster commented 7 years ago

Hello, it looks like WebRTC have updated their APIs yet again!

For now stick to the stable branch-heads/59 branch and you should be fine, otherwise you're welcome to have a look at updating the code.

On 20 July 2017 at 09:03, Qulyf notifications@github.com wrote:

Hi there, I'm trying to build libsourcy on MacOS 10.12 with WEBRTC ON, after changing the FindWebRTC.cmake, Makefile generated successful. Clang genenarated Unsupported platform error, BTW, I used the webrtcbuilds to compile webrtc. Added some #define WEBRTC_POSIX WEBRTC_MAC, error gone. Then comes the following

In file included from /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:12: In file included from /Users/qulyf/Github/libsourcey/src/webrtc/include/ scy/webrtc/streamrecorder.h:21: In file included from /Users/qulyf/Github/ libsourcey/src/av/include/scy/av/multiplexencoder.h:20: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/audioencoder.h:21: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/audiocontext.h:23: In file included from /Users/qulyf/Github/libsourcey/src/av/include/scy/av/fpscounter.h:16: In file included from /Users/qulyf/Github/libsourcey/src/base/include/scy/packetstream.h:19: In file included from /Users/qulyf/Github/libsourcey/src/base/include/scy/memory.h:18: /Users/qulyf/Github/libsourcey/src/base/include/scy/timer.h:52:10: warning: 'start' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void start(std::function<void()> func); ^ /Users/qulyf/Github/libsourcey/src/base/include/scy/runner.h:44:18: note: overridden virtual function is here virtual void start(std::function<void()> target) = 0; ^ In file included from /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:12: In file included from /Users/qulyf/Github/libsourcey/src/webrtc/include/ scy/webrtc/streamrecorder.h:21: /Users/qulyf/Github/ libsourcey/src/av/include/scy/av/multiplexencoder.h:81:21: warning: 'options' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] EncoderOptions& options(); ^ /Users/qulyf/Github/libsourcey/src/av/include/scy/av/iencoder.h:94:29: note: overridden virtual function is here virtual EncoderOptions& options() = 0; ^ /Users/qulyf/Github/libsourcey/src/webrtc/src/streamrecorder.cpp:92:67: error: no member named 'DataY' in 'webrtc::VideoFrameBuffer' frame->data[0] = (uint8_t*)yuvframe.video_frame_buffer()->DataY();


libsourcey/src/webrtc/src/streamrecorder.cpp:93:67: error: no member
named 'DataU' in 'webrtc::VideoFrameBuffer' frame->data[1] =
(uint8_t*)yuvframe.video_frame_buffer()->DataU();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/qulyf/Github/
libsourcey/src/webrtc/src/streamrecorder.cpp:94:67: error: no member
named 'DataV' in 'webrtc::VideoFrameBuffer' frame->data[2] =
(uint8_t*)yuvframe.video_frame_buffer()->DataV();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 5 warnings and 3 errors generated. make[2]:
*** [webrtc/CMakeFiles/webrtc.dir/src/streamrecorder.cpp.o] Error 1
make[1]: *** [webrtc/CMakeFiles/webrtc.dir/all] Error 2 make: *** [all]
Error 2
Stucked.
Any help would be much appreciated. Thanks

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/sourcey/libsourcey/issues/168>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGKDByr1hPLvhDa1zTRnoDu0dw0Hwyuks5sPvvSgaJpZM4Odru3>
.
qulyf commented 7 years ago

Thank you very much for your response~ so When I run the script from webrtcbuilds, could't get the revision, like

➜ webrtc-builds git:(master) ./build.sh -c x64 -b branch-heads/59 Host OS: mac Target OS: mac Target CPU: x64 Checking build environment dependencies /usr/local/bin/gcp Checking depot-tools head: illegal option -- - usage: head [-n lines | -c bytes] [file ...] cut: illegal option -- - usage: cut -b list [-n] [file ...] cut -c list [file ...] cut -f list [-s] [-d delim] [file ...] Cound not get branch revision

Maybe a SHA revision can do, still not find yet... or Did I do something wrong? Thanks again~

qulyf commented 7 years ago

branch-head/59 no compile error. Thanks~ But I don't understand the following linker error Which described in anthor issue.

auscaster commented 7 years ago

I don't currently have a mac to test this on, sorry!

I'm building on ubuntu linux and it compiles just fine. The head: illegal option -- - lines may be a key? Are you able to debug the script?

On 23 July 2017 at 14:46, Qulyf notifications@github.com wrote:

branch-head/59 no compile error. Thanks~ But I don't understand the following linker error Which described in anthor issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/168#issuecomment-317250590, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDDtzI4IYvYi4L9-WjG7JHW3A-q_jks5sQ0CegaJpZM4Odru3 .

qulyf commented 7 years ago

I just can't find where the problem is yet (Not familiar with shell...). Now I'm trying on Ubuntu. So the webrtc-builds/build.sh seems don't reads multi args. I run the command like this

./build.sh -e -l jsoncpp -r eeab9ccb2417cab18ae1681c6644c25fa4eadcd3

the -r content will be ignored.

the SHA comes from https://chromium.googlesource.com/external/webrtc/+/branch-heads/59 Is this command right?

auscaster commented 7 years ago

That command doesn't look quite right, it should be: ./build.sh -c x64 -b branch-heads/59

Also there is a prebuilt library here if it helps: https://github.com/sourcey/webrtc-precompiled-builds/raw/master/webrtc-17657-02ba69d-linux-x64.tar.gz

Taken from here: https://sourcey.com/precompiled-webrtc-libraries/#usage

On 26 July 2017 at 08:37, Qulyf notifications@github.com wrote:

I just can't find where the problem is yet (Not familiar with shell...). Now I'm trying on Ubuntu. So the webrtc-builds/build.sh seems don't reads multi args. I run the command like this

./build.sh -e -l jsoncpp -r eeab9ccb2417cab18ae1681c6644c25fa4eadcd3

the SHA comes from https://chromium.googlesource. com/external/webrtc/+/branch-heads/59 http://url Is this command right?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/168#issuecomment-317962274, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDGzqPvjzc0z9m8FQ817t3JA0OaMsks5sRt6dgaJpZM4Odru3 .

qulyf commented 7 years ago

It finally works~ Thank you @auscaster .Seems to work with this lib for a long time. Hope to make some contribute.

auscaster commented 7 years ago

Thats great!

If you could fix the apple issues that would be a great contribution, but only if you are able :)

Thanks very much, every contribution is welcome!

On 27 July 2017 at 06:40, Qulyf notifications@github.com wrote:

It finally works~ Thank you @auscaster https://github.com/auscaster .Seems to work with this lib for a long time. Hope to make some contribute.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sourcey/libsourcey/issues/168#issuecomment-318256714, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGKDI9cbZVtbFmBKQWrN5TPN06OCfnRks5sSBTRgaJpZM4Odru3 .