虽然构建android的Vsomeip下面的错误可见? 帮助我解决错误

Kumarasamy Palanisamy 07/26/2017. 0 answers, 36 views
android android android-ndk android-ndk arm cross-compiling embedded-linux

我正在使用android NDK工具链来构建vsomeip

臂toolchain.cmake

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_PROCESSOR arm)

SET(CMAKE_C_COMPILER   arm-linux-androideabi-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-androideabi-g++)


SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=/home/arr7kor/someip/android-ndk-r10e/platforms/android-19/arch-arm" CACHE STRING "" FORCE)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=/home/arr7kor/someip/android-ndk-r10e/platforms/android-19/arch-arm" CACHE STRING "" FORCE)

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 

在CMakeLists.txt中包含路径:

include_directories(/home/someip/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/include)
include_directories(/home/someip/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include)
include_directories(/home/someip/android-ndk-r10e/platforms/android-19/arch-arm/usr/include) 

错误:

/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static bool vsomeip::utility::auto_configuration_init(const std::shared_ptr&)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:224:64: error: 'shm_open' was not declared in this scope
             static_cast(_config->get_permissions_shm()));
                                                                ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp:249:66: error: 'PTHREAD_MUTEX_ROBUST' was not declared in this scope
                         ret = pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);
                                                                  ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp:249:86: error: 'pthread_mutexattr_setrobust' was not declared in this scope
                         ret = pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);
                                                                                      ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp:332:96: error: 'pthread_mutex_consistent' was not declared in this scope
                             if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                                                ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static void vsomeip::utility::auto_configuration_exit(vsomeip::client_t, const std::shared_ptr&)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:396:70: error: 'shm_unlink' was not declared in this scope
                     shm_unlink(utility::get_shm_name(_config).c_str());
                                                                      ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static std::set vsomeip::utility::get_used_client_ids()':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:443:80: error: 'pthread_mutex_consistent' was not declared in this scope
             if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                                ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static vsomeip::client_t vsomeip::utility::request_client_id(const std::shared_ptr&, const string&, vsomeip::client_t)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:479:80: error: 'pthread_mutex_consistent' was not declared in this scope
             if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                                ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static void vsomeip::utility::release_client_id(vsomeip::client_t)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:622:80: error: 'pthread_mutex_consistent' was not declared in this scope
             if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                                ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static bool vsomeip::utility::is_routing_manager_host(vsomeip::client_t)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:661:76: error: 'pthread_mutex_consistent' was not declared in this scope
         if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                            ^
/home/someip/vsomeip/implementation/utility/src/utility.cpp: In static member function 'static void vsomeip::utility::set_routing_manager_host(vsomeip::client_t)':
/home/someip/vsomeip/implementation/utility/src/utility.cpp:690:76: error: 'pthread_mutex_consistent' was not declared in this scope
         if (0 != pthread_mutex_consistent(&the_configuration_data__->mutex_)) {
                                                                            ^ 

可以请指导我解决这个errors

提前致谢

No Answers Yet

Related questions

Hot questions

Language

Popular Tags