PhotonLibOS icon indicating copy to clipboard operation
PhotonLibOS copied to clipboard

question: Can it be compiled and run on centos7

Open dean-river opened this issue 3 years ago • 7 comments
trafficstars

hello, I am very interested in the project,and want to write a live media server based on photonlibos, but most of our server‘s operating system is centso7,Upgrading the OS all is difficult. Is it possible to compile and run on centos7 by downloading all the dependency librarys

dean-river avatar Oct 14 '22 09:10 dean-river

Of course it's possible.

First I suggest using devtoolset to build photon because of the c++14 support. Personally I tried devtoolset-7 before and it worked.

Then you may find some trivial errors when compiling because the libcurl in centos 7 seems too old. You can comment out the CURLMOPT_MAX_TOTAL_CONNECTIONS in net/curl.cpp temporarily. ( We will submit a patch to solve it later... )

Then I believe nothing else has to be done.

beef9999 avatar Oct 14 '22 09:10 beef9999

BTW I was planning to write a document about how to integrate Photon into users' existing CMake projects. We suggest the way of using CMake fetch_content, or subproject

beef9999 avatar Oct 14 '22 09:10 beef9999

Great! i'm trying devtoolset-8, And update libcurl manually。 but when i built Test (cmake3 .. -D BUILD_TESTING=1), I got this error

image

gmock-devel have installed

image

should i install the latest version off gmock and gtest gflags manually

dean-river avatar Oct 14 '22 10:10 dean-river

Yes, you should probably build gtest and gflags from source code, and install them into your machine.

beef9999 avatar Oct 14 '22 10:10 beef9999

OK, thanks

dean-river avatar Oct 14 '22 10:10 dean-river

Looks like you are one of the members of the SRS community and you were using state-threads?

Would you like you chat a little bit about the cooperation? My email is on the homepage.

beef9999 avatar Oct 14 '22 10:10 beef9999

of course, why not. I am using SRS for many years. And the most advantage of srs is simple, which benefit from using state-thread.

But i am not the main maintainer of srs. if you want to push srs replace state-threads by photon. you'd better talk about it with Winlin. I remember, he said in a live broadcast that he once tried to find a suitable coroutine-based network library to replace state-thread.

Now,as i know about photon and state-thread. The most advantage of photon is multi-thread and can migrate coroutine between multi-thread. this is the pain points of state-thread, which only support sigle-thread. I don't have a deep understanding of photon. Hope this feature will be stable, flexible and unlimited.

dean-river avatar Oct 14 '22 12:10 dean-river

Fixed by https://github.com/alibaba/PhotonLibOS/pull/86

beef9999 avatar Oct 17 '22 10:10 beef9999