vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

compile issue in AOSP

Open naocanyouji opened this issue 2 years ago • 4 comments

when building library libvsomeip3-cfg with android.bp in AOSP, some errors happened, these are error logs, can someone help fix?

ld.lld: error: undefined symbol: boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)

referenced by operations.hpp:957 (external/vsomeip/vsomeip-master/external/boost_1_70/include/boost/filesystem/operations.hpp:957) out/soong/.intermediates/external/vsomeip/vsomeip-master/libvsomeip3-cfg/android_vendor.30_arm64_armv8-a_shared/obj/external/vsomeip/vsomeip-master/implementation/configuration/src/configuration_impl.o:(vsomeip_v3::cfg::configuration_impl::read_data(std::__1::set<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::vector<vsomeip_v3::configuration_element, std::__1::allocator<vsomeip_v3::configuration_element> >&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >&, bool))

naocanyouji avatar Sep 27 '21 05:09 naocanyouji

Do you have Boost libraries in your AOSP?

nkh-lab avatar Sep 27 '21 06:09 nkh-lab

Like example you can use this AOSP manifest project where vsomeip and boost libraries are built in: https://github.com/nkh-lab/aosp-ncar-manifest. Just sync, compile AOSP, compile vsomeip hello_world example and run it on emulator.

nkh-lab avatar Dec 02 '21 16:12 nkh-lab

Boost not right

ByteXiaoTang avatar Dec 10 '21 05:12 ByteXiaoTang

git clone -b boost-1.70.0 [email protected]:boostorg/accumulators.git git clone -b boost-1.70.0 [email protected]:boostorg/algorithm.git git clone -b boost-1.70.0 [email protected]:boostorg/align.git git clone -b boost-1.70.0 [email protected]:boostorg/any.git git clone -b boost-1.70.0 [email protected]:boostorg/array.git git clone -b boost-1.70.0 [email protected]:boostorg/asio.git git clone -b boost-1.70.0 [email protected]:boostorg/assert.git git clone -b boost-1.70.0 [email protected]:boostorg/assign.git git clone -b boost-1.70.0 [email protected]:boostorg/atomic.git git clone -b boost-1.70.0 [email protected]:boostorg/beast.git git clone -b boost-1.70.0 [email protected]:boostorg/bimap.git git clone -b boost-1.70.0 [email protected]:boostorg/bind.git git clone -b boost-1.70.0 [email protected]:boostorg/callable_traits.git git clone -b boost-1.70.0 [email protected]:boostorg/chrono.git git clone -b boost-1.70.0 [email protected]:boostorg/circular_buffer.git git clone -b boost-1.70.0 [email protected]:boostorg/compatibility.git git clone -b boost-1.70.0 [email protected]:boostorg/compute.git git clone -b boost-1.70.0 [email protected]:boostorg/concept_check.git git clone -b boost-1.70.0 [email protected]:boostorg/config.git git clone -b boost-1.70.0 [email protected]:boostorg/container.git git clone -b boost-1.70.0 [email protected]:boostorg/container_hash.git git clone -b boost-1.70.0 [email protected]:boostorg/context.git git clone -b boost-1.70.0 [email protected]:boostorg/conversion.git git clone -b boost-1.70.0 [email protected]:boostorg/convert.git git clone -b boost-1.70.0 [email protected]:boostorg/core.git git clone -b boost-1.70.0 [email protected]:boostorg/coroutine.git git clone -b boost-1.70.0 [email protected]:boostorg/coroutine2.git git clone -b boost-1.70.0 [email protected]:boostorg/crc.git git clone -b boost-1.70.0 [email protected]:boostorg/date_time.git git clone -b boost-1.70.0 [email protected]:boostorg/detail.git git clone -b boost-1.70.0 [email protected]:boostorg/disjoint_sets.git git clone -b boost-1.70.0 [email protected]:boostorg/dll.git git clone -b boost-1.70.0 [email protected]:boostorg/dynamic_bitset.git git clone -b boost-1.70.0 [email protected]:boostorg/endian.git git clone -b boost-1.70.0 [email protected]:boostorg/exception.git git clone -b boost-1.70.0 [email protected]:boostorg/fiber.git git clone -b boost-1.70.0 [email protected]:boostorg/filesystem.git git clone -b boost-1.70.0 [email protected]:boostorg/flyweight.git git clone -b boost-1.70.0 [email protected]:boostorg/foreach.git git clone -b boost-1.70.0 [email protected]:boostorg/format.git git clone -b boost-1.70.0 [email protected]:boostorg/function.git git clone -b boost-1.70.0 [email protected]:boostorg/functional.git git clone -b boost-1.70.0 [email protected]:boostorg/function_types.git git clone -b boost-1.70.0 [email protected]:boostorg/fusion.git git clone -b boost-1.70.0 [email protected]:boostorg/geometry.git git clone -b boost-1.70.0 [email protected]:boostorg/gil.git git clone -b boost-1.70.0 [email protected]:boostorg/graph.git git clone -b boost-1.70.0 [email protected]:boostorg/graph_parallel.git git clone -b boost-1.70.0 [email protected]:boostorg/hana.git git clone -b boost-1.70.0 [email protected]:boostorg/heap.git git clone -b boost-1.70.0 [email protected]:boostorg/icl.git git clone -b boost-1.70.0 [email protected]:boostorg/integer.git git clone -b boost-1.70.0 [email protected]:boostorg/interprocess.git git clone -b boost-1.70.0 [email protected]:boostorg/intrusive.git git clone -b boost-1.70.0 [email protected]:boostorg/io.git git clone -b boost-1.70.0 [email protected]:boostorg/iostreams.git git clone -b boost-1.70.0 [email protected]:boostorg/iterator.git git clone -b boost-1.70.0 [email protected]:boostorg/lambda.git git clone -b boost-1.70.0 [email protected]:boostorg/lexical_cast.git git clone -b boost-1.70.0 [email protected]:boostorg/locale.git git clone -b boost-1.70.0 [email protected]:boostorg/local_function.git git clone -b boost-1.70.0 [email protected]:boostorg/lockfree.git git clone -b boost-1.70.0 [email protected]:boostorg/log.git git clone -b boost-1.70.0 [email protected]:boostorg/logic.git git clone -b boost-1.70.0 [email protected]:boostorg/math.git git clone -b boost-1.70.0 [email protected]:boostorg/metaparse.git git clone -b boost-1.70.0 [email protected]:boostorg/move.git git clone -b boost-1.70.0 [email protected]:boostorg/mp11.git git clone -b boost-1.70.0 [email protected]:boostorg/mpi.git git clone -b boost-1.70.0 [email protected]:boostorg/mpl.git git clone -b boost-1.70.0 [email protected]:boostorg/msm.git git clone -b boost-1.70.0 [email protected]:boostorg/multi_array.git git clone -b boost-1.70.0 [email protected]:boostorg/multi_index.git git clone -b boost-1.70.0 [email protected]:boostorg/multiprecision.git git clone -b boost-1.70.0 [email protected]:boostorg/numeric_conversion.git git clone -b boost-1.70.0 [email protected]:boostorg/optional.git git clone -b boost-1.70.0 [email protected]:boostorg/parameter.git git clone -b boost-1.70.0 [email protected]:boostorg/phoenix.git git clone -b boost-1.70.0 [email protected]:boostorg/poly_collection.git git clone -b boost-1.70.0 [email protected]:boostorg/polygon.git git clone -b boost-1.70.0 [email protected]:boostorg/pool.git git clone -b boost-1.70.0 [email protected]:boostorg/predef.git git clone -b boost-1.70.0 [email protected]:boostorg/preprocessor.git git clone -b boost-1.70.0 [email protected]:boostorg/process.git git clone -b boost-1.70.0 [email protected]:boostorg/program_options.git git clone -b boost-1.70.0 [email protected]:boostorg/property_map.git git clone -b boost-1.70.0 [email protected]:boostorg/property_tree.git git clone -b boost-1.70.0 [email protected]:boostorg/proto.git git clone -b boost-1.70.0 [email protected]:boostorg/ptr_container.git git clone -b boost-1.70.0 [email protected]:boostorg/python.git git clone -b boost-1.70.0 [email protected]:boostorg/qvm.git git clone -b boost-1.70.0 [email protected]:boostorg/random.git git clone -b boost-1.70.0 [email protected]:boostorg/range.git git clone -b boost-1.70.0 [email protected]:boostorg/ratio.git git clone -b boost-1.70.0 [email protected]:boostorg/rational.git git clone -b boost-1.70.0 [email protected]:boostorg/regex.git git clone -b boost-1.70.0 [email protected]:boostorg/scope_exit.git git clone -b boost-1.70.0 [email protected]:boostorg/serialization.git git clone -b boost-1.70.0 [email protected]:boostorg/signals.git git clone -b boost-1.70.0 [email protected]:boostorg/signals2.git git clone -b boost-1.70.0 [email protected]:boostorg/smart_ptr.git git clone -b boost-1.70.0 [email protected]:boostorg/sort.git git clone -b boost-1.70.0 [email protected]:boostorg/spirit.git git clone -b boost-1.70.0 [email protected]:boostorg/stacktrace.git git clone -b boost-1.70.0 [email protected]:boostorg/statechart.git git clone -b boost-1.70.0 [email protected]:boostorg/static_assert.git git clone -b boost-1.70.0 [email protected]:boostorg/system.git git clone -b boost-1.70.0 [email protected]:boostorg/test.git git clone -b boost-1.70.0 [email protected]:boostorg/thread.git git clone -b boost-1.70.0 [email protected]:boostorg/throw_exception.git git clone -b boost-1.70.0 [email protected]:boostorg/timer.git git clone -b boost-1.70.0 [email protected]:boostorg/tokenizer.git git clone -b boost-1.70.0 [email protected]:boostorg/tti.git git clone -b boost-1.70.0 [email protected]:boostorg/tuple.git git clone -b boost-1.70.0 [email protected]:boostorg/type_erasure.git git clone -b boost-1.70.0 [email protected]:boostorg/type_index.git git clone -b boost-1.70.0 [email protected]:boostorg/typeof.git git clone -b boost-1.70.0 [email protected]:boostorg/type_traits.git git clone -b boost-1.70.0 [email protected]:boostorg/units.git git clone -b boost-1.70.0 [email protected]:boostorg/unordered.git git clone -b boost-1.70.0 [email protected]:boostorg/utility.git git clone -b boost-1.70.0 [email protected]:boostorg/uuid.git git clone -b boost-1.70.0 [email protected]:boostorg/variant.git git clone -b boost-1.70.0 [email protected]:boostorg/vmd.git git clone -b boost-1.70.0 [email protected]:boostorg/wave.git git clone -b boost-1.70.0 [email protected]:boostorg/winapi.git git clone -b boost-1.70.0 [email protected]:boostorg/xpressive.git

then .check to the tags。。。 then use the following android.bp to compilie.. cc_defaults { name: "boost_defaults", vendor: true, // vendor_available: true, } cc_defaults { name: "boost_headers_defaults", defaults: ["boost_defaults"], } cc_defaults { name: "boost_library_defaults", defaults: ["boost_defaults"], rtti: true, cflags: [ "-Wall", // "-Werror", "-fexceptions", // "-DBOOST_THREAD_DONT_USE_CHRONO", // "-DBOOST_THREAD_POSIX", "-DBOOST_ASIO_HAS_STD_STRING_VIEW", ], } cc_library_headers { name: "libboost_headers", defaults: ["boost_headers_defaults"], export_include_dirs: [ "accumulators/include/", "algorithm/include/", "align/include/", "any/include/", "array/include", "asio/include/", "assert/include", "assign/include", "atomic/include", "beast/include", "bimap/include", "bind/include/", "callable_traits/include/", "chrono/include", "circular_buffer/include", "compatibility/include", "compute/include", "concept_check/include", "config/include", "container/include", "container_hash/include", "context/include", "conversion/include", "convert/include", "core/include", "coroutine/include", "coroutine2/include", "crc/include", "date_time/include", "detail/include", "disjoint_sets/include", "dll/include", "dynamic_bitset/include", "endian/include", "exception/include", "fiber/include", "filesystem/include", "flyweight/include", "foreach/include/", "format/include/", "function/include/", "functional/include/", "function_types/include/", "fusion/include", "geometry/include", "gil/include", "graph/include", "graph_parallel/include", "hana/include", "heap/include", "icl/include", "integer/include", "interprocess/include/", "intrusive/include", "io/include", "iostreams/include", "iterator/include", "lambda/include", "lexical_cast/include/", "locale/include", "local_function/include", "lockfree/include", "log/include", "logic/include", "math/include", "metaparse/include", "move/include", "mp11/include", "mpi/include", "mpl/include", "msm/include", "multi_array/include", "multi_index/include/", "multiprecision/include/", // "numeric/include", "numeric_conversion/include", "optional/include", "parameter/include", "phoenix/include", "poly_collection/include", "polygon/include", "pool/include", "predef/include", "preprocessor/include", "process/include", "program_options/include", "property_map/include", "property_tree/include/", "proto/include", "ptr_container/include", "python/include", "qvm/include", "random/include", "range/include", "ratio/include", "rational/include", "regex/include", "scope_exit/include", "serialization/include", // "signals/include", "signals2/include", "smart_ptr/include", "sort/include", "spirit/include", "stacktrace/include", "statechart/include", "static_assert/include", "system/include", "test/include", "thread/include", "throw_exception/include", "timer/include", "tokenizer/include/", "tti/include/", "tuple/include/", "type_erasure/include", "type_index/include", "typeof/include/", "type_traits/include", "units/include", "unordered/include", "utility/include", "uuid/include", "variant/include/", "vmd/include/", "wave/include/", "winapi/include/", "xpressive/include/", ] } cc_library { name: "libboost_chrono", defaults: ["boost_library_defaults"], header_libs: [ "libboost_headers", ], shared: { shared_libs: [ "libboost_system", ], }, srcs : [ "chrono/src//*.cpp", ], export_include_dirs: ["chrono/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_date_time", defaults: ["boost_library_defaults"], header_libs: [ "libboost_headers", ], srcs : [ "date_time/src//.cpp", ], export_include_dirs: ["date_time/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_filesystem", defaults: ["boost_library_defaults"], //FIXME: build workaround cflags: [ "-Wno-deprecated-declarations", "-Wno-non-virtual-dtor", "-Wno-unused-parameter", ], header_libs: [ "libboost_headers", ], shared: { shared_libs: [ "libboost_system", ], }, srcs : [ "filesystem/src/**/.cpp", ], export_include_dirs: ["filesystem/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_log", defaults: ["boost_library_defaults"], //FIXME: build workaround cflags: [ "-Wno-implicit-fallthrough", "-Wno-non-virtual-dtor", "-Wno-unused-parameter", ], header_libs: [ "libboost_headers", ], shared: { shared_libs: [ "libboost_thread", "libboost_filesystem", "libboost_regex", "libboost_system", ], }, srcs : [ "log/src//.cpp", ], exclude_srcs : [ "log/src/dump_ssse3.cpp", "log/src/dump_avx2.cpp", "log/src/windows/.cpp" ], local_include_dirs : [ "log/src", "log/src/posix", "log/src/setup", "log/src/windows", ], export_include_dirs: ["log/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_program_options", defaults: ["boost_library_defaults"], header_libs: [ "libboost_headers", ], srcs : [ "program_options/src//.cpp", ], export_include_dirs: ["program_options/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_regex", defaults: ["boost_library_defaults"], //FIXME: build workaround cflags: [ "-Wno-implicit-fallthrough", ], header_libs: [ "libboost_headers", ], srcs : [ "regex/src/**/.cpp", ], export_include_dirs: ["regex/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_system", defaults: ["boost_library_defaults"], header_libs: [ "libboost_headers", ], srcs : [ "system/src//*.cpp", ], export_include_dirs: ["system/include"], export_header_lib_headers: [ "libboost_headers", ], } cc_library { name: "libboost_thread", defaults: ["boost_library_defaults"], //FIXME: build workaround cflags: [ "-Wno-non-virtual-dtor", ], header_libs: [ "libboost_headers", ], shared: { shared_libs: [ "libboost_system", ], }, srcs : [ "thread/src//.cpp", ], exclude_srcs : [ "thread/src/win32/.cpp", "thread/src/pthread/once_atomic.cpp", ], local_include_dirs : [ "thread/src", "thread/src/pthread", ], export_include_dirs: ["thread/include"], export_header_lib_headers: [ "libboost_headers", ], }

ByteXiaoTang avatar Dec 17 '21 03:12 ByteXiaoTang