Skip to content

Issues with Ubuntu 20.04 as development host #420

@axel-kah

Description

@axel-kah

I used the latest commit from the main branch and took it for a testdrive on Ubuntu 20.04.

Following the beeware tutorial, taking the docu changes from this PR into accout I ran into two issues. First is probably more of a UX issue, second one is a show stopper.

  1. When installing briefcase into the venv, and when running briefcase dev transient dependencies get installed, like python-slugify, gbulb and pycairo, which are not available as wheels. They get installed successfully eventually because pip automatically falls back to calling setup.py install for each of them, but everytime a big fat, 10-line error message is printend in red color.
(beeware-venv) osboxes@osboxes:~/beeware-tutorial$ python -m pip install --no-cache-dir briefcase
Collecting briefcase
  Downloading briefcase-0.3.0-py2.py3-none-any.whl (71 kB)
     |████████████████████████████████| 71 kB 1.2 MB/s 
[...]
Building wheels for collected packages: python-slugify
  Building wheel for python-slugify (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/osboxes/beeware-tutorial/beeware-venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uzyfkqi4/python-slugify/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uzyfkqi4/python-slugify/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s470wu5x
       cwd: /tmp/pip-install-uzyfkqi4/python-slugify/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for python-slugify
  Running setup.py clean for python-slugify
Failed to build python-slugify
Installing collected packages: smmap, gitdb, GitPython, chardet, idna, urllib3, certifi, requests, MarkupSafe, Jinja2, binaryornot, click, text-unidecode, python-slugify, poyo, six, python-dateutil, arrow, jinja2-time, cookiecutter, toml, briefcase
    Running setup.py install for python-slugify ... done
Successfully installed GitPython-3.1.3 Jinja2-2.11.2 MarkupSafe-1.1.1 arrow-0.15.6 binaryornot-0.4.4 briefcase-0.3.0 certifi-2020.4.5.2 chardet-3.0.4 click-7.1.2 cookiecutter-1.7.2 gitdb-4.0.5 idna-2.9 jinja2-time-0.2.0 poyo-0.5.0 python-dateutil-2.8.1 python-slugify-4.0.0 requests-2.23.0 six-1.15.0 smmap-3.0.4 text-unidecode-1.3 toml-0.10.1 urllib3-1.25.9

When installing wheel into the venv first, those errors never appear.

  1. When executing briefcase run it fails with the following error:
(beeware-dev) osboxes@osboxes:~/beeware-tutorial/helloworld$ briefcase run

[helloworld] Starting app...

Traceback (most recent call last):
  File "/tmp/.mount_Hello_63m7qR/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/tmp/.mount_Hello_63m7qR/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/.mount_Hello_63m7qR/usr/app/helloworld/__main__.py", line 4, in <module>
    main().main_loop()
  File "/tmp/.mount_Hello_63m7qR/usr/app/helloworld/app.py", line 40, in main
    return HelloWorld()
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/toga/app.py", line 208, in __init__
    self.factory = get_platform_factory(factory)
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/toga/platform.py", line 39, in get_platform_factory
    from toga_gtk import factory
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/toga_gtk/factory.py", line 1, in <module>
    from .app import App, DocumentApp, MainWindow
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/toga_gtk/app.py", line 8, in <module>
    import gbulb
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/gbulb/__init__.py", line 1, in <module>
    from .glib_events import *
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/gbulb/glib_events.py", line 12, in <module>
    from gi.repository import GLib, Gio
  File "/tmp/.mount_Hello_63m7qR/usr/app_packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: libffi.so.6: cannot open shared object file: No such file or directory

Unable to start app helloworld.

I attached the full output of the create and build command. Compared the installed libffi packages. In Ubuntu 18.04 it was named libffi5, in 20.04 it's named libffi6. Isn't the whole selling point of AppImages, to be independent of shared libs?

create.log
build.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions