Re: Bug in apgcc when encountering dependencies on non-lib libraries
Scott Pakin <[email protected]> Wed, 11 Mar 2009 15:25:21 -0600
| Newsgroups | gmane.comp.autopackage.devel |
|---|---|
| Organization | Los Alamos National Laboratory |
| Message-ID | <[email protected]> |
Jan Niklas Hasse wrote: > Thanks again for the patch. I applied it in r2555: > http://trac.autopackage.org/changeset/2555 > Keep up the good work! > > On Tue, Mar 10, 2009 at 6:52 PM, Scott Pakin <[email protected]> wrote: >> I just stepped through the code, and it looks like the "objdump: '': >> No such file" error is output when the .a file exists but the .so file >> doesn't. I've attached a patch that outputs a more user-friendly >> warning message in that case. The warning is written to standard >> output for consistency with the APBUILD_NO_STATIC_X warning right >> above it in the code, but, personally, I'd prefer using Perl's warn >> statement to write warning messages to standard error. > > You seem to be right. But I don't know anything about Perl and not > very much about apbuild, so I can't tell you why it was done this way. If you don't mind changing it, you just have to change "print" to "warn" and ensure that warn takes a single string as argument (using "." to concatenate strings instead of "," to separate them). -- Scott --------------------------------------------------------------------- To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected] For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]
apgcc-warn.patch
(text/x-patch, 1 KB)
--- apgcc.OLD 2009-03-11 15:17:55.319284000 -0600
+++ apgcc 2009-03-11 15:18:23.113315000 -0600
@@ -777,7 +777,7 @@
# Create a list of libraries that we want to statically link
$gcc->getSearchPaths(\@_, \@searchPaths);
if (defined $ENV{'APBUILD_NO_STATIC_X'}) {
- print "WARNING: APBUILD_NO_STATIC_X is no longer used because it became the default behaviour.\n";
+ warn "WARNING: APBUILD_NO_STATIC_X is no longer used because it became the default behaviour.\n";
}
if (defined $ENV{'APBUILD_STATIC_X'} && $ENV{'APBUILD_STATIC_X'} eq "1") {
foreach (qw(Xrender Xcursor Xfixes Xi Xinerama Xrandr Xv Xxf86dga Xxf86misc Xxf86vm)) {
@@ -800,7 +800,7 @@
my ($r, $w);
my $abslib = searchLib("lib$lib.so", \@searchPaths);
if (!defined $abslib) {
- print "WARNING: Failed to find lib$lib.so in ", join(":", @searchPaths), ".\n";
+ warn "WARNING: Failed to find lib$lib.so in " . join(":", @searchPaths) . ".\n";
next;
}
my $pid = open2 ($r, $w, 'objdump', '-p', $abslib);