pkgsrc-Users archive

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

Re: Package failure of x11/py-qt5 (pkgsrc-2018Q1)


On Fri 13 Apr 2018 at 22:39:08 +0200, Rhialto wrote:
> In a pkg_comp1 chroot of NetBSD/amd64 7.0.
> On Sat 07 Apr 2018 at 22:28:35 +0200, Rhialto wrote:
> > ERROR: The following files are in the PLIST but not in /pkg_comp/obj/pkgsrc/x11/py-qt5/default/.destdir/usr/pkg:
> > ERROR:         /pkg_comp/obj/pkgsrc/x11/py-qt5/default/.destdir/usr/pkg/lib/python2.7/site-packages/PyQt5/
> > ERROR:         /pkg_comp/obj/pkgsrc/x11/py-qt5/default/.destdir/usr/pkg/lib/python2.7/site-packages/PyQt5/
> > *** Error code 1
> Early during the build, it fails as below.
> Adding GCC_REQD += 4.9 seemed to help.

Well, no.

When running calibre I get this:

pkg_comp:default70.conf# calibre
Traceback (most recent call last):
  File "/usr/pkg/bin/calibre", line 20, in <module>
  File "/usr/pkg/lib/calibre/calibre/", line 73, in calibre
    from calibre.gui2.main import main
  File "/usr/pkg/lib/calibre/calibre/gui2/", line 7, in <module>
    from PyQt5.QtWidgets import QStyle  # Gives a nicer error message than import from Qt
ImportError: /usr/lib/ version CXXABI_1.3 required by /usr/pkg/lib/python2.7/site-packages/PyQt5/ not defined

That is probably because I didn't compile ALL C++ programs with g++ 4.9.
I suppose I can rebuild some things if I can remember how to set it
globally (but only for C++ programs, preferably).

However, digging a bit deeper, I see that 

usr/pkg/lib/python2.7/site-packages/PyQt5/ needs: => /usr/pkg/gcc49/lib/./

which is ok, but

path = /usr/X11R7/lib
/usr/X11R7/lib/ needs: => /usr/lib/
Ai ai! That looks like a nasty conflict!

Conflicting libraries:

libstdc++ ==


(part of the output from the attached, which shows more clearly
what recursive dependencies exist, and also prints the reverse

How to resolve that? Maybe somehow libGL from pkgsrc only? Also built
with gcc 4.9?

___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/      -- are condemned to reinvent it. Poorly.

Appended: the perl script.

# A ldd-replacement which clearly indicates which libraries are needed 
# by which object.

my %map;
my %needed_by;
my @todo;

sub do_one_file {
    my $file = shift;
    my @needed;
    my @path;

    open OBJDUMP, "objdump -x $file |";

    while (<OBJDUMP>) {
	if (/NEEDED/) {
	    push @needed, $_;

	if (/RPATH/) {
	    @path = split /:/;
	    print "path = @path\n";
    close OBJDUMP;

    push @path, "/usr/lib";
    push @path, "/lib";

    print "$file needs:\n";

    for my $lib (@needed) {
	# Find $lib in @path
	my $found = 0;
	for my $dir (@path) {
	    my $candidate = $dir."/".$lib;

	    if (-e $candidate) {
		print "\t$lib => $candidate\n";
		$found = 1;
		if (exists $map{$lib}) {
		    # $candidate was already processed before
		} else {
		    push @todo, $candidate;
		    $map{$lib} = $candidate;
		if (!exists $needed_by{$candidate}) {
		    $needed_by{$candidate} = undef;
		    # then the next push will use autovivivication
		push @{$needed_by{$candidate}}, $file;
		last PATH;
	if (!$found) {
	    print "\t$lib not found\n";

    if (@needed == 0) {
	print "\t(nothing)\n";

    print "\n";

push @todo, @ARGV;

while (@todo) {
    do_one_file(pop @todo);

# Dump reverse requirements:

my %fullib;

for my $lib (sort keys %needed_by) {
    print "$lib <=\n";
    for my $by (@{$needed_by{$lib}}) {
	print "\t$by\n";
    print "\n";

    # Create a mapping of short lib name to full file name
    # to detect potential conflicts
    my $short = $lib;
    $short =~ s=.*/==;
    $short =~ s=\.so[.0-9]*==;
    if (!exists $fullib{$short}) {
	$fullib{$short} = undef;
	# then the next push will use autovivivication
    push @{$fullib{$short}}, $lib;

# Dump conflicts

print "Conflicting libraries:\n";

for my $lib (sort keys %fullib) {
    my @longnames = @{$fullib{$lib}};
    if (@longnames > 1) {
	print "$lib ==\n";
	for my $longname (@longnames) {
	    print "\t", $longname, "\n";
	    for my $by (@{$needed_by{$longname}}) {
		print "\t\t$by\n";
	    print "\n";

# end.

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index