help-octave
[Top][All Lists]
Advanced

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

Re: Octave 3.0 successfully built


From: Sergei Steshenko
Subject: Re: Octave 3.0 successfully built
Date: Sun, 6 Jan 2008 13:06:32 -0800 (PST)

--- "John W. Eaton" <address@hidden> wrote:

> On  6-Jan-2008, Sergei Steshenko wrote:
> 
> | 
> | --- "John W. Eaton" <address@hidden> wrote:
> | 
> | > On  5-Jan-2008, Jordi GutiƩrrez Hermoso wrote:
> | > 
> | > | Yes it's messy, and I see how your tool for chasing down dependencies
> | > | could be useful, but we're aiming at something different here.
> | > 
> | > But even then, Sergei seems to be taking something that is inherently
> | > recursive and flattening it out for no good reason.
> | > 
> | > jwe
> | > 
> | 
> | Flattening ????????????????????????????????????????????
> 
> | Did you have a look at once attached octave_dependencies.prl.gz ?
> 
> Yes.  I understand that your information is hierarchical in some
> sense, but you are storing it in a non-optimal way.  Do you have
> similar files for all the targets you build, or do you actually store
> the dependency information in some other form?  If so, then why would
> you ever need to generate the complete list of dependency information
> for a given target (i.e., by joining all the immediate dependency sets
> together in one file)?  It seems to me that the complete list would
> never be needed all at once.  Instead, you would only need to store
> (and access) the immediate dependencies for each target and let some
> program deal with which dependencies are needed at a given point in
> the build process. I would expect such a build process to be
> recursive, so at any given point, only the immediate dependencies of a
> given target would be needed.
> 
> jwe
> 

The file I attached was generated upon request - my own one.

My expects full tree, but does no require this from end user.

for example, 'octave' is described this way:

"
      octave =>
        do{
          my $major_ver = '3';
          my $minor_ver = '0';
          my $micro_ver = '0';

          $shadow_targets_hash_refs{octave} =
            {
            major_ver => $major_ver,
            minor_ver => $minor_ver,
            micro_ver => $micro_ver,

            base_urls =>
              [
              'ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave',
              'ftp://neacm.fe.up.pt/pub/octave',
              'ftp://ftp.octave.org/pub/octave/bleeding-edge'
              ],

            configure_args =>
              do{
                my $lapack_major_ver = 
$shadow_targets_hash_refs{lapack}{major_ver};
                my $lapack_minor_ver = 
$shadow_targets_hash_refs{lapack}{minor_ver};
                my $lapack_micro_ver = 
$shadow_targets_hash_refs{lapack}{micro_ver};

                my $lapack_install_prefix =
                exists $shadow_targets_hash_refs{lapack}{install_prefix}
                ? $shadow_targets_hash_refs{lapack}{install_prefix}
                :
"${$cmdline_args_hash_ref}{install_prefix}/lapack-$lapack_major_ver.$lapack_minor_ver.$lapack_micro_ver"
                ;
                my $lapack = "$lapack_install_prefix/lib/lapack_LINUX.a";

                my $atlas_native_major_ver = 
$shadow_targets_hash_refs{atlas_native}{major_ver};
                my $atlas_native_minor_ver = 
$shadow_targets_hash_refs{atlas_native}{minor_ver};
                my $atlas_native_micro_ver = 
$shadow_targets_hash_refs{atlas_native}{micro_ver};

                my $atlas_native_install_prefix =
                exists $shadow_targets_hash_refs{atlas_native}{install_prefix}
                ? $shadow_targets_hash_refs{atlas_native}{install_prefix}
                :
"${$cmdline_args_hash_ref}{install_prefix}/atlas$atlas_native_major_ver.$atlas_native_minor_ver.$atlas_native_micro_ver"
                ;
                my $atlas = "$atlas_native_install_prefix/lib/libatlas.a";
                my $lapack_atlas = 
"$atlas_native_install_prefix/lib/liblapack.a";
                my $blas_atlas = 
"$atlas_native_install_prefix/lib/libf77blas.a";

                my $flags = '-march=native -mtune=native -mfpmath=sse,387';
                #"--enable-shared --enable-dl --enable-static
--with-blas=$shadow_targets_hash_refs{blas_generic}{install_prefix}/lib/blas_LINUX.a
--with-lapack=$lapack",
                "LDFLAGS=\"\$LDFLAGS -lmetis\" CFLAGS='$flags' 
CXXFLAGS='$flags' --enable-shared
--enable-dl --enable-static --with-blas=$blas_atlas 
--with-lapack=$lapack_atlas",
                },

            depends_on =>
              {
              targets =>
                {
                blas_generic => $shadow_targets_hash_refs{blas_generic},
                lapack => $shadow_targets_hash_refs{lapack},
                atlas_native => $shadow_targets_hash_refs{atlas_native},
                gnuplot => $shadow_targets_hash_refs{gnuplot},
                fftw3_sse2 => $shadow_targets_hash_refs{fftw3_sse2},
                gcc4 => $shadow_targets_hash_refs{gcc4},
                curl => $shadow_targets_hash_refs{curl},
                glpk => $shadow_targets_hash_refs{glpk},
                pcre => $shadow_targets_hash_refs{pcre},
                hdf5 => $shadow_targets_hash_refs{hdf5},
                CHOLMOD => $shadow_targets_hash_refs{CHOLMOD},
                UMFPACK => $shadow_targets_hash_refs{UMFPACK},
                CXSparse => $shadow_targets_hash_refs{CXSparse},
                qhull => $shadow_targets_hash_refs{qhull}
                }
              },

#            ignore_make_errors =>
#              {
#              check => 1
#              }
            }
          }, # do
             # octave
"

- please pay attention to existence of $shadow_targets_hash_refs items.

When the description file is being require'd in Perl, full tree is built.

This is because every target is "registered" in the %shadow_targets_hash_refs.

The file I once attached ("octave_dependencies.prl.gz") is processed and dumped
out full tree.

For a change, but for no good reason (simply didn't have time to transform this
piece of code) 'gtk+' is described this way:

"
      'gtk+' =>
        do{
          my $major_ver = '2';
          my $minor_ver = '12';

          $shadow_targets_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 => '3',
            

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

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

                    $shadow_targets_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 => '0',

                      depends_on =>
                        {
                        targets =>
                          {
                          glib => $shadow_targets_hash_refs{glib}
                          } # targets
                        } # depends_on
                      }
                    }, # do
                       # atk

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

                      tarball_extension => 'tar.gz',

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

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

                      # this is really strange, but the subroutine below is 
needed for
                      # for 64 bits RHEL4, though not needed on 32 bits 
systems, though
                      # it works fine on, for example 32 bits SUSE 10.2
                      pre_configure_sub =>
                        sub
                          {
                          my %this_sub_args = @_;

                          my $pkg_config;

                          #######################################
                          foreach my $dir(split(':', $ENV{PATH}))
                          #######################################
                            {
                            $pkg_config = "$dir/pkg-config";
                            last if(-x $pkg_config);
                            } # foreach my $dir(split(':', $ENV{PATH}))

                          unless($pkg_config)
                            {
                            warn "$error_marker pkg-config not found in 
\$PATH\n";
                            return 1;
                            }

                          &{$_edit_file_sub}
                            (
                            $info_marker,                                 # 
$info_marker,
                            $error_marker,                                # 
$error_marker,
                            $system_wrapper_sub,                          # 
$system_wrapper_sub,
                            "$this_sub_args{target_build_dir}/configure", # 
$file,
                            sub
                              {
                              my ($line) = @_;

                              $line =~ s|\$PKG_CONFIG\b|$pkg_config|g;

                              $line;
                              }                                           # 
$line_editing_sub
                            );
                          },

                      ignore_make_errors =>
                        {
                        check => 1
                        },

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

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

                    $shadow_targets_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 => '3',

                      #configure_args => '--enable-gtk-doc',

                      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 => $shadow_targets_hash_refs{glib},
                          cairo => $shadow_targets_hash_refs{cairo}
                          }
                        } # depends_on
                      } # pango
                    } # do
                      # pango
                } # targets
              } # depends_on
            } # 'gtk+'
          }, # do
             # 'gtk+'
"

- i.e. a mixture of "flat" and fully hierarchical description.

I emphasize it - it's not that 'gtk+' and/or my tool needs it, it's for 
historical
reasons.

Perl is flexible enough to allow to construct the needed full tree whatever way 
one
likes.

Regards,
  Sergei.

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


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]