(resend)
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/QtWebKit.so
> > ERROR: /pkg_comp/obj/pkgsrc/x11/py-qt5/default/.destdir/usr/pkg/lib/python2.7/site-packages/PyQt5/QtWebKitWidgets.so
> > *** 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>
sys.exit(calibre())
File "/usr/pkg/lib/calibre/calibre/gui_launch.py", line 73, in calibre
from calibre.gui2.main import main
File "/usr/pkg/lib/calibre/calibre/gui2/__init__.py", line 7, in <module>
from PyQt5.QtWidgets import QStyle # Gives a nicer error message than import from Qt
ImportError: /usr/lib/libstdc++.so.7: version CXXABI_1.3 required by /usr/pkg/lib/python2.7/site-packages/PyQt5/QtWidgets.so 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/QtWidgets.so needs:
libstdc++.so.7 => /usr/pkg/gcc49/lib/./libstdc++.so.7
which is ok, but
path = /usr/X11R7/lib
/usr/X11R7/lib/libGL.so.2 needs:
libstdc++.so.7 => /usr/lib/libstdc++.so.7
Ai ai! That looks like a nasty conflict!
Conflicting libraries:
libstdc++ ==
/usr/lib/libstdc++.so.7
/usr/X11R7/lib/libGL.so.2
/usr/X11R7/lib/libglapi.so.0
/usr/pkg/qt5/lib/libQt5Core.so.5
/usr/pkg/lib/libicuuc.so.60
/usr/pkg/lib/libicui18n.so.60
/usr/pkg/qt5/lib/libQt5Gui.so.5
/usr/pkg/qt5/lib/libQt5Widgets.so.5
/usr/pkg/gcc49/lib/./libstdc++.so.7
usr/pkg/lib/python2.7/site-packages/PyQt5/QtWidgets.so
(part of the output from the attached ldd.pl, which shows more clearly
what recursive dependencies exist, and also prints the reverse
relations)
How to resolve that? Maybe somehow libGL from pkgsrc only? Also built
with gcc 4.9?
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl -- are condemned to reinvent it. Poorly.
Appended: the perl script.
#!/usr/pkg/bin/perl
#
# 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>) {
chomp;
if (/NEEDED/) {
s/\s*NEEDED\s*//;
push @needed, $_;
}
if (/RPATH/) {
s/\s*RPATH\s*//;
@path = split /:/;
print "path = @path\n";
break;
}
}
close OBJDUMP;
push @path, "/usr/lib";
push @path, "/lib";
print "$file needs:\n";
for my $lib (@needed) {
# Find $lib in @path
my $found = 0;
PATH:
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