IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 18, 2008, 2:25:50 PM (18 years ago)
Author:
eugene
Message:

better testing / messages for linking issues; adding force-build entry to .libs file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pschecklibs

    r19150 r19604  
    22
    33$tagsets = "tagsets";
     4$needdev = 0;
    45
    56# default system library locations
     
    127128    if ($line =~ m|^\s*\#|) { next; }
    128129
    129     ($type, $name, $altnames, $altpaths, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = split (" ", $line);
    130     if (($use_equals ne "Y") && ($use_equals ne "N")) { die "invalid value for use_equals field\n"; }
     130    ($type, $name, $altnames, $altpaths, $tarball, $tardir, $auto_force, $configure_opts, $make_opts, $install_opts) = split (" ", $line);
     131    if (($auto_force ne "Y") && ($auto_force ne "N")) { die "invalid value for auto_force field\n"; }
    131132
    132133    if ((defined $force{lc($name)} or defined $force{'all'}) and lc($tarball) ne "none") {
    133         &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
    134 #       exit 0;
     134        &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
     135        next;
     136    }
     137
     138    if ($build and ($auto_force eq "Y")) {
     139        &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
    135140        next;
    136141    }
     
    147152    }
    148153
     154    if ($auto_force eq "Y") {
     155        print "$name will be built\n";
     156    }
     157
    149158    if ($found) {
    150         print "pass $name ($found)\n";
     159        if ($found eq "runtime-only") {
     160            print "runtime $name ($found)\n";
     161            push @faillibs, "$name";
     162        } else {
     163            print "pass $name ($found)\n";
     164        }
    151165        next;
    152166    } else {
     
    155169    }
    156170
     171    if ($auto_force eq "Y") {
     172        print "$name will be built\n";
     173    }
     174
    157175    if (! $build) { next; }
    158176    if ($type eq "inc") {
     
    160178        # Will attempt to install library.
    161179    }
    162     &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
     180    &buildlib ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts);
    163181}
    164182if ($build) { exit 0; }
     
    172190    print "\n";
    173191    print "you may install them in your local path by re-running pschecklibs with -build\n";
     192
     193    print "*** WARNING *** Some libraries are installed in your system only for runtime use, not for linking.\n";
     194    print " For many systems, it is possible to install the developer version of a library, and this may be safer\n";
     195    print " If you choose to install our version of any of these libraries, please use -force (library) in your psbuild / pschecklibs options\n";
    174196    exit 1;
    175197}
     
    179201
    180202sub buildlib {
    181     my ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = @_;
     203    my ($name, $tarball, $tardir, $configure_opts, $make_opts, $install_opts) = @_;
    182204
    183205    if ($tarball eq "NONE") {
     
    278300        # versions libraries if we find only a .so.N without a matching
    279301        # .so, we link this in the installed libdir
    280         foreach $topdir ( @libpath ) {
    281             foreach $subdir ( @subdirs ) {
    282                 if ($subdir eq ".") {
    283                     $path = $topdir;
    284                 } else {
    285                     $path = "$topdir/$subdir";
    286                 }
    287                 if (! -e $path) { next; }
    288                 @libnames = <$path/$tryname.$dlltype*>;
    289                 if (@libnames > 0) {
    290                     $libname = @libnames[-1];
    291                     # print "making link to numbered .$dlltype library $libdir/$f.$dlltype\n";
    292                     symlink $libname, "$libdir/$f.$dlltype";
    293                     if ($?) { exit 1; }
    294                     return $libname;
    295                 }
    296                 # print "no $path/$tryname.$dlltype*\n";
    297             }
    298         }
     302        # XXX this was probably a mistake to allow some systems to build without supplied libs
     303        if (1) {
     304            foreach $topdir ( @libpath ) {
     305                foreach $subdir ( @subdirs ) {
     306                    if ($subdir eq ".") {
     307                        $path = $topdir;
     308                    } else {
     309                        $path = "$topdir/$subdir";
     310                    }
     311                    if (! -e $path) { next; }
     312                    @libnames = <$path/$tryname.$dlltype*>;
     313                    if (@libnames > 0) {
     314                        $libname = @libnames[-1];
     315                        $needdev = 1;
     316                        # print " *** need developer version of $name\n";
     317                        return "runtime-only";
     318
     319                        # XXX old option: link in existing library
     320                        # symlink $libname, "$libdir/$f.$dlltype";
     321                        # if ($?) { exit 1; }
     322                        # return $libname;
     323                    }
     324                }
     325            }
     326        }
    299327    }
    300328    return 0;
Note: See TracChangeset for help on using the changeset viewer.