tech-pkg archive

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

Re: Using pkgsrc gcc



On 2019-08-19 04:58, Robert Swindells wrote:
Jason Bacon <outpaddling%yahoo.com@localhost> wrote:
On 2019-08-18 13:51, Robert Swindells wrote:
How do you make a package use gcc from pkgsrc ?

Tried setting the following but it is still using /usr/bin/gcc.

USE_PKGSRC_GCC= yes
USE_NATIVE_GCC= no
GCC_REQD+=      8
GCC_REQD+=major.minor
Doesn't help.

I would like to try to use gcc8 to build lang/openjdk8 on NetBSD-current
to see if it works better on aarch64 than building with g++ 7.4.

I was mainly looking at the files under the work directory for links
to programs under /usr/pkg/gcc8/bin, I don't see any.

The .gcc/bin directory contains:

lrwxrwxr-x  1 rjs  staff   3 Aug 19 10:31 c++ -> g++
lrwxrwxr-x  1 rjs  staff   3 Aug 19 10:31 cc -> gcc
lrwxrwxr-x  1 rjs  staff  12 Aug 19 10:31 cpp -> /usr/bin/cpp
lrwxrwxr-x  1 rjs  staff  12 Aug 19 10:31 g++ -> /usr/bin/g++
lrwxrwxr-x  1 rjs  staff  12 Aug 19 10:31 gcc -> /usr/bin/gcc

And the configure stage of the package prints this:

   configure: Using gcc C++ compiler version 7.4.0 [g++ (nb3 20190319) 7.4.0]

Adding GCC_REQD+=8 works fine for me on NetBSD 8.1:

netbsddev# pwd
/usr/pkgsrc/wip/hmmer
netbsddev# ls -l work/.gcc/bin/
total 0
lrwxr-xr-x  1 root  125   3 Aug 19 09:13 c++ -> g++
lrwxr-xr-x  1 root  125   3 Aug 19 09:13 cc -> gcc
lrwxr-xr-x  1 root  125  21 Aug 19 09:13 cpp -> /usr/pkg/gcc8/bin/cpp
lrwxr-xr-x  1 root  125  21 Aug 19 09:13 g++ -> /usr/pkg/gcc8/bin/g++
lrwxr-xr-x  1 root  125  21 Aug 19 09:13 gcc -> /usr/pkg/gcc8/bin/gcc
lrwxr-xr-x  1 root  125  26 Aug 19 09:13 gfortran -> /usr/pkg/gcc8/bin/gfortran

netbsddev# pwd
/usr/pkgsrc/lang/openjdk8
netbsddev# ls -l work/.gcc/bin/
total 0
lrwxr-xr-x  1 root  125   3 Aug 19 09:14 c++ -> g++
lrwxr-xr-x  1 root  125   3 Aug 19 09:14 cc -> gcc
lrwxr-xr-x  1 root  125  21 Aug 19 09:14 cpp -> /usr/pkg/gcc8/bin/cpp
lrwxr-xr-x  1 root  125  21 Aug 19 09:14 g++ -> /usr/pkg/gcc8/bin/g++
lrwxr-xr-x  1 root  125  21 Aug 19 09:14 gcc -> /usr/pkg/gcc8/bin/gcc
lrwxr-xr-x  1 root  125  26 Aug 19 09:14 gfortran -> /usr/pkg/gcc8/bin/gfortran

Do you have something in your mk.conf that's messing with the compiler selection?




Home | Main Index | Thread Index | Old Index