GithubHelp home page GithubHelp logo

Comments (11)

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

Hi Mohamed,
First of all, I appreciate you find interesting enough the code to take the time to download it and test it, too bad it didn't compile on your system. Now, I haven't tried it on ( I presume you have ) a Linux instance, the project works fine on Mac OS X Sierra, but is a heads up to me because I need to fix the CMakeLists.txt file for Linux, I'll work in it this weekend and get back to you as soon as I can.

In the mean time can you try using gcc 4.9 instead o 5.4?

Best Regards,
Iván.

from micro-service.

requinham avatar requinham commented on July 24, 2024

Hi Ivan,

It's for me to salute your effort helping us to start quickly to build micro-service rest with our preferred language C++...

I have also tried configuring flags like cpprestsdk but nothing change...

For gcc 4.9, same result :
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/gcc-4.9
-- Check for working C compiler: /usr/bin/gcc-4.9 -- 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/g++-4.9
-- Check for working CXX compiler: /usr/bin/g++-4.9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- random
-- chrono
-- system
-- thread
-- log
-- program_options
-- regex
-- filesystem
-- date_time
-- atomic
-- log_setup
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.0.2g", minimum required is "1.0.0")
-- configuring gcc options
MICROSERVICE ./source/foundation/include
BOOST_LIBS /usr/lib/x86_64-linux-gnu/libboost_random.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_log.so;/usr/lib/x86_64-linux-gnu/libboost_program_options.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_log_setup.so;/usr/lib/x86_64-linux-gnu/libpthread.so
OPENSSL_LIBS /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
CPPRESTSDK_LIBRARY /home/med/micro-service/libs/cpprestsdk/build.release/Binaries/libcpprest.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/med/micro-service/build

==> start make
[ 20%] Building CXX object CMakeFiles/micro-service.dir/source/main.cpp.o
[ 40%] Building CXX object CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o
[ 60%] Building CXX object CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o
[ 80%] Building CXX object CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o
[100%] Linking CXX executable micro-service
CMakeFiles/micro-service.dir/source/main.cpp.o: In function __static_initialization_and_destruction_0(int, int)': main.cpp:(.text+0x4b9): undefined reference to boost::system::generic_category()'
main.cpp:(.text+0x4c5): undefined reference to boost::system::generic_category()' main.cpp:(.text+0x4d1): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/main.cpp.o: In function pplx::details::_TaskCollectionImpl::_RunTask(void (*)(void*), void*, pplx::details::_TaskInliningMode)': main.cpp:(.text._ZN4pplx7details19_TaskCollectionImpl8_RunTaskEPFvPvES2_NS0_17_TaskInliningModeE[_ZN4pplx7details19_TaskCollectionImpl8_RunTaskEPFvPvES2_NS0_17_TaskInliningModeE]+0x40): undefined reference to pplx::get_ambient_scheduler()'
CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::error::get_system_category()': main.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[_ZN5boost4asio5error19get_system_categoryEv]+0x5): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::ssl::detail::openssl_init_base::do_init::do_init()': main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x2c): undefined reference to SSL_library_init'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x31): undefined reference to SSL_load_error_strings' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x36): undefined reference to OPENSSL_add_all_algorithms_noconf'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0x3b): undefined reference to CRYPTO_num_locks' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0xb0): undefined reference to CRYPTO_set_locking_callback'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initC2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initC5Ev]+0xba): undefined reference to CRYPTO_set_id_callback' CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x12): undefined reference to CRYPTO_set_id_callback' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x1c): undefined reference to CRYPTO_set_locking_callback'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x21): undefined reference to ERR_free_strings' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x2b): undefined reference to ERR_remove_thread_state'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x30): undefined reference to EVP_cleanup' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x35): undefined reference to CRYPTO_cleanup_all_ex_data'
main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x3f): undefined reference to CONF_modules_unload' main.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD5Ev]+0x44): undefined reference to ENGINE_cleanup'
CMakeFiles/micro-service.dir/source/main.cpp.o: In function boost::asio::error::detail::ssl_category::message(int) const': main.cpp:(.text._ZNK5boost4asio5error6detail12ssl_category7messageEi[_ZNK5boost4asio5error6detail12ssl_category7messageEi]+0x2c): undefined reference to ERR_reason_error_string'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::initRestOpHandlers()': microsvc_controller.cpp:(.text+0x29d): undefined reference to web::http::methods::GET'
microsvc_controller.cpp:(.text+0x32d): undefined reference to web::http::methods::PUT' microsvc_controller.cpp:(.text+0x3bd): undefined reference to web::http::methods::POST'
microsvc_controller.cpp:(.text+0x442): undefined reference to web::http::methods::DEL' microsvc_controller.cpp:(.text+0x4c7): undefined reference to web::http::methods::PATCH'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleGet(web::http::http_request)': microsvc_controller.cpp:(.text+0x652): undefined reference to web::json::value::object(bool)'
microsvc_controller.cpp:(.text+0x68f): undefined reference to web::json::value::string(std::string)' microsvc_controller.cpp:(.text+0x6c9): undefined reference to web::json::value::operator[](std::string const&)'
microsvc_controller.cpp:(.text+0x6de): undefined reference to web::json::value::operator=(web::json::value&&)' microsvc_controller.cpp:(.text+0x757): undefined reference to web::json::value::string(std::string)'
microsvc_controller.cpp:(.text+0x791): undefined reference to web::json::value::operator[](std::string const&)' microsvc_controller.cpp:(.text+0x7a3): undefined reference to web::json::value::operator=(web::json::value&&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePatch(web::http::http_request)': microsvc_controller.cpp:(.text+0x97f): undefined reference to web::http::methods::PATCH'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePut(web::http::http_request)': microsvc_controller.cpp:(.text+0xa25): undefined reference to web::http::methods::PUT'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handlePost(web::http::http_request)': microsvc_controller.cpp:(.text+0xacb): undefined reference to web::http::methods::POST'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleDelete(web::http::http_request)': microsvc_controller.cpp:(.text+0xb71): undefined reference to web::http::methods::DEL'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleHead(web::http::http_request)': microsvc_controller.cpp:(.text+0xc17): undefined reference to web::http::methods::HEAD'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleOptions(web::http::http_request)': microsvc_controller.cpp:(.text+0xcbd): undefined reference to web::http::methods::OPTIONS'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleTrace(web::http::http_request)': microsvc_controller.cpp:(.text+0xd63): undefined reference to web::http::methods::TRCE'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleConnect(web::http::http_request)': microsvc_controller.cpp:(.text+0xe09): undefined reference to web::http::methods::CONNECT'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::handleMerge(web::http::http_request)': microsvc_controller.cpp:(.text+0xeaf): undefined reference to web::http::methods::MERGE'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function MicroserviceController::responseNotImpl(std::string const&)': microsvc_controller.cpp:(.text+0xf5d): undefined reference to web::json::value::object(bool)'
microsvc_controller.cpp:(.text+0xf91): undefined reference to web::json::value::string(std::string)' microsvc_controller.cpp:(.text+0xfc5): undefined reference to web::json::value::operator[](std::string const&)'
microsvc_controller.cpp:(.text+0xfd7): undefined reference to web::json::value::operator=(web::json::value&&)' microsvc_controller.cpp:(.text+0x1039): undefined reference to web::json::value::string(std::string)'
microsvc_controller.cpp:(.text+0x106d): undefined reference to web::json::value::operator[](std::string const&)' microsvc_controller.cpp:(.text+0x107f): undefined reference to web::json::value::operator=(web::json::value&&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function __static_initialization_and_destruction_0(int, int)': microsvc_controller.cpp:(.text+0x11d8): undefined reference to boost::system::generic_category()'
microsvc_controller.cpp:(.text+0x11e4): undefined reference to boost::system::generic_category()' microsvc_controller.cpp:(.text+0x11f0): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_CancellationTokenRegistration::_Invoke()': microsvc_controller.cpp:(.text._ZN4pplx7details30_CancellationTokenRegistration7_InvokeEv[_ZN4pplx7details30_CancellationTokenRegistration7_InvokeEv]+0xd): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::details::_CancellationTokenState::_DeregisterCallback(pplx::details::_CancellationTokenRegistration*)': microsvc_controller.cpp:(.text._ZN4pplx7details23_CancellationTokenState19_DeregisterCallbackEPNS0_30_CancellationTokenRegistrationE[_ZN4pplx7details23_CancellationTokenState19_DeregisterCallbackEPNS0_30_CancellationTokenRegistrationE]+0x14b): undefined reference to pplx::details::platform::GetCurrentThreadId()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function pplx::task_options::task_options()': microsvc_controller.cpp:(.text._ZN4pplx12task_optionsC2Ev[_ZN4pplx12task_optionsC5Ev]+0x23): undefined reference to pplx::get_ambient_scheduler()'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::details::http_msg_base::~http_msg_base()': microsvc_controller.cpp:(.text._ZN3web4http7details13http_msg_baseD2Ev[_ZN3web4http7details13http_msg_baseD5Ev]+0x13): undefined reference to vtable for web::http::details::http_msg_base'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::details::_http_response::_http_response(unsigned short)': microsvc_controller.cpp:(.text._ZN3web4http7details14_http_responseC2Et[_ZN3web4http7details14_http_responseC5Et]+0x1b): undefined reference to web::http::details::http_msg_base::http_msg_base()'
microsvc_controller.cpp:(.text._ZN3web4http7details14_http_responseC2Et[_ZN3web4http7details14_http_responseC5Et]+0x26): undefined reference to vtable for web::http::details::_http_response' CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::http_response::set_body(web::json::value const&)':
microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKNS_4json5valueE[_ZN3web4http13http_response8set_bodyERKNS_4json5valueE]+0x2f): undefined reference to web::json::value::serialize() const' microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKNS_4json5valueE[_ZN3web4http13http_response8set_bodyERKNS_4json5valueE]+0x42): undefined reference to utility::conversions::to_utf8string(std::string)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::http_response::set_body(Concurrency::streams::basic_istream<unsigned char> const&, unsigned long, std::string const&)': microsvc_controller.cpp:(.text._ZN3web4http13http_response8set_bodyERKN11Concurrency7streams13basic_istreamIhEEmRKSs[_ZN3web4http13http_response8set_bodyERKN11Concurrency7streams13basic_istreamIhEEmRKSs]+0x37): undefined reference to web::http::details::http_msg_base::set_body(Concurrency::streams::basic_istream const&, unsigned long, std::string const&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::http_request::reply(web::http::http_response const&) const': microsvc_controller.cpp:(.text._ZNK3web4http12http_request5replyERKNS0_13http_responseE[_ZNK3web4http12http_request5replyERKNS0_13http_responseE]+0x32): undefined reference to web::http::details::_http_request::reply(web::http::http_response const&)'
CMakeFiles/micro-service.dir/source/microsvc_controller.cpp.o: In function web::http::details::_http_response::~_http_response()': microsvc_controller.cpp:(.text._ZN3web4http7details14_http_responseD2Ev[_ZN3web4http7details14_http_responseD5Ev]+0x13): undefined reference to vtable for web::http::details::_http_response'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function __static_initialization_and_destruction_0(int, int)': network_utils.cpp:(.text+0x4ee): undefined reference to boost::system::generic_category()'
network_utils.cpp:(.text+0x4fa): undefined reference to boost::system::generic_category()' network_utils.cpp:(.text+0x506): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::system::error_code::error_code()': network_utils.cpp:(.text._ZN5boost6system10error_codeC2Ev[_ZN5boost6system10error_codeC5Ev]+0x17): undefined reference to boost::system::system_category()'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::detail::posix_thread::~posix_thread()': network_utils.cpp:(.text._ZN5boost4asio6detail12posix_threadD2Ev[_ZN5boost4asio6detail12posix_threadD5Ev]+0x26): undefined reference to pthread_detach'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::detail::posix_thread::join()': network_utils.cpp:(.text._ZN5boost4asio6detail12posix_thread4joinEv[_ZN5boost4asio6detail12posix_thread4joinEv]+0x2b): undefined reference to pthread_join'
CMakeFiles/micro-service.dir/source/foundation/network_utils.cpp.o: In function boost::asio::detail::posix_thread::start_thread(boost::asio::detail::posix_thread::func_base*)': network_utils.cpp:(.text._ZN5boost4asio6detail12posix_thread12start_threadEPNS2_9func_baseE[_ZN5boost4asio6detail12posix_thread12start_threadEPNS2_9func_baseE]+0x38): undefined reference to pthread_create'
CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::~BasicController()': basic_controller.cpp:(.text+0x255): undefined reference to web::http::experimental::listener::http_listener::~http_listener()'
CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::setEndpoint(std::string const&)': basic_controller.cpp:(.text+0x29a): undefined reference to web::uri::uri(std::string const&)'
basic_controller.cpp:(.text+0x3e8): undefined reference to web::uri_builder::to_uri()' basic_controller.cpp:(.text+0x42a): undefined reference to web::http::experimental::listener::http_listener::~http_listener()'
CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function cfx::BasicController::requestPath(web::http::http_request const&)': basic_controller.cpp:(.text+0x5e2): undefined reference to web::uri::decode(std::string const&)'
basic_controller.cpp:(.text+0x601): undefined reference to web::uri::split_path(std::string const&)' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function __static_initialization_and_destruction_0(int, int)':
basic_controller.cpp:(.text+0x6bd): undefined reference to boost::system::generic_category()' basic_controller.cpp:(.text+0x6c9): undefined reference to boost::system::generic_category()'
basic_controller.cpp:(.text+0x6d5): undefined reference to boost::system::system_category()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function web::uri_builder::set_host(std::string const&, bool)':
basic_controller.cpp:(.text._ZN3web11uri_builder8set_hostERKSsb[_ZN3web11uri_builder8set_hostERKSsb]+0x3f): undefined reference to web::uri::encode_uri(std::string const&, web::uri::components::component)' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function web::uri_builder::set_path(std::string const&, bool)':
basic_controller.cpp:(.text._ZN3web11uri_builder8set_pathERKSsb[_ZN3web11uri_builder8set_pathERKSsb]+0x3f): undefined reference to web::uri::encode_uri(std::string const&, web::uri::components::component)' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function web::http::http_request::relative_uri() const':
basic_controller.cpp:(.text._ZNK3web4http12http_request12relative_uriEv[_ZNK3web4http12http_request12relative_uriEv]+0x2a): undefined reference to web::http::details::_http_request::relative_uri() const' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function web::http::experimental::listener::http_listener::open()':
basic_controller.cpp:(.text._ZN3web4http12experimental8listener13http_listener4openEv[_ZN3web4http12experimental8listener13http_listener4openEv]+0x2a): undefined reference to web::http::experimental::listener::details::http_listener_impl::open()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function web::http::experimental::listener::http_listener::close()':
basic_controller.cpp:(.text._ZN3web4http12experimental8listener13http_listener5closeEv[_ZN3web4http12experimental8listener13http_listener5closeEv]+0x2a): undefined reference to web::http::experimental::listener::details::http_listener_impl::close()' CMakeFiles/micro-service.dir/source/foundation/basic_controller.cpp.o: In function std::unique_ptr<web::http::experimental::listener::details::http_listener_impl, std::default_deleteweb::http::experimental::listener::details::http_listener_impl > utility::details::make_unique<web::http::experimental::listener::details::http_listener_impl, web::uri>(web::uri&&)':
basic_controller.cpp:(.text.ZN7utility7details11make_uniqueIN3web4http12experimental8listener7details18http_listener_implENS2_3uriEEESt10unique_ptrIT_St14default_deleteISA_EEOT0[ZN7utility7details11make_uniqueIN3web4http12experimental8listener7details18http_listener_implENS2_3uriEEESt10unique_ptrIT_St14default_deleteISA_EEOT0]+0x58): undefined reference to `web::http::experimental::listener::details::http_listener_impl::http_listener_impl(web::uri)'
collect2: error: ld returned 1 exit status
CMakeFiles/micro-service.dir/build.make:172: recipe for target 'micro-service' failed
make[2]: *** [micro-service] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/micro-service.dir/all' failed
make[1]: *** [CMakeFiles/micro-service.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

from micro-service.

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

By the way have you installed openssl library?

apt-get install

from micro-service.

requinham avatar requinham commented on July 24, 2024

Yes, you can see this in trace :
Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.0.2g", minimum required is "1.0.0")
OpenSSL is well installed and also I successfully compiled the static cpprestsdk lib before start building your example.
I guess it can be a problem of ABI but I don't see anything suspicious..

from micro-service.

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

I have a fix for Linux Debian Jessie, you can git pull for it. I add the signal.h to the usr_interrupt_handler.hpp file as you already did and fixed a typo in CMakeLists.txt for the library search paths which causes all the 'undefined reference' errors

On Debian I am using:
g++-4.9
boost 1.55
openssl 1.0.1

On Ubuntu Xenial I have this only issue:

../libs/cpprestsdk/build.release/Binaries/libcpprest.a(pplxlinux.cpp.o): In function pplx::details::platform::YieldExecution()': pplxlinux.cpp:(.text+0x51): undefined reference to boost::this_thread::yield()'

where I have:

g++-4.9
boost: 1.58

when I have some more cycles I'll take a look at it, I hope the Debian fix help you. BTW please after calling cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug | Release, instead of using:

make -j 8

use only make, it seams g++-4.9 does not support parallel compilation.

please let me know if it works for you to use linux debian

from micro-service.

requinham avatar requinham commented on July 24, 2024

g++ support parallel compilation.
same linking problem !

from micro-service.

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

Did you pull my latest changes from the repository, I fixed this typo:

-    target_link_libraries(${PROJECT_NAME} ${LIBRARIES_SARCH_PATHS})
+    target_link_libraries(${PROJECT_NAME} ${LIBRARIES_SEARCH_PATHS})

to avoid the 'undefined references' error when linking; additionally as I said, I could compile it successfully on Linux Debian Jessie so I encourage you to compile it there while I get some extra time to look to the only issue I have on Ubuntu Xenial which as I said is:

/libs/cpprestsdk/build.release/Binaries/libcpprest.a(pplxlinux.cpp.o): In function pplx::details::platform::YieldExecution()': pplxlinux.cpp:(.text+0x51): undefined reference toboost::this_thread::yield()'

so please pull my latest changes and if you can pull from Docker a Debian Jessie image and give it a try there, cause it works. :)

thanks,
Iván.

from micro-service.

requinham avatar requinham commented on July 24, 2024

After pulling change I confirm that the rest of problem is :
Linking CXX executable micro-service
../libs/cpprestsdk/build.release/Binaries/libcpprest.a(pplxlinux.cpp.o): In function pplx::details::platform::YieldExecution()': pplxlinux.cpp:(.text+0x51): undefined reference to boost::this_thread::yield()'

Thank you and hope you will fix it soon :)

Regards,
Mohamed

from micro-service.

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

Hi Mohamed,
Please give it a try again by pulling a simple change I made on CMakeLists.txt file, it worked for me on Ubuntu Xenial 16.04, hopefully work for you.

BTW, be careful to compile C++ REST SDK and micro-service project with the same g++ version. The build_dependencies.sh script assumes g++-4.9, if you want to use g++-5.4 modify it accordingly. Ubuntu Xenial seams to come with g++-5.4 pre-installed by default.

Best Regards,
Iván.

from micro-service.

ivanmejiarocha avatar ivanmejiarocha commented on July 24, 2024

I guess I can close this issue now.

from micro-service.

requinham avatar requinham commented on July 24, 2024

Thank you.

from micro-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.