-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I am researching for rendering flutter-tizen in NUI (Tizen Natural User Interface (C#))
For this, I must use DALi(Tizen C++ UIFW) in engine(tizen renderer).
Among the DALi APIs, there is an API that returns std::string and when I want to use this API, the link error occurred in engine build.
( ex: const std::string& Dali::Toolkit::ImageUrl::GetUrl() const)
tizen_renderer_ecore_wl2.cc:(.text._ZN7flutter21TizenRendererEcoreWl28SetupEGLEv+0x2d3): undefined reference to `Dali::Toolkit::ImageUrl::GetUrl() const
I found symbol for this API with the nm command. there is a [abi:cxx11] tag.
~/dev/os/engine/src ((HEAD detached at 4660f4a)) 16:08:11 $ nm -gDC tizen_tools/sysroot/x86/usr/lib/libdali2-toolkit.so | grep ImageUrl::GetUrl
0020fade T Dali::Toolkit::ImageUrl::GetUrl[abi:cxx11]() const
I was studying this and found that the engine compile script need __GLIBCXX_USE_CXX11_ABI = 1 //or 0 define.
(https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)
I added it to build script and tried to build, but the problem was not resolved.
If you guys has any ideas for script modifications to use [abi:cxx11] api, please let me know.
(my tizen/Build.gn diff)
--- a/shell/platform/tizen/BUILD.gn
+++ b/shell/platform/tizen/BUILD.gn
@@ -21,6 +21,7 @@ source_set("flutter_engine") {
lib_dirs = [ root_out_dir ]
public_configs = [ ":embedder_rpath" ]
+ public_configs += [ "//build/config/compiler:rtti" ]
deps = [ "//flutter/shell/platform/embedder:flutter_engine" ]
}
@@ -52,6 +53,10 @@ config("rootstrap_include_dirs") {
"$local_prefix/include/ecore-input-1",
"$local_prefix/include/ecore-wayland-1",
"$local_prefix/include/ecore-wl2-1",
+ "$local_prefix/include/dali",
+ "$local_prefix/include/dali-toolkit",
+ "$local_prefix/include/dali-adaptor",
+
"$local_prefix/include/efl-1",
"$local_prefix/include/efl-extension",
"$local_prefix/include/eina-1",
@@ -144,6 +149,7 @@ template("embedder") {
defines += invoker.defines
defines += [ "FLUTTER_ENGINE_NO_PROTOTYPES" ]
+ defines += [ "_GLIBCXX_USE_CXX11_ABI=1"]
configs +=
[ "//flutter/shell/platform/common:desktop_library_implementation" ]
@@ -209,6 +215,9 @@ template("embedder") {
]
libs += [
+ "dali2-core",
+ "dali2-adaptor",
+ "dali2-toolkit",
"ecore_wl2",
"tizen-extension-client",
]compiler/build.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9b5899e..3e5cc8e 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -631,17 +631,13 @@ if (is_win) {
if (!use_xcode) {
default_warning_flags += [
- "-Wno-unused-but-set-parameter",
- "-Wno-unused-but-set-variable",
"-Wno-implicit-int-float-conversion",
"-Wno-c99-designator",
"-Wno-deprecated-copy",
# Needed for compiling Skia with clang-12
- "-Wno-psabi",
]
if (!is_fuchsia) {
default_warning_flags += [
- "-Wno-non-c-typedef-for-linkage",
"-Wno-range-loop-construct",
]
}
@@ -678,6 +674,7 @@ config("chromium_code") {
defines = [
"__STDC_CONSTANT_MACROS",
"__STDC_FORMAT_MACROS",
+ "_GLIBCXX_USE_CXX11_ABI=1"
]
if (!using_sanitizer && (!is_linux || !is_clang)) {
@@ -718,6 +715,10 @@ config("no_chromium_code") {
config("rtti") {
if (is_win) {
cflags_cc = [ "/GR" ]
+ } else {
+ rtti_flags = [ "-frtti" ]
+ cflags_cc = rtti_flags
+ cflags_objcc = rtti_flags
}
}
config("no_rtti") {tizen-tools
diff --git a/sysroot/build-rootfs.py b/sysroot/build-rootfs.py
index 06d6768..b11b2b1 100755
--- a/sysroot/build-rootfs.py
+++ b/sysroot/build-rootfs.py
@@ -62,6 +62,12 @@ unifiedPackages = [
'edje-devel',
'eet',
'eet-devel',
+ 'dali2',
+ 'dali2-devel',
+ 'dali2-adaptor',
+ 'dali2-adaptor-devel',
+ 'dali2-toolkit',
+ 'dali2-toolkit-devel',
'efl-devel',
'efl-extension',
'efl-extension-devel',
@@ -132,11 +138,11 @@ parser.add_argument(
parser.add_argument(
'-b', '--base-repo', metavar='URL', type=str,
help='url to the base packages repository',
- default='http://download.tizen.org/snapshots/tizen/5.5-base/latest/repos/standard/packages')
+ default='http://download.tizen.org/snapshots/tizen/6.5-base/latest/repos/standard/packages')
parser.add_argument(
'-u', '--unified-repo', metavar='URL', type=str,
help='url to the unified packages repository',
- default='http://download.tizen.org/snapshots/tizen/5.5-unified/latest/repos/standard/packages')
+ default='http://download.tizen.org/snapshots/tizen/6.5-unified/latest/repos/standard/packages')
args = parser.parse_args()
if not args.output:Sample Dali code
#include "dali-toolkit/public-api/image-loader/image-url.h"
#include "dali-toolkit/dali-toolkit.h"
#include "dali/devel-api/adaptor-framework/native-image-source-queue.h"
#include "tbm_surface.h"
#include "tbm_surface_queue.h"
...
tbm_surface_queue_h mTbmQueue = nullptr;
Dali::NativeImageSourceQueuePtr mNativeImageQueue = nullptr;
Dali::Texture mNativeTexture;
...
mTbmQueue = tbm_surface_queue_create(3 , 500, 500, TBM_FORMAT_ARGB8888, 0);
mNativeImageQueue = Dali::NativeImageSourceQueue::New(mTbmQueue);
mNativeTexture = Dali::Texture::New(*mNativeImageQueue);
Dali::Toolkit::ImageUrl imageUrl = Dali::Toolkit::ImageUrl::New(mNativeTexture);
std::string url = imageUrl.GetUrl(); //<< Error
FT_LOG(Error) << "CJS URL : " << url;