pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/55625: /usr/bin/gcc version stuck at 7 when gcc 8 or later is installed
>Number: 55625
>Category: pkg
>Synopsis: /usr/bin/gcc version stuck at 7 when gcc 8 or later is installed
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 29 16:10:01 +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@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 Intel 686-class NetBSD
>Description:
If gcc version 7 and gcc > 7 is installed, /usr/bin/gcc uses version 7:
# /usr/bin/gcc --version
gcc (nb3 20190319) 7.4.0
...
>How-To-Repeat:
Fresh install (not upgrade) of NetBSD 9.0
Install gcc7 and gcc8 or later (see pkg/55623)
plain `gcc' uses gcc7 only
>Fix:
I do the following:
1. PATH is arranged to include the relevant gcc bin directories so that the most recent version of gcc and related tools appears first, e.g.
... /usr/pkg/gcc10/bin:/usr/pkg/gcc9/bin:/usr/pkg/gcc8/bin:/usr/pkg/gcc7/bin:/usr/pkg/gcc6/bin:/usr/pkg/gcc5/bin:/usr/pkg/gcc49/bin:/usr/pkg/gcc48/bin:/usr/pkg/gcc3/bin ...
These appear before /usr/bin in $PATH, so that the stuck version in /usr/bin/gcc doesn't hinder using more recent versions.
2. I install links so that specific versions can be specified:
lrwxr-xr-x 1 root wheel 16 Aug 21 21:29 /usr/pkg/bin/gcc10 -> ../gcc10/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc3 -> ../gcc3/bin/gcc
lrwxr-xr-x 1 root wheel 16 Aug 21 21:29 /usr/pkg/bin/gcc48 -> ../gcc48/bin/gcc
lrwxr-xr-x 1 root wheel 16 Aug 21 21:29 /usr/pkg/bin/gcc49 -> ../gcc49/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc5 -> ../gcc5/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc6 -> ../gcc6/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc7 -> ../gcc7/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc8 -> ../gcc8/bin/gcc
lrwxr-xr-x 1 root wheel 15 Aug 21 21:29 /usr/pkg/bin/gcc9 -> ../gcc9/bin/gcc
Notes:
1. It may be useful to include links such as the above in the relevant packages
2. Don't blame me for the wacky gcc version numbering
Home |
Main Index |
Thread Index |
Old Index