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

Bug#175049: marked as done (lintian: please add undefined-symbol-in-library check)



Your message dated Tue, 4 May 2004 17:21:07 +0200
with message-id <20040504152107.GT17082@A-Eskwadraat.nl>
and subject line Bug#175049: lintian: please add undefined-symbol-in-library check
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 2 Jan 2003 16:19:44 +0000
>From md@linux.it Thu Jan 02 10:19:44 2003
Return-path: <md@linux.it>
Received: from attila.bofh.it [213.92.8.2] (postfix)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18U84N-0003xd-00; Thu, 02 Jan 2003 10:19:43 -0600
Received: by attila.bofh.it (Postfix, from userid 10)
	id 1242D5F778; Thu,  2 Jan 2003 17:19:40 +0100 (CET)
Received: by wonderland.linux.it (Postfix/Md, from userid 1001)
	id A2E8E33BEC; Thu,  2 Jan 2003 17:19:32 +0100 (CET)
From: Marco d'Itri <md@Linux.IT>
Subject: lintian: please add undefined-symbol-in-library check
To: submit@bugs.debian.org
X-Mailer: bug 3.3.10.2
Message-Id: <20030102161932.A2E8E33BEC@wonderland.linux.it>
Date: Thu,  2 Jan 2003 17:19:32 +0100 (CET)
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=0.1 required=5.0
	tests=SPAM_PHRASE_03_05
	version=2.41
X-Spam-Level: 

Package: lintian
Version: 1.22.4
Severity: wishlist

A few minor things are missing, but this should be enough to show you
how this should work.


#!/usr/bin/perl -w
# binaries -- lintian check script

# Copyright (C) 1998 Christian Schwarz and Richard Braakman
# Copyright (C) 2003 Marco d'Itri <md@linux.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, you can find it on the World Wide
# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.

use strict;

($#ARGV == 1) or fail("syntax: binaries <pkg> <type>");
my $pkg = shift;
my $type = shift;

my $arch;

# read architecture file
if (open(IN,"fields/architecture")) {
    chop($arch = <IN>);
    close(IN);
} else {
    # we cannot do anything without knowing the architecture
    exit 0;
}

# FIXME this check must be skipped if the package is for a different arch

my %dynamic_linker = (
	alpha	=> '/lib/ld-linux.so.2',
	arm	=> '/lib/ld-linux.so.2',
	cris	=> '/lib/ld.so.1',
	i386	=> '/lib/ld-linux.so.2',
	ia64	=> '/lib/ld-linux-ia64.so.2',
	ppc64	=> '/lib64/ld64.so.1',
	powerpc	=> '/lib/ld.so.1',
	s390	=> '/lib/ld.so.1',
	s390x	=> '/lib/ld64.so.1',
	sh	=> '/lib/ld-linux.so.2',
	sparc	=> '/lib/ld-linux.so.2',
	sparc64	=> '/lib64/ld-linux.so.2',
	x86_64	=> '/lib64/ld-linux-x86-64.so.2',
);

$ENV{LD_TRACE_LOADED_OBJECTS}= '1';
$ENV{LD_BIND_NOW} = '1';
$ENV{LD_TRACE_PRELINKING} = 't';

# FIXME add --library-path pointing to directories inside the package
my $libspath;

# FIXME this check must be run on all libraries in the package
foreach my $file ( ) {
    open(IN, "$dynamic_linker{$arch} --library-path=$libspath $file|")
	or fail("cannot run dynamic linker for $type package $pkg");
    while (<IN>) {
	chop;

	if (m/^undefined symbol: (\S+)\s+\((\S+)\)$/o) {
	    print "E: $pkg $type: undefined-symbol-in-library $1 (in $2)\n";
	}
    }
    close(IN);
}

exit 0;

# -----------------------------------

sub fail {
    if ($_[0]) {
	print STDERR "internal error: $_[0]\n";
    } elsif ($!) {
	print STDERR "internal error: $!\n";
    } else {
	print STDERR "internal error.\n";
    }
    exit 1;
}


---------------------------------------
Received: (at 175049-done) by bugs.debian.org; 4 May 2004 15:21:08 +0000
>From jeroen@wolffelaar.nl Tue May 04 08:21:08 2004
Return-path: <jeroen@wolffelaar.nl>
Received: from a-eskwadraat.nl [131.211.34.218] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BL1jI-0001R0-00; Tue, 04 May 2004 08:21:08 -0700
Received: from jeroen by A-Eskwadraat.nl with local (Exim 3.35 #1 (Debian))
	id 1BL1jH-0007f5-00
	for <175049-done@bugs.debian.org>; Tue, 04 May 2004 17:21:07 +0200
Date: Tue, 4 May 2004 17:21:07 +0200
To: 175049-done@bugs.debian.org
Subject: Re: Bug#175049: lintian: please add undefined-symbol-in-library check
Message-ID: <20040504152107.GT17082@A-Eskwadraat.nl>
References: <20030102161932.A2E8E33BEC@wonderland.linux.it> <[🔎] 20040504145141.GA3490@wolffelaar.nl> <[🔎] 20040504145339.GA8410@wonderland.linux.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] 20040504145339.GA8410@wonderland.linux.it>
User-Agent: Mutt/1.3.28i
X-Habeas-SWE-1: winter into spring
X-Habeas-SWE-2: brightly anticipated
X-Habeas-SWE-3: like Habeas SWE (tm)
X-Habeas-SWE-4: Copyright 2002 Habeas (tm)
X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this
X-Habeas-SWE-6: email in exchange for a license for this Habeas
X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant
X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this
X-Habeas-SWE-9: mark in spam to <http://www.habeas.com/report/>.
From: Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
Delivered-To: 175049-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

On Tue, May 04, 2004 at 04:53:39PM +0200, Marco d'Itri wrote:
> On May 04, Jeroen van Wolffelaar <jeroen@wolffelaar.nl> wrote:
> > - Doesn't this only work on systems where all depends are satisfied? Or
> What do you mean?

Explained in IRC: ld's out will depend on which packages you happen to
have installed, and this is a showstopper for this wishlist to be
implemented.

--Jeroen

-- 
Jeroen van Wolffelaar
Jeroen@wolffelaar.nl (also for Jabber & MSN; ICQ: 33944357)
http://Jeroen.A-Eskwadraat.nl



Reply to: