Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

compile error on cento7.2 #594

Closed worker24h closed 3 years ago

worker24h commented 3 years ago

Prerequisites

These are MANDATORY, otherwise the issue will be automatically closed.

Issue description

I'm building kms-core:6.16.0 on centos7.2, but it's occurs a problem.

[ 78%] Building CXX object src/server/CMakeFiles/kmscoreimpl.dir/implementation/EventHandler.cpp.o In file included from /root/kurento/kms-core/src/server/implementation/EventHandler.cpp:19:0: /root/kurento/kms-core/src/server/implementation/WorkerPool.hpp:42:3: error: expected constructor, destructor, or type conversion before ‘post’ post (BOOST_ASIO_MOVE_ARG (CompletionHandler) handler) ^ /root/kurento/kms-core/src/server/implementation/EventHandler.cpp: In function ‘void kurento::post_task(std::function<void()>)’: /root/kurento/kms-core/src/server/implementation/EventHandler.cpp:30:11: error: ‘class kurento::WorkerPool’ has no member named ‘post’ workers.post (cb); ^ make[2]: [src/server/CMakeFiles/kmscoreimpl.dir/implementation/EventHandler.cpp.o] Error 1 make[1]: [src/server/CMakeFiles/kmscoreimpl.dir/all] Error 2 make: *** [all] Error 2 [root@63d5c0084f5b build]#

Context

How to reproduce?

Expected & current behavior

(Optional) Possible solution

Info about your environment

About Kurento Media Server

About your Application Server

About end-user clients

Run these commands

cat /etc/lsb-release
kurento-media-server --version
dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'
worker24h commented 3 years ago

Please help me, thanks

github-actions[bot] commented 3 years ago

Hello @worker24h! :wave: we're sorry you found a bug... so first of all, thank you very much for reporting it.

To know about progress, check in Triage. All issues are considered Backlog Candidates until work priorities align and the issue is selected for development. It will then become part of our official Backlog.

j1elo commented 3 years ago

Try adding #include <boost/asio/async_result.hpp> as the first include in kms-core/src/server/implementation/WorkerPool.hpp

It should look like this:

#include <boost/asio/async_result.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/thread/thread.hpp>

Does this solve the compilation error at this file?

worker24h commented 3 years ago

Try adding #include <boost/asio/async_result.hpp> as the first include in kms-core/src/server/implementation/WorkerPool.hpp

It should look like this:

#include <boost/asio/async_result.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/thread/thread.hpp>

Does this solve the compilation error at this file?

Upgrade boost version to 1.65.0.

I solve it.

j1elo commented 3 years ago

Upgrade boost version to 1.65.0.

I solve it.

Nice! Kurento compiles fine on Ubuntu 16.04 with Boost 1.58.0. But 1.65 works fine, too.