Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix An incorrect filename causes a runtime failure #652 #703

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ cc_library_shared {
}

cc_library_shared {
name: "libvsomeip_cfg",
name: "libvsomeip3-cfg",
vendor: true,

srcs: libvsomeip_cfg_srcs,
Expand All @@ -128,7 +128,7 @@ cc_library_shared {
}

cc_library_shared {
name: "libvsomeip_e2e",
name: "libvsomeip3-e2e",
vendor: true,

srcs: libvsomeip_e2e_srcs,
Expand All @@ -146,7 +146,7 @@ cc_library_shared {
}

cc_library_shared {
name: "libvsomeip_sd",
name: "libvsomeip3-sd",
vendor: true,

srcs: libvsomeip_sd_srcs,
Expand Down
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ if(DLT_FOUND)
endif(DLT_FOUND)
endif()

if (ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITHOUT_SYSTEMD")
set(SystemD_LIBRARIES "")
set(USE_RT "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=overloaded-virtual -Dvsomeip3_EXPORTS -fvisibility=default -DWITHOUT_SYSTEMD")
add_compile_definitions(VSOMEIP_BASE_PATH="${VSOMEIP_BASE_PATH}")
add_compile_definitions(ANDROID=1)
add_compile_definitions(WITHOUT_SYSTEMD=1)

else()
# SystemD
pkg_check_modules(SystemD "libsystemd")

Expand All @@ -218,6 +228,8 @@ MESSAGE( STATUS "Systemd was not found, watchdog disabled!")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITHOUT_SYSTEMD")
endif(NOT SystemD_FOUND)

endif()

# Multiple routing managers
if (VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS EQUAL 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS")
Expand Down Expand Up @@ -257,7 +269,11 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
set(USE_RT "")
else()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} ${NO_DEPRECATED} ${EXPORTSYMBOLS}")
set(USE_RT "rt")
if(ANDROID)
set(USE_RT "")
else()
set(USE_RT "rt")
endif()
endif()

################################################################################
Expand Down Expand Up @@ -326,6 +342,10 @@ if(NOT WIN32)
target_link_options(${VSOMEIP_NAME} PRIVATE "LINKER:-as-needed")
endif()

if(ANDROID)
target_link_libraries(${VSOMEIP_NAME} PRIVATE log)
endif()

################################################################################
# Service Discovery library
################################################################################
Expand Down
6 changes: 3 additions & 3 deletions examples/hello_world/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cc_defaults {

shared_libs: [
"libvsomeip3",
"libvsomeip_cfg",
"libvsomeip_e2e",
"libvsomeip_sd",
"libvsomeip3-cfg",
"libvsomeip3-e2e",
"libvsomeip3-sd",
"liblog",
],
}
Expand Down
8 changes: 4 additions & 4 deletions implementation/configuration/include/internal_android.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@

#define VSOMEIP_ROUTING_HOST_PORT_DEFAULT 31490

#define VSOMEIP_CFG_LIBRARY "libvsomeip_cfg.so"
#define VSOMEIP_CFG_LIBRARY "libvsomeip3-cfg.so"

#define VSOMEIP_SD_LIBRARY "libvsomeip_sd.so"
#define VSOMEIP_SD_LIBRARY "libvsomeip3-sd.so"

#define VSOMEIP_E2E_LIBRARY "libvsomeip_e2e.so"
#define VSOMEIP_E2E_LIBRARY "libvsomeip3-e2e.so"

#define VSOMEIP_SEC_LIBRARY "libvsomeip-sec.so.1"
#define VSOMEIP_SEC_LIBRARY "libvsomeip3-sec.so.1"

#define VSOMEIP_ROUTING "vsomeipd"
#define VSOMEIP_ROUTING_CLIENT 0
Expand Down
14 changes: 13 additions & 1 deletion implementation/logger/src/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
#include <iostream>

#ifdef ANDROID
#include <utils/Log.h>
#include <android/log.h>

#ifdef ALOG
#undef ALOG
#endif

#define ALOG __android_log_print

#define LOG_ERROR ANDROID_LOG_ERROR
#define LOG_WARN ANDROID_LOG_WARN
#define LOG_INFO ANDROID_LOG_INFO
#define LOG_DEBUG ANDROID_LOG_DEBUG
#define LOG_VERBOSE ANDROID_LOG_VERBOSE

#ifdef ALOGE
#undef ALOGE
Expand Down
14 changes: 13 additions & 1 deletion implementation/tracing/src/connector_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@
#include "../../utility/include/byteorder.hpp"

#ifdef ANDROID
#include <utils/Log.h>
#include <android/log.h>

#ifdef ALOG
#undef ALOG
#endif

#define ALOG __android_log_print

#define LOG_ERROR ANDROID_LOG_ERROR
#define LOG_WARN ANDROID_LOG_WARN
#define LOG_INFO ANDROID_LOG_INFO
#define LOG_DEBUG ANDROID_LOG_DEBUG
#define LOG_VERBOSE ANDROID_LOG_VERBOSE

#ifdef ALOGI
#undef ALOGI
Expand Down
Loading