NetBSD Problem Report #55623

From  Sat Aug 29 15:40:55 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id EBB3B1A923F
	for <>; Sat, 29 Aug 2020 15:40:54 +0000 (UTC)
Message-Id: <>
Date: Sat, 29 Aug 2020 15:40:53 +0000 (UTC)
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
NetBSD 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 amd64 x86_64 Intel 686-class NetBSD
Attempts to install gcc5 - gcc10 fail due to alleged dependency on /usr/lib/ (netbsd 9.0 install has /usr/lib/, but not .7).

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

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
        -lstdc++.7 => /usr/pkg/gcc5/x86_64--netbsd/lib/./
        -lm.0 => /usr/lib/
        -lc.12 => /usr/lib/
        -lgcc_s.1 => /usr/lib/
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:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.