[Sugar-devel] Toolkit Installation Sugar v0.113

James Cameron quozl at laptop.org
Fri May 17 03:07:29 EDT 2019


It is a wicked problem.  Here are my thoughts;

1.  there are three temporal scopes of dependency; build time, run
time, and those for downloaded activities,

2.  our activity bundle specification doesn't list dependencies, so we
had early assumptions about what would be available,

3.  some of the dependencies are listed in old documentation on our
Wiki, such as;

https://wiki.sugarlabs.org/go/0.96/Platform_Components
https://wiki.sugarlabs.org/go/Sugar_Platform_Stack
https://wiki.sugarlabs.org/go/Sugar_System_Stack

4.  very few people need to know the dependencies, because most people
install the distribution packages, or install Fedora SoaS where all
the work is already done; this can be verified by seeing how
infrequently dependency related problems are reported; those that need
the dependencies in detail should have the knowledge and skill to
resolve them using tools,

5.  the Sugar and Toolkit dependencies have not changed much for a
long time, although the work you are doing will change that,

6.  package dependencies are tracked by the Fedora and Debian
developers who package Sugar, often using tools that detect object
libraries linked to executables, or static analysis of imports.  These
developers do the most toward maintaining a list of dependencies, and
it is stored in packaging metadata,

7.  package dependencies are not the same between our supported
distributions of Fedora and Debian, because of different standards in
naming packages,

8.  some of the package names are very strange and non-intuitive to
the outsider; e.g. the gir* packages, for the gi.repository imports,

9.  some of the apparent changes to dependencies occur because of
package name changes in Fedora and Debian, which are not our direct
concern and not in our control,

10.  some dependencies are in the platform components list only
because an activity once required them, but since then the activity is
broken, unmaintained, or the dependency removed after a port,

11.  dependencies of distribution packages are a subset of the
dependencies of the whole Sugar platform stack,

12.  packagers will often package a new release of Sugar and not
notice the new dependency, and not test, in which case Sugar will fail
to start, and some user has to notice and report a bug to the
distribution,

So I agree, I don't think mentioning them all in the documentation
will be a good idea; mainly because of how much work would be required
and how much benefit there would be from that work.

I welcome thoughts of others though, especially anybody who might want
to maintain the data.

On Fri, May 17, 2019 at 10:13:41AM +0530, ANIKET MATHUR wrote:
> Thanks. James.
> Agreed, there can be a number of runtime dependencies that the user has to
> install. I don't think mentioning them all in the documentation
> will be a good idea. What do you think?
> 
> On Thu, May 16, 2019 at 9:31 AM James Cameron <[1]quozl at laptop.org> wrote:
> 
>     Thanks for testing, Aniket.
> 
>     Because 0.113 introduces a dependency on Six for the first time, the
>     method of resolving dependencies in the instructions is out of date.
> 
>     I've added
>     [2]https://github.com/sugarlabs/sugar/pull/829/commits/
>     97d1ef60b65a0fffe52ec4070944e2b03fe56ac2
>     to the pull request.
> 
>     Yes, you are correct that dependencies are not added during build,
>     this is something you may have to do yourself.
> 
>     For instance, after you've built Sugar, there are a set of run-time
>     dependencies to install.  I'm working on refining the instructions
>     some more.  Let me know how you go.
> 
>     On Thu, May 16, 2019 at 09:23:08AM +0530, ANIKET MATHUR wrote:
>     > hey,
>     > I tested the changes that James made.
>     > I started with a fresh Ubuntu 18.04 VM. Cloned artwork, datastore,
>     > toolkit-gtk3, and sugar.
>     > Applied his patch to toolkit-gtk3 and then followed the native procedure
>     in the
>     > documentation considering his changes.
>     > I installed the toolkit for both python2 and python3.
>     > But when I run sugar from the command line I got an import error 
>     > "import six
>     > "ImportError:No module named six"
>     > I am not sure why I got this error, do the dependencies and libraries
>     used by
>     > python3 do not get installed when the toolkit for python 3 is built?
>     > Please help.
>     > Thanks!
>     >
>     > On Wed, May 15, 2019 at 1:49 PM James Cameron <[1][3]quozl at laptop.org>
>     wrote:
>     >
>     >     Thanks!
>     >
>     >     I've proposed a pull request to let the caller specify the Python
>     >     version, and a draft pull request documenting how to build for both
>     >     versions.
>     >
>     >     [2][4]https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/411
>     >     [3][5]https://github.com/sugarlabs/sugar/pull/829
>     >
>     >     Aniket, when you say v0.113 this means you are using either git tag
>     >     v0.113 (i.e. e30b73f) or tarball.  Seems unlikely you are doing that,
>     >     but instead you would be using HEAD of master branch instead.  Is my
>     >     guess right?
>     >
>     >     Regarding the segmentation fault, please check
>     >     .sugar/default/logs/shell.log for any details, or run within gdb and
>     >     capture a backtrace of all threads.
>     >
>     >     On Wed, May 15, 2019 at 01:31:23PM +0530, ANIKET MATHUR wrote:
>     >     > Regards,
>     >     > I agree with, James. What I think is that since [1]this pr is not
>     yet
>     >     merged
>     >     > into master, sugar requires python 2, 
>     >     > and the way I was installing Sugar builds the toolkit for Python 3.
>     So I
>     >     first
>     >     > installed Sugar from sucrose and then installed the toolkit-gtk3
>     v0.113
>     >     by
>     >     > hand.
>     >     > Doing this I am able to test ported activities through the command
>     line
>     >     using
>     >     > Ubuntu 18.04 terminal, but opening Sugar home view causes
>     "Segmentation
>     >     fault"
>     >     > with a warning "python2.7 has stopped unexpectedly". I am not yet
>     able to
>     >     > figure out the reason for this.
>     >     >
>     >     > Regarding the Python version in [2][4][6]configure.ac, I think that
>     the
>     >     caller should
>     >     > be allowed to specify the version or alternatively since we are
>     porting
>     >     to six,
>     >     > a method building for both python2 and python3 would be great.
>     >     >
>     >     > I don't expect myself to be 100 percent right and expect to be
>     corrected
>     >     > wherever required.
>     >     >
>     >     > Thanks a lot, everyone. ☺
>     >     >
>     >     > On Wed, May 15, 2019 at 3:17 AM James Cameron <[3][5][7]
>     quozl at laptop.org>
>     >     wrote:
>     >     >
>     >     >     G'day Aniket,
>     >     >
>     >     >     If you were using the native sugar build method, then you are
>     using
>     >     >     HEAD, which contains all patches since 0.113.  Don't try to
>     apply the
>     >     >     patch that Alex pointed out, as it is already applied.
>     >     >
>     >     >     The error message "ImportError: No module named sugar3" is
>     caused by
>     >     >     not installing the Toolkit for Python 2.
>     >     >
>     >     >     Sugar 0.113 requires Python 2.
>     >     >
>     >     >     Toolkit by default installs for Python 3.
>     >     >
>     >     >     You can verify this is the situation by testing the import by
>     hand
>     >     >     using different versions of Python;
>     >     >
>     >     >     python3 -c 'import sugar3'  # expect pass
>     >     >
>     >     >     python2 -c 'import sugar3'  # expect fail
>     >     >
>     >     >     You'll find in [4][6][8]configure.ac where the Python version
>     is chosen.
>     >     >
>     >     >     [5][7][9]https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/
>     master/
>     >     [10]configure.ac
>     >     >     #L18
>     >     >
>     >     >     Perhaps that line should allow the caller to specify the
>     version.
>     >     >
>     >     >     What do you think?
>     >     >
>     >     >     On Tue, May 14, 2019 at 04:42:16PM +0530, ANIKET MATHUR wrote:
>     >     >     > Greetings everyone,
>     >     >     >
>     >     >     > I was installing Sugar v0.113 using the Native Sugar build
>     method 
>     >     [1]
>     >     >     here. I
>     >     >     > was using Ubuntu 18.10. After installation, on running Sugar
>     I
>     >     received
>     >     >     the
>     >     >     > error message "ImportError: No module named sugar3". Need
>     help with
>     >     a
>     >     >     couple of
>     >     >     > questions 
>     >     >     > 1) Is there a need to have a build of the older version for
>     v0.113
>     >     to
>     >     >     work
>     >     >     > properly?
>     >     >     > (never paid attention to that before).
>     >     >     >  2) What is the correct procedure for installing v0.113?
>     >     >     > Thanks!  
>     >     >     >
>     >     >     > References:
>     >     >     >
>     >     >     > [1] [6][8][11]https://github.com/sugarlabs/sugar/blob/master/
>     docs/
>     >     >     development-environment.md
>     >     >
>     >     >     > _______________________________________________
>     >     >     > Sugar-devel mailing list
>     >     >     > [7][9][12]Sugar-devel at lists.sugarlabs.org
>     >     >     > [8][10][13]http://lists.sugarlabs.org/listinfo/sugar-devel
>     >     >
>     >     >     --
>     >     >     James Cameron
>     >     >     [9][11][14]http://quozl.netrek.org/
>     >     >
>     >     > References:
>     >     >
>     >     > [1] [12][15]https://github.com/sugarlabs/sugar/pull/805
>     >     > [2] [13][16]http://configure.ac/
>     >     > [3] mailto:[14][17]quozl at laptop.org
>     >     > [4] [15][18]http://configure.ac/
>     >     > [5] [16][19]https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/
>     master/
>     >     [20]configure.ac#L18
>     >     > [6] [17][21]https://github.com/sugarlabs/sugar/blob/master/docs/
>     >     development-environment.md
>     >     > [7] mailto:[18][22]Sugar-devel at lists.sugarlabs.org
>     >     > [8] [19][23]http://lists.sugarlabs.org/listinfo/sugar-devel
>     >     > [9] [20][24]http://quozl.netrek.org/
>     >
>     >     --
>     >     James Cameron
>     >     [21][25]http://quozl.netrek.org/
>     >
>     > References:
>     >
>     > [1] mailto:[26]quozl at laptop.org
>     > [2] [27]https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/411
>     > [3] [28]https://github.com/sugarlabs/sugar/pull/829
>     > [4] [29]http://configure.ac/
>     > [5] mailto:[30]quozl at laptop.org
>     > [6] [31]http://configure.ac/
>     > [7] [32]https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/
>     configure.ac
>     > [8] [33]https://github.com/sugarlabs/sugar/blob/master/docs/
>     > [9] mailto:[34]Sugar-devel at lists.sugarlabs.org
>     > [10] [35]http://lists.sugarlabs.org/listinfo/sugar-devel
>     > [11] [36]http://quozl.netrek.org/
>     > [12] [37]https://github.com/sugarlabs/sugar/pull/805
>     > [13] [38]http://configure.ac/
>     > [14] mailto:[39]quozl at laptop.org
>     > [15] [40]http://configure.ac/
>     > [16] [41]https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/
>     configure.ac#L18
>     > [17] [42]https://github.com/sugarlabs/sugar/blob/master/docs/
>     development-environment.md
>     > [18] mailto:[43]Sugar-devel at lists.sugarlabs.org
>     > [19] [44]http://lists.sugarlabs.org/listinfo/sugar-devel
>     > [20] [45]http://quozl.netrek.org/
>     > [21] [46]http://quozl.netrek.org/
> 
>     > _______________________________________________
>     > Sugar-devel mailing list
>     > [47]Sugar-devel at lists.sugarlabs.org
>     > [48]http://lists.sugarlabs.org/listinfo/sugar-devel
> 
>     --
>     James Cameron
>     [49]http://quozl.netrek.org/
> 
> References:
> 
> [1] mailto:quozl at laptop.org
> [2] https://github.com/sugarlabs/sugar/pull/829/commits/97d1ef60b65a0fffe52ec4070944e2b03fe56ac2
> [3] mailto:quozl at laptop.org
> [4] https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/411
> [5] https://github.com/sugarlabs/sugar/pull/829
> [6] http://configure.ac/
> [7] mailto:quozl at laptop.org
> [8] http://configure.ac/
> [9] https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/
> [10] http://configure.ac/
> [11] https://github.com/sugarlabs/sugar/blob/master/docs/
> [12] mailto:Sugar-devel at lists.sugarlabs.org
> [13] http://lists.sugarlabs.org/listinfo/sugar-devel
> [14] http://quozl.netrek.org/
> [15] https://github.com/sugarlabs/sugar/pull/805
> [16] http://configure.ac/
> [17] mailto:quozl at laptop.org
> [18] http://configure.ac/
> [19] https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/
> [20] http://configure.ac/#L18
> [21] https://github.com/sugarlabs/sugar/blob/master/docs/
> [22] mailto:Sugar-devel at lists.sugarlabs.org
> [23] http://lists.sugarlabs.org/listinfo/sugar-devel
> [24] http://quozl.netrek.org/
> [25] http://quozl.netrek.org/
> [26] mailto:quozl at laptop.org
> [27] https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/411
> [28] https://github.com/sugarlabs/sugar/pull/829
> [29] http://configure.ac/
> [30] mailto:quozl at laptop.org
> [31] http://configure.ac/
> [32] https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/configure.ac
> [33] https://github.com/sugarlabs/sugar/blob/master/docs/
> [34] mailto:Sugar-devel at lists.sugarlabs.org
> [35] http://lists.sugarlabs.org/listinfo/sugar-devel
> [36] http://quozl.netrek.org/
> [37] https://github.com/sugarlabs/sugar/pull/805
> [38] http://configure.ac/
> [39] mailto:quozl at laptop.org
> [40] http://configure.ac/
> [41] https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/configure.ac#L18
> [42] https://github.com/sugarlabs/sugar/blob/master/docs/development-environment.md
> [43] mailto:Sugar-devel at lists.sugarlabs.org
> [44] http://lists.sugarlabs.org/listinfo/sugar-devel
> [45] http://quozl.netrek.org/
> [46] http://quozl.netrek.org/
> [47] mailto:Sugar-devel at lists.sugarlabs.org
> [48] http://lists.sugarlabs.org/listinfo/sugar-devel
> [49] http://quozl.netrek.org/

> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list