DynamicDevices / meta-mono

A Yocto / OpenEmbedded layer providing Mono and dotNet support
MIT License
15 stars 26 forks source link

Mono image tests fail #58

Closed ajlennon closed 3 years ago

ajlennon commented 3 years ago

I suspect the assembly locations aren't properly patched in the current Mono build

@see http://jenkins.dynamicdevices.co.uk:8080/job/yocto/ARCH=x86,BRANCH=thud/21/console

+ env MACHINE=qemux86 DL_DIR=/var/lib/jenkins/workspace/downloads bitbake core-image-mono -c testimage
Loading cache...done.
Loaded 2271 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "i586-poky-linux"
MACHINE              = "qemux86"
DISTRO               = "poky"
DISTRO_VERSION       = "2.6.4"
TUNE_FEATURES        = "m32 i586"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "thud:e52122a3e6912575ff401a4af6ac1bf3070092bc"
meta-mono            = "HEAD:bacdf4933a38558bcb479a3c18e735e5ff50bf25"
meta-oe              = "thud:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93"

Initialising tasks...done.
Sstate summary: Wanted 0 Found 0 Missed 0 Current 81 (0% match, 100% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 656 of 656 (/var/lib/jenkins/workspace/yocto/ARCH/x86/BRANCH/thud/meta-mono/recipes-mono/images/core-image-mono.bb:do_testimage)
NOTE: recipe core-image-mono-1.0-r0: task do_testimage: Started
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/yocto/ARCH/x86/BRANCH/thud/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/var/lib/jenkins/workspace/yocto/ARCH/x86/BRANCH/thud/meta-mono/lib/oeqa/runtime/cases/mono.py", line 47, in test_executable_compile_and_run_winform
    self.assertEqual(status, 0, msg=msg)
AssertionError: 1 != 0 : running compiled file failed, output: X does not support your locale

Unhandled Exception:
System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (System.IntPtr drawable, System.IntPtr display) [0x00000] in <1cc60025c69b410c9d0217bcfa69c9de>:0 
  at System.Drawing.Graphics.FromHwnd (System.IntPtr hwnd) [0x000ef] in <1cc60025c69b410c9d0217bcfa69c9de>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00010] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.Form..ctor () [0x0001e] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at HelloWorldForm.Form1..ctor () [0x00007] in <de5b62c933284645a4b0711428b57a82>:0 
  at (wrapper remoting-invoke-with-check) HelloWorldForm.Form1..ctor()
  at HelloWorldForm.Program.Main () [0x0000b] in <de5b62c933284645a4b0711428b57a82>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdipCreateFromXDrawable_linux(intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (System.IntPtr drawable, System.IntPtr display) [0x00000] in <1cc60025c69b410c9d0217bcfa69c9de>:0 
  at System.Drawing.Graphics.FromHwnd (System.IntPtr hwnd) [0x000ef] in <1cc60025c69b410c9d0217bcfa69c9de>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00010] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at System.Windows.Forms.Form..ctor () [0x0001e] in <f6645d69f7a748b68f3b85b0d8c67988>:0 
  at HelloWorldForm.Form1..ctor () [0x00007] in <de5b62c933284645a4b0711428b57a82>:0 
  at (wrapper remoting-invoke-with-check) HelloWorldForm.Form1..ctor()
  at HelloWorldForm.Program.Main () [0x0000b] in <de5b62c933284645a4b0711428b57a82>:0
ajlennon commented 3 years ago

Any thoughts @zboszor ? This seems to relate to the 6.12 support?

zboszor commented 3 years ago

@ajlennon Can you try with setting the preferred version to 6.10 temporarily?

zboszor commented 3 years ago

This is a build issue in libgdiplus. The presence of GdipCreateFromXDrawable_linux is protected by:

#if defined(HAVE_X11) && CAIRO_HAS_XLIB_SURFACE
...
#endif

The former is not defined, the latter is defined as 1 by the Cairo headers.

zboszor commented 3 years ago

And the bug is in configure.ac in libgdiplus:

AC_ARG_WITH(x11, 
        [AC_HELP_STRING([--without-x11], [Disable X11 support])],
        [disable_x11=yes])

With this, both --with-x11 and --without-x11 disables X11 support. Workaround is coming right up.

zboszor commented 3 years ago

PR #59 fixed the issue for me, just by rebuilding and installing libgdiplus0.

ajlennon commented 3 years ago

So.... I've had a successful built on Jenkins finally (thud, x86, 6.12)

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/ARCH=x86,BRANCH=thud,VERSION=6.12.0.107/32/console

However other builds are still failing. Going to look at why, then gradually add in the other Yocto releases

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/

ajlennon commented 3 years ago

OK! So the thud x86 builds are OK. The ARM builds are failing though for 6.10 and 6.12

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/ARCH=arm,BRANCH=thud,VERSION=6.10.0.104/33/console

ajlennon commented 3 years ago

ARM 6.8 is OK so it looks like the problems came in with 6.10

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/

ajlennon commented 3 years ago

Some good news. Warrior builds 6.10 for ARM so perhaps thud is just too old

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/ARCH=arm,BRANCH=warrior,VERSION=6.10.0.104/35/console

ajlennon commented 3 years ago

Pretty nice. Will add in dunfell and gatesgarth. Also will add in sumo for you @zboszor

image

I think we could do with replacing the core-mono-image I use for build & test with an image with recipes that people also care about, like msbuild, test-mono-image or some such.

Also it would be good to have more test cases for things like msbuld. Fancy doing a simple msbuild test case @zboszor ?

e.g. https://github.com/DynamicDevices/meta-mono/blob/master/lib/oeqa/runtime/cases/mono.py

ajlennon commented 3 years ago

There's something basic stopping the sumo builds running - Python version?

Any thoughts @zboszor ?

http://jenkins.dynamicdevices.co.uk:8080/job/yocto/

zboszor commented 3 years ago

I use CentOS 7 as the buildhost and I have python3 (3.6.8) installed. /usr/bin/python is still symlinked to python2 (2.7.5).

ajlennon commented 3 years ago

The build box is Ubuntu 18.04.5 with python2 default and python3 installed

root@jenkins:~# python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
root@jenkins:~# python3
Python 3.6.9 (default, Oct  8 2020, 12:12:24) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
ajlennon commented 3 years ago

OK I am pretty happy with the build matrix now so closing this issue

image