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

Enable arm64 build #63

Merged
merged 4 commits into from
Apr 15, 2021
Merged

Conversation

swift-kim
Copy link
Member

@swift-kim swift-kim commented Apr 12, 2021

  • Set build_engine_artifacts to false since we're cross-building on x64 (we don't need SDK artifacts)
  • Update azure-pipelines.yaml for continuous integration
  • Add the "common" device profile

@swift-kim swift-kim requested a review from wiertel April 12, 2021 09:28
@swift-kim
Copy link
Member Author

I chose a profile factor of 0.5 for kCommon because it just looked good on my monitor. Actually the Tizen system info returns a dpi value of 210 which is larger than expected (around 91). I don't know how to choose a right value. Texts might be too small on higher dpi monitors.

@swift-kim swift-kim marked this pull request as ready for review April 13, 2021 07:39
@swift-kim swift-kim requested a review from a team April 14, 2021 03:18
@swift-kim
Copy link
Member Author

Note that you need to update the toolchain (https://github.com/flutter-tizen/tizen_tools/pull/7) to build for arm64.

@wiertel
Copy link
Member

wiertel commented Apr 14, 2021

I've tried building it and found 2 fails (maybe my environment is affecting it).

  1. flutter/tools/gn reports error, it expects pkgconfig directory in sysroot/arm64/usr/lib and fails to find it in sysroot/arm64/usr/lib64. I've symlinked ../lib/pkgconfig into lib64 to work around it.
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
   pkgresult = exec_script(pkg_config_script, args, "value")
               ^----------
Current dir: /mnt/tizen/flutter/engine-build/engine/src/out/linux_release_arm64/
Command: python /mnt/tizen/flutter/engine-build/engine/src/build/config/linux/pkg-config.py -s /mnt/tizen/flutter/tizen_tools/sysroot/arm64 -a arm64 --system_libdir lib freetype2
Returned 1.
stderr:

Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Traceback (most recent call last):
 File "/mnt/tizen/flutter/engine-build/engine/src/build/config/linux/pkg-config.py", line 248, in <module>
   sys.exit(main())
 File "/mnt/tizen/flutter/engine-build/engine/src/build/config/linux/pkg-config.py", line 143, in main
   prefix = GetPkgConfigPrefixToStrip(options, args)
 File "/mnt/tizen/flutter/engine-build/engine/src/build/config/linux/pkg-config.py", line 82, in GetPkgConfigPrefixToStrip
   "--variable=prefix"] + args, env=os.environ).decode('utf-8')
 File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
   raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'freetype2']' returned non-zero exit status 1

See //build/config/linux/BUILD.gn:30:1: whence it was called.
pkg_config("freetype2") {
^------------------------
See //build/config/BUILDCONFIG.gn:357:33: which caused the file to be included.
 _native_compiler_configs += [ "//build/config/linux:sdk" ]
                               ^-------------------------
  1. ninja build failed with errors in flutter-tizen.cc related to long/long long mismatch like:
../../flutter/shell/platform/tizen/flutter_tizen.cc:194:53: error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
    FT_LOGE("can't find texture texture_id = %lld", texture_id);

@swift-kim
Copy link
Member Author

swift-kim commented Apr 14, 2021

@wiertel

  1. I usually redirects PKG_CONFIG_PATH to the host's freetype.pc (see the bottom of this page) but your workaround looks better for me.
    → I applied the symlink approach in https://github.com/flutter-tizen/tizen_tools/pull/7/commits/1a354ff0c5d6bdbaa697541e5a38ee73376c44b7 and 8a5a9f4. I don't know which is the "right" way to resolve this issue but the freetype2 dependency itself will be removed in the future.
  2. I already patched all occurrences of %lld (see the diff) so it shouldn't appear in the code.

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ecore_imf_context_client_window_set(
imf_context_, (void*)engine_->tizen_renderer->GetEcoreWindowId());
imf_context_,
(void*)(intptr_t)(engine_->tizen_renderer->GetEcoreWindowId()));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks better than I mentioned before.

Copy link
Member

@wiertel wiertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can now confirm that this change works.
The second issue was my mistake - I didn't have this PR applied to repo cloned by gclient. After fixing that I was able to compile and run a flutter app on 64bit Tizen IoT.

@swift-kim swift-kim merged commit fe6a40a into flutter-tizen:flutter-2.0.1-tizen Apr 15, 2021
swift-kim added a commit that referenced this pull request Jun 7, 2021
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
@swift-kim swift-kim mentioned this pull request Jun 26, 2021
12 tasks
swift-kim added a commit that referenced this pull request Sep 27, 2021
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Nov 14, 2021
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Dec 9, 2021
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Dec 17, 2021
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Feb 7, 2022
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Feb 11, 2022
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request May 12, 2022
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim added a commit that referenced this pull request Aug 5, 2022
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
…lock. (#63)

Also fixes the files with missing licenses. This check is somewhat easy with
Impeller than in the engine because all source files must have the same license
block.

Resolves an action item in the umbrella issue flutter/flutter#97686.
swift-kim added a commit that referenced this pull request Sep 1, 2022
* Enable arm64 build

* Update azure-pipelines.yml

* Add the common profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants