pkgsrc-Users archive

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

Re: Explicitly using pkgsrc gcc/clang on NetBSD

Coincidentally, we were just discussing a related topic on tech-pkg.

If you want to use a pkgsrc GCC across-the-board, add GCC_REQD to etc/mk.conf.

In order to avoid circular dependencies, though, you should either install GCC before editing mk.conf, or exclude it and all of its dependencies from the GCC requirement. I've been testing with the config below and so far, so good...

.if empty(PKGPATH:Mlang/gcc48) && \
    empty(PKGPATH:Mpkgtools/cwrappers) && \
    empty(PKGPATH:Mdevel/nbpatch) && \
    empty(PKGPATH:Mpkgtools/digest) && \
    empty(PKGPATH:Msysutils/checkperms) && \
    empty(PKGPATH:Mlang/perl5) && \
    empty(PKGPATH:Mdevel/p5-gettext) && \
    empty(PKGPATH:Mconverters/help2man) && \
    empty(PKGPATH:Mdevel/autoconf) && \
    empty(PKGPATH:Mconverters/p5-Unicode-EastAsianWidth) && \
    empty(PKGPATH:Mdevel/libtool-base) && \
    empty(PKGPATH:Marchivers/pax) && \
    empty(PKGPATH:Mlang/gcc49-libs) && \
    empty(PKGPATH:Mdevel/ncurses) && \
    empty(PKGPATH:Mmisc/p5-Locale-libintl) && \
    empty(PKGPATH:Mtextproc/p5-Text-Unidecode) && \
    empty(PKGPATH:Mdevel/gtexinfo) && \
    empty(PKGPATH:Mdevel/gmp) && \
    empty(PKGPATH:Mmath/mpfr) && \
    empty(PKGPATH:Mmath/cloog) && \
    empty(PKGPATH:Mmath/isl) && \



On 07/02/17 08:57, Jan Danielsson wrote:

    I built netbsd-7 with NOGCC, so in my pkg_comp1 chroot generated from
that base set I have no gcc.

    I tried building the packages I need with the base clang but I'm
getting a clang crash when building thunderbird and firefox, so I
thought I'd try gcc (and also clang) from pkgsrc.

    Two questions, which are mostly the same:
    1) How do I tell pkgsrc to use gcc from pkgsrc?
    2) How do I tell pkgsrc to use clang from pkgsrc?

    Actually, the second one I know the answer to -- I simply change
CLANGBASE to /usr/pkg.  But there's another factor:  I create a fresh
new pkg_comp1 chroot each time I build packages.  When I launch pkg_comp
I tell it run run a build script which creates all my packages and then
exits.  I would prefer not to have to first build the pkgsrc compiler
using base and then manually switch to the pkgsrc compiler in mk.conf.

    Is there a safe way to handle this automatically?

    If I put clang at the top of the packages to build in the chroot and
put this in mk.conf:

.if ${PKGPATH} == "lang/clang"

    .. is this asking for trouble?

    The same question applies to the gcc case; is there a way to get
pkgsrc to automatically build gcc as needed (using the base clang)?  I
assume there's a bootstrapping problem where pkgsrc can't know *which*
of the gcc compilers to use.

Earth is a beta site.

Home | Main Index | Thread Index | Old Index