NetBSD Problem Report #55623

From www@netbsd.org  Sat Aug 29 15:40:55 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EBB3B1A923F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Aug 2020 15:40:54 +0000 (UTC)
Message-Id: <20200829154053.C1A421A9242@mollari.NetBSD.org>
Date: Sat, 29 Aug 2020 15:40:53 +0000 (UTC)
From: bruce.lilly+nbsd@gmail.com
Reply-To: bruce.lilly+nbsd@gmail.com
To: gnats-bugs@NetBSD.org
Subject: cannot install gcc > 4 (w/o forcing) due to incorrect dependency
X-Send-Pr-Version: www-1.0

>Number:         55623
>Category:       pkg
>Synopsis:       cannot install gcc > 4 (w/o forcing) due to incorrect dependency
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 29 15:45:00 +0000 2020
>Originator:     Bruce Lilly
>Release:        9.0
>Organization:
>Environment:
NetBSD cq60-615dx.blilly.net 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 Intel 686-class NetBSD
>Description:
Attempts to install gcc5 - gcc10 fail due to alleged dependency on /usr/lib/libstdc++.so.7 (netbsd 9.0 install has /usr/lib/libstdc__.so.9, but not .7).

But the required libstdc++.so.7 is in fact contained in the relevant -libs packages, installed under /usr/pkg/gcc*/* (see under fix for details for gcc5)
>How-To-Repeat:
Fresh install (not upgrade) of NetBSD 9.0
Try to install gcc5 or later via pkgin or pkg_add

>Fix:
Install the relevant matching -libs package (e.g. gcc5-libs; that should work)
Force install of the gcc package, e.g. pkg_add -fUD gcc5
[mnemonic for frustration, uncertainty, and doubt :-/]
Verify operation by building some Sea ploose ploose program with gcc5
Verify that the correct shared object is used with ldd, e.g.:
# ldd /src/grap/grap-1.43/grap
/src/grap/grap-1.43/grap:
        -lstdc++.7 => /usr/pkg/gcc5/x86_64--netbsd/lib/./libstdc++.so.7
        -lm.0 => /usr/lib/libm.so.0
        -lc.12 => /usr/lib/libc.so.12
        -lgcc_s.1 => /usr/lib/libgcc_s.so.1
Lather, rinse, repeat for other gcc versions as desired.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.