Re: Help with "local" GTK debug version needed.



--- David Neèas (Yeti) <yeti physics muni cz> wrote:

> On Tue, Dec 26, 2006 at 07:52:32AM -0800, Sergei Steshenko wrote:
> > 
> > You can do what you want using my tool (see signature).
> > 
> > You'll just enter a command line like
> > 
> > ~/AppsFromScratch/20061104/bin/build.pl -make_like -check_with_ldd -targets_to_build gtk+
> > 1>build.log 2>&1 &
> 
> (to OP)
> 
> First, if you do this, you are locked in.  The installation
> layout is so scattered that you simply have to use the
> scripts that appsfromscratch installs to be able to compile
> or run anything with the libs you built.  Unfortunately, the
> layout most people want, an alternative Gtk+ stack under a
> signle prefix, does not seem to be possible.

The above statement is more false then true. By DEFAULT every
target is installed in a separate directory, but if you want, you
can add to every target

install_prefix => 'whatever_dir_you_like'

in the 'default_build_data_sub.prl' file or the one you provide on
command line instead of the default one.

> 
> Second, if you do this, you get rebuilt and linked with also
> a random subset of other libraries, not only the one you
> request (for example, it builds zlib and gettext for Gtk+
> but it does not build Xlib).  You can try something like
> `-targets_to_exclude gettext' to manually exclude all the
> libs you want from the system (after manually identifying
> them) -- but maybe this option does something else, because
> if I add it, it attempts to build gettext anyway.

To achieve this you simply comment out dependencies, for example,
if instead of th existing

                cairo =>
                  do{
                    $target_hash_refs{cairo} =
                      {
                      base_urls => ["http://cairographics.org/releases";],

                      tarball_extension => 'tar.gz',

                      major_ver => '1',
                      minor_ver => '2',
                      micro_ver => '4',

                      #make_targets => ['', 'install'],
                      # !!! to check failures !!! (ps, pdf ?) !!!

                      ignore_make_errors =>
                        {
                        check => 1
                        },

                      depends_on =>
                        {
                        targets =>
                          {
                          libpng => $target_hash_refs{libpng},
                          fontconfig => $target_hash_refs{fontconfig}
                          } # targets
                        } # depends_on
                      }
                    }, # do
                       # cairo

you write

                cairo =>
                  do{
                    $target_hash_refs{cairo} =
                      {
                      base_urls => ["http://cairographics.org/releases";],

                      tarball_extension => 'tar.gz',

                      major_ver => '1',
                      minor_ver => '2',
                      micro_ver => '4',

                      #make_targets => ['', 'install'],
                      # !!! to check failures !!! (ps, pdf ?) !!!

                      ignore_make_errors =>
                        {
                        check => 1
                        },

                      depends_on =>
                        {
                        targets =>
                          {
#                          libpng => $target_hash_refs{libpng},
                          fontconfig => $target_hash_refs{fontconfig}
                          } # targets
                        } # depends_on
                      }
                    }, # do
                       # cairo

then 'cairo' will "not" depend on libpng, i.e. will not depend on it from
the point of view of my tool, and 'configure' will try use the one installed
at system level.

But being burnt by the fact that different development libs are (not) instralled
on various systems, like a 'solaris' box to which end user doesn't have root
access and can not install anything, I decided I build everything possible and
breaking system functioning myself. The alternative "X" stuff can render your
system unusable, and that's why I do not build.

> 
> Third, if you do this, you have to hack some perl scripts to
> add arguments to Gtk+'s configure (I suppose you want at
> least something like --enable-debug=yes in a debugging
> version).

Well, I do not know the exact meaning of "hack" in this context - there
is a documented feature in the README file under


13. CONFIGURING TARGETS TO BE BUILT (BUILD DATA HASH) - configure/Makefile.PL.
------------------------------------------------------------------------------

and it clearly shows:
"
                      configure_args => '--enable-gtk2 --enable-unicode',
"


> 
> Fourth -- and this may not apply to you if the script has
> some sort of detection of people who don't like it and it
> works smoothly for others -- the build typically ends with
> some mysterious failure.  For me this time it was
> 
>   ...
>   mv stdint.h-t stdint.h
>   mv stdint.h-t stdint.h
>   mv configmake.h-t configmake.h
>   mv -f alloca.h-t alloca.h
>   mv: cannot stat `stdint.h-t': No such file or directory
>   make[4]: *** [stdint.h] Error 1
>   make[4]: Leaving directory
> `/home/yeti/src/AppsFromScratch/20061104/build/gettext-0.16/gettext-tools/libgettextpo'
>   make[3]: *** [config.h] Error 1
>   make[3]: Leaving directory
> `/home/yeti/src/AppsFromScratch/20061104/build/gettext-0.16/gettext-tools/libgettextpo'
>   make[2]: *** [all-recursive] Error 1
>   make[2]: Leaving directory
> `/home/yeti/src/AppsFromScratch/20061104/build/gettext-0.16/gettext-tools'
>   make[1]: *** [all] Error 2
>   make[1]: Leaving directory
> `/home/yeti/src/AppsFromScratch/20061104/build/gettext-0.16/gettext-tools'
>   make: *** [all-recursive] Error 1
> 

And the above failure is a bug in 'getext' build mechanism - that's because
'make' is run ONLY if 'configure' was successful, and if 'make' fails after
successful 'configure', it a bug in 'cobfigure' BY DEFINITION.

When I have enough energy and time, I file bug reports on such failure,
and they get acknowledged, here is one of the latest ones:

https://sourceforge.net/tracker/?func=detail&atid=100235&aid=1618129&group_id=235
.
> in the build of gettext (that I did not request).
> 
> The last time (with glib) it was
> 
>   ...
>   build.pl :WARNING: will not even try to build 'glib' target because it is not described at the
> top level of build data hash
>   build.pl :INFO: checking targets - $scalar_path=
>   build.pl :INFO: DONE checking targets - $scalar_path=
>   build.pl :INFO: building, if necessary, sane targtes - $scalar_path=
>   build.pl :INFO: DONE building, if necessary, sane targtes $scalar_path=
>   build.pl :INFO: dumping %_targets_to_so_files:
> 
>   {
>   };
>   +++++++++++++++++++++++++++++++++++
>   + build.pl SUCCESSFULLY COMPLETED +
>   +++++++++++++++++++++++++++++++++++
> 
> and nothing was built.

And that is true - 'glib' is described this way:


      'gtk+' =>
        do{
          my $major_ver = '2';
          #my $minor_ver = '8';
          my $minor_ver = '10';

          $target_hash_refs{'gtk+'} =
            {
            base_urls => &{$_gnome_c_urls_sub}
                           (
                           'gtk+',     # $target,
                           $major_ver, # $major_ver,
                           $minor_ver, # $minor_ver
                           ),

            major_ver => $major_ver,
            minor_ver => $minor_ver,
            #micro_ver => '20',
            micro_ver => '6',

            depends_on =>
              {
              targets =>
                {
                libjpeg => $target_hash_refs{libjpeg},
                libtiff => $target_hash_refs{libtiff},
                cups => $target_hash_refs{cups},

                atk =>
                  do{
                    my $major_ver = '1';
                    my $minor_ver = '12';

                    $target_hash_refs{atk} =
                      {
                      base_urls => &{$_gnome_c_urls_sub}
                                     (
                                     'atk',      # $target,
                                     $major_ver, # $major_ver,
                                     $minor_ver  # $minor_ver
                                     ),

                      major_ver => $major_ver,
                      minor_ver => $minor_ver,
                      micro_ver => '1',

                      depends_on =>
                        {
                        targets =>
                          {
                          glib =>
                            do{
                              my $major_ver = '2';
                              my $minor_ver = '12';

                              $target_hash_refs{glib} =
                                {
                                base_urls => &{$_gnome_c_urls_sub}
                                               (
                                               'glib',     # $target,
                                               $major_ver, # $major_ver,
                                               $minor_ver  # $minor_ver
                                               ),

                                major_ver => $major_ver,
                                minor_ver => $minor_ver,
                                micro_ver => '6',

                                depends_on =>
                                  {
                                  targets =>
                                    {
                                    gettext => $target_hash_refs{gettext}
                                    } # targets
                                  } # depends_on
                                };
                              } # do
                                # glib
                          } # targets
                        } # depends_on
                      }
                    }, # do
                       # atk

                cairo =>
                  do{
                    $target_hash_refs{cairo} =
                      {
                      base_urls => ["http://cairographics.org/releases";],

                      tarball_extension => 'tar.gz',

                      major_ver => '1',
                      minor_ver => '2',
                      micro_ver => '4',

                      #make_targets => ['', 'install'],
                      # !!! to check failures !!! (ps, pdf ?) !!!

                      ignore_make_errors =>
                        {
                        check => 1
                        },

                      depends_on =>
                        {
                        targets =>
                          {
                          libpng => $target_hash_refs{libpng},
                          fontconfig => $target_hash_refs{fontconfig}
                          } # targets
                        } # depends_on
                      }
                    }, # do
                       # cairo

                pango =>
                  do{
                    my $major_ver = '1';
                    my $minor_ver = '14';

                    $target_hash_refs{pango} =
                      {
                      base_urls => &{$_gnome_c_urls_sub}
                                     (
                                     'pango',    # $target,
                                     $major_ver, # $major_ver,
                                     $minor_ver  # $minor_ver
                                     ),

                      major_ver => $major_ver,
                      minor_ver => $minor_ver,
                      #micro_ver => '7',
                      micro_ver => '8',

                      pre_make_sub =>
                        sub
                          {
                          my %this_sub_args = @_;

                          ####################
                          foreach my $makefile
                          ####################
                            (
                            split
                              (
                              "\n",
                              `find $this_sub_args{target_build_dir} -name Makefile -type f`
                              )
                            )
                            {
                            my $result =
                            &{$_edit_file_sub}
                              (
                              $info_marker,        # $info_marker,
                              $error_marker,       # $error_marker,
                              $system_wrapper_sub, # $system_wrapper_sub
                              $makefile,           # $file,
                              sub
                                {
                                my ($line) = @_;
                                $line =~ s|^X_LIBS\s*=\s*(\-L/usr/X11R6/lib\s+)|X_LIBS =
-L/usr/lib $1|;
                                $line;
                                }                  # $line_editing_sub
                              );

                            return 1 if $result;
                            } # foreach my $makefile
                          0;
                          },

                      depends_on =>
                        {
                        targets =>
                          {
                          glib => $target_hash_refs{glib},
                          cairo => $target_hash_refs{cairo}
                          }
                        } # depends_on
                      } # pango
                    } # do
                      # pango
                } # targets
              } # depends_on
            } # 'gtk+'
          }, # do
             # 'gtk+'

, and the README file has a part on nested and non-nested target descriptions
under

7.  FOR THE IMPATIENT: FULLY SHOWING TARGET NESTED DEPENDENCIES.
8.  FOR THE IMPATIENT: DESCRIBING DEPENDENCIES USING INTERMEDIATE VARIABLES.

.

I adnit though that I recommended to build 'glib' - I forgot that 'glib'
was not described at top level. Again, slowly, but steadily I transfer the
thing to not use nested target descriptions, so it will be possible to build
any target from command line.

> 
> So, if you want to
> - build a set of libraries of your choice
> - with options of your choice
> - put them all under one alternative prefix
> - have control over the process
> 
> setting the three environment variables and using --prefix
> as Tristan described is a much straightforward way to get
> it.

You are entitled to your opinion.

I dound 'gtk+' build process awfully complicated and bug prone,
so after once building the thing manually, and after building
'wxwidgets' manually I decided to automate the thing.
> 
> Yeti
> 
> 
> P.S.: To Sergei: I really don't do anything beside cleaning
> build/ and install/ and pasting the commands you post to the
> command line.
> 
> 
> --
> Whatever.

If you have a problem, ask me first, like the issue with 'glib'
- I need probably 5 minutes to break the 'gtk+' into separate
non-nested targets.

--Sergei.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 


Applications From Scratch: http://appsfromscratch.berlios.de/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]