Cross compiling Chrome with ozone gbm on Linux ARM A9 - Linker error

486 views
Skip to first unread message

Santhosh Muralidharan

unread,
Jun 22, 2015, 6:00:44 AM6/22/15
to ozon...@chromium.org
Hi,

    I'm trying to cross-compile chrome for ARM9 with embedded Linux. Platform Supports OpenGL ES 2.0.


Environment:

export GYP_CROSSCOMPILE=1
export GYP_DEFINES='use_ash=1 use_ozone=1 use_aura=1 chromeos=0 use_xkbcommon=1 target_arch=arm arm_float_abi=hard armv7=1 arm_thumb=1 use_system_ffmpeg=1 use_v4l2_codec=1 fastbuild=1 ozone_platform=gbm ozone_platform_gbm=1'

   Linker error log is given below. Appreciate any help or any pointers on what could be going wrong.

obj/chrome/libbrowser.a(obj/chrome/browser/notifications/browser.fullscreen_notification_blocker.o):../../chrome/browser/notifications/fullscreen_notification_blocker.cc:function FullscreenNotificationBlocker::CheckState(): error: undefined reference to 'IsFullScreenMode()'
obj/chrome/libbrowser_ui.a(obj/chrome/browser/ui/browser_ui.browser_view_prefs.o):../../chrome/browser/ui/browser_view_prefs.cc:function chrome::RegisterBrowserViewProfilePrefs(user_prefs::PrefRegistrySyncable*): error: undefined reference to 'ui::GetCustomFramePrefDefault()'
obj/chrome/libbrowser_ui.a(obj/chrome/browser/ui/ash/launcher/browser_ui.launcher_context_menu.o):../../chrome/browser/ui/ash/launcher/launcher_context_menu.cc:function LauncherContextMenu::Init(): error: undefined reference to 'IsFullScreenMode()'
obj/chrome/libbrowser_ui.a(obj/chrome/browser/ui/views/tabs/browser_ui.tab_drag_controller.o):../../chrome/browser/ui/views/tabs/tab_drag_controller.cc:function TabDragController::GetLocalProcessWindow(gfx::Point const&, bool): error: undefined reference to 'GetLocalProcessWindowAtPoint(chrome::HostDesktopType, gfx::Point const&, std::set<aura::Window*, std::less<aura::Window*>, std::allocator<aura::Window*> > const&)'
obj/chrome/libbrowser_ui.a(obj/chrome/browser/ui/panels/browser_ui.display_settings_provider.o)(.text._ZN23DisplaySettingsProvider12IsFullScreenEv+0x0): error: undefined reference to 'IsFullScreenMode()'
obj/chrome/libbrowser_ui.a(obj/chrome/browser/ui/views/frame/browser_ui.desktop_browser_frame_aura.o):../../chrome/browser/ui/views/frame/desktop_browser_frame_aura.cc:function DesktopBrowserFrameAura::InitNativeWidget(views::Widget::InitParams const&): error: undefined reference to 'BrowserDesktopWindowTreeHost::CreateBrowserDesktopWindowTreeHost(views::internal::NativeWidgetDelegate*, views::DesktopNativeWidgetAura*, BrowserView*, BrowserFrame*)'
obj/ui/views/libviews.a(obj/ui/views/views.view.o):../../ui/views/view.cc:function views::View::OnMouseEvent(ui::MouseEvent*): error: undefined reference to 'views::NativeViewAccessibility::Create(views::View*)'
obj/ui/views/libviews.a(obj/ui/views/views.view.o):../../ui/views/view.cc:function views::View::NotifyAccessibilityEvent(ui::AXEvent, bool): error: undefined reference to 'views::NativeViewAccessibility::Create(views::View*)'
obj/ui/views/libviews.a(obj/ui/views/views.view.o):../../ui/views/view.cc:function views::View::GetNativeViewAccessible(): error: undefined reference to 'views::NativeViewAccessibility::Create(views::View*)'
obj/ui/views/libviews.a(obj/ui/views/views.view.o):../../ui/views/view.cc:function views::View::OnFocus(): error: undefined reference to 'views::NativeViewAccessibility::Create(views::View*)'
obj/ui/views/libviews.a(obj/ui/views/widget/views.native_widget_aura.o):../../ui/views/widget/native_widget_aura.cc:function views::NativeWidgetAura::GetNativeTheme() const: error: undefined reference to 'views::DesktopWindowTreeHost::GetNativeTheme(aura::Window*)'
obj/ui/views/libviews.a(obj/ui/views/widget/desktop_aura/views.desktop_native_widget_aura.o):../../ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:function views::DesktopNativeWidgetAura::GetNativeTheme() const: error: undefined reference to 'views::DesktopWindowTreeHost::GetNativeTheme(aura::Window*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Thankyou!

Santhosh Muralidharan

unread,
Jun 22, 2015, 6:08:43 AM6/22/15
to ozon...@chromium.org
Forgot to mention this. I'm using the stable release - 45.0.2427.10.

Thanks.

Santhosh Muralidharan

unread,
Jun 22, 2015, 6:22:58 AM6/22/15
to ozon...@chromium.org
I see that the undefined reference errors are platform specific, which is missing for the Ozone GBM. For example. ozone-wayland has implementations for IsFullScreenMode, CreateBrowserDesktopWindowTreeHost, etc.

Am I missing anything specific related to Ozone-GBM. 

Thanks.

Arunprasad Rajkumar

unread,
Jun 22, 2015, 7:48:21 AM6/22/15
to Santhosh Muralidharan, ozon...@chromium.org
Try without toolkit views.

e.g.

GYP_DEFINES="$YOUR_GYP_DEFINES toolkit_views=0"

​Thanks & Regards,
Arun

To unsubscribe from this group and stop receiving emails from it, send an email to ozone-dev+...@chromium.org.

Santhosh Muralidharan

unread,
Jun 22, 2015, 9:46:00 AM6/22/15
to ozon...@chromium.org, sant...@gmail.com
Thanks Arun.

with toolkit_view=0, I get the following error. Looking at the code, this #error comes from the WindowsEventRouter. With the Ozone GBM, we don't have windowing and we'll also not need any event routing. Am I right? 

../../chrome/browser/extensions/api/tabs/windows_event_router.cc:46:2: error: Unsupported

On the other hand, there are few patches maintained here https://github.com/kalyankondapally/Chromium-OzoneGBM for Linux desktop. Is it worth considering some of these patches for the embedded linux? 

Thankyou.

Tiago Vignatti

unread,
Jun 22, 2015, 10:22:46 AM6/22/15
to ozon...@chromium.org
You will need to turn on Chrome OS support, independently if you're
using this OS or not. Just add chromeos=1 to your GYP_DEFINES.

BR,

Tiago

On 06/22/2015 10:45 AM, Santhosh Muralidharan wrote:
> Thanks Arun.
>
> with toolkit_view=0, I get the following error. Looking at the code,
> this #error comes from the WindowsEventRouter. With the Ozone GBM, we
> don't have windowing and we'll also not need any event routing. Am I right?
>
> ../../chrome/browser/extensions/api/tabs/windows_event_router.cc:46:2:
> error: Unsupported
>
> On the other hand, there are few patches maintained
> here https://github.com/kalyankondapally/Chromium-OzoneGBM for Linux
> desktop. Is it worth considering some of these patches for the embedded
> linux?
>
> Thankyou.
>
>
> On Monday, June 22, 2015 at 5:18:21 PM UTC+5:30, Arunprasad Rajkumar wrote:
>
> Try without toolkit views.
>
> e.g.
>
> GYP_DEFINES="$YOUR_GYP_DEFINES *toolkit_views=0*"
>
> ​Thanks & Regards,
> Arun
>
> On 22 June 2015 at 15:52, Santhosh Muralidharan <sant...@gmail.com
> it, send an email to ozone-dev+...@chromium.org <javascript:>.
>
>
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ozone-dev+...@chromium.org
> <mailto:ozone-dev+...@chromium.org>.

Santhosh Muralidharan

unread,
Jun 26, 2015, 5:29:19 AM6/26/15
to ozon...@chromium.org
Thanks Tiago.

based on your inputs, I enabled chrome os support and built chrome (finally, after struggling with lots of build errors.. Phew... )

I'm now trying to launch the browser on my target and I get the following errors. I think this error "Cannot open kernel listener" is because I've enabled chrome os in my build? Is there a way I can tell (in runtime) to chrome to run without chromeos? I tried looking online for more information, but with no luck. Looks like there are no detailed documentation (or did I miss some?).

My platform is embedded linux, with OpenGL ES 2.0 and DRM/KMS. I have all relevant libraries (libdrm, libgbm, libEGL.so.* etc..) installed on the target. The libEGL.so talks to the DRM/KMS.

root:~/chrome_browser# ./chrome --user-data-dir --ozone-platform=gbm --ozone-use-surfaceless 
[1828:1828:0601/111414:ERROR:memory_pressure_monitor_chromeos.cc(117)] Cannot open kernel listener
[1828:1828:0601/111415:ERROR:statistics_provider.cc(156)] Statistics loaded after waiting 0ms. 
[1852:1852:0601/111415:ERROR:gl_surface_egl.cc(486)] eglInitialize Default failed with error EGL_BAD_ALLOC
[1852:1852:0601/111415:ERROR:gl_surface_egl.cc(486)] eglInitialize Default failed with error EGL_BAD_ALLOC
[1852:1852:0601/111415:ERROR:gl_surface_ozone.cc(618)] GLSurfaceEGL::InitializeOneOff failed.
[1852:1852:0601/111415:ERROR:sandbox_linux.cc(345)] InitializeSandbox() called with multiple threads in process gpu-process
[1852:1852:0601/111415:ERROR:gpu_child_thread.cc(163)] Exiting GPU process due to errors during initialization
[1828:1866:0601/111415:ERROR:owner_key_util_impl.cc(29)] Could not get size of /home/root/.config/chromium/stub_owner.key
[1828:1828:0601/111416:FATAL:gpu_process_transport_factory.cc(258)] Unable to create a UI graphics context, and cannot use software compositing on ChromeOS.
Aborted

joe.h...@gmail.com

unread,
Aug 21, 2015, 2:00:58 AM8/21/15
to Ozone-Dev
Hi Santhosh,

Did you resolve your problem and run chrome on your device at last?
I am meeting same problem with you now and dont know where to go.

thanks.

在 2015年6月26日星期五 UTC+8下午5:29:19,Santhosh Muralidharan写道:

Santhosh N M

unread,
Aug 24, 2015, 7:15:38 AM8/24/15
to joe.h...@gmail.com, Ozone-Dev
Hi Joe, I've currently put this on hold. I later found that the libEGL.so library on my platform doesn't support GBM. I'm sorry, couldn't help you further :(

Hope this helps. 

Best Regards,
Santhosh Muralidharan
Bangalore, India.

earw...@gmail.com

unread,
Mar 29, 2016, 1:55:46 AM3/29/16
to Ozone-Dev
hi,
I also found this problem..
Anyone else have solution or something tried?

Thanks

earw...@gmail.com

unread,
Mar 29, 2016, 5:45:28 AM3/29/16
to Ozone-Dev, earw...@gmail.com
2016년 3월 29일 화요일 오후 2시 55분 46초 UTC+9, earw...@gmail.com 님의 말:
It seems, I solved this problem,

If you have same problem, please check first my way.
- i had reference chromium source tree.

--- a/ui/views/accessibility/native_view_accessibility.cc
+++ b/ui/views/accessibility/native_view_accessibility.cc
@@ -5,6 +5,7 @@
#include "ui/views/accessibility/native_view_accessibility.h"

#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/events/event_utils.h"
#include "ui/views/controls/native/native_view_host.h"
@@ -13,12 +14,12 @@

namespace views {

-#if !defined(OS_WIN) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
+#if !defined(PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL)
// static
NativeViewAccessibility* NativeViewAccessibility::Create(View* view) {
return new NativeViewAccessibility(view);
}
-#endif
+#endif // !defined(PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL)
Reply all
Reply to author
Forward
0 new messages