pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: FreeBSD 10, clang, and openmp
On Wed, 16 Jul 2014 18:16:31 -0500
Jason Bacon <jwbacon%tds.net@localhost> wrote:
> On 07/16/14 15:04, Jonathan Perkin wrote:
> > * On 2014-07-16 at 20:57 BST, Jason Bacon wrote:
> >
> >> On 07/16/14 14:31, Jonathan Perkin wrote:
> >>> * On 2014-07-16 at 20:11 BST, Jason Bacon wrote:
> >>>
> >>>> Is there an "official" way to force pkgsrc to use GCC on FreeBSD
> >>>> 10? ( Assuming the pkgsrc gcc packages work on FreeBSD, which
> >>>> I'm trying right now. )
> >>>>
> >>>> I'm going to be converting a lot of FreeBSD ports to pkgsrc in
> >>>> the near future and the process is much more efficient if I can
> >>>> use FreeBSD to get the pkg to a working state before testing on
> >>>> other platforms.
> >>>>
> >>>> I've run into problems with software that requires openmp,
> >>>> because it's disabled in FreeBSD's clang base compiler. In the
> >>>> FreeBSD port, I can indicate the need for GCC instead of clang
> >>>> with
> >>>>
> >>>> USE_GCC=any
> >>>>
> >>>> In pkgsrc, I've tried things like
> >>>>
> >>>> GCC_REQD=4.5
> >>>>
> >>>> which has no effect - pkgsrc still uses clang and clang++.
> >>> PKGSRC_COMPILER is the user variable which tells pkgsrc which
> >>> compiler you are using. GCC_REQD is only valid if you have
> >>> already set this to 'gcc'. You'd normally set PKGSRC_COMPILER at
> >>> bootstrap time using the --compiler flag.
> >>>
> >>> If a package specifically requires clang, then in the package
> >>> Makefile you can set PKGSRC_COMPILER+= clang, and then
> >>> ONLY_FOR_COMPILER=clang.
> >>>
> >>> Hope that helps,
> >>>
> >> Thanks - that is informative.
> >>
> >> It sounds like I would need to bootstrap the whole pkgsrc
> >> installation using GCC to make this work, which would probably not
> >> be difficult using FreeBSD's GCC port (/usr/local/bin/gcc47, for
> >> example).
> >>
> >> What I was hoping to do, though, was bootstrap from the FreeBSD
> >> base clang and trigger installation of a pkgsrc gcc package as a
> >> dependency if needed.
> >>
> >> This is what FreeBSD's USE_GCC will do if clang is the base
> >> compiler (FreeBSD 10.0 and later). FTR, USE_GCC=any allows the
> >> use of the base gcc compiler in FreeBSD systems prior to 10.0,
> >> while USE_GCC=yes forces installation of a gcc port on any FreeBSD
> >> release, regardless of whether the base compiler is gcc or clang.
> > Right, that is what my second paragraph would achieve, though you
> > would need to ensure that anywhere you add this is done with
> > something like:
> >
> > .include "../../mk/bsd.prefs.mk"
> > .if ${OPSYS} == "FreeBSD"
> > PKGSRC_COMPILER+= gcc
> > NOT_FOR_COMPILER= clang
> > .endif
> >
> > so as to not break other operating systems which ship with a working
> > clang.
> >
> Tried this, but it's not working:
>
> FreeBSD freebie.acadix bacon ~/Pkgsrc/pkgsrc-1/jb-wip/parafly 407:
> bmake => Bootstrap dependency digest>=20010302: found digest-20121220
> ERROR: This package is not available for these compilers: clang.
> *** Error code 1
>
> Stop.
> bmake: stopped in /home/bacon/Pkgsrc/pkgsrc-1/jb-wip/parafly
>
> This is not a priority, especially since it can be worked around by
> bootstrapping from a gcc port.
>
> Thanks,
>
> JB
Not really solving the problem but an aside,
My experience has been that it's pretty easy to remove the OpenMP code
from a project. It's kinda like a "make me pretend to be threaded"
command. At least from what I've seen. On a couple of OpenMP-based
projects I wanted to use threads I added pthread code. I haven't done
any tests to see which performs better.
Waitman Gobble
Los Altos California USA
- References:
- FreeBSD 10, clang, and openmp
- Re: FreeBSD 10, clang, and openmp
- Re: FreeBSD 10, clang, and openmp
- Re: FreeBSD 10, clang, and openmp
- Re: FreeBSD 10, clang, and openmp
Home |
Main Index |
Thread Index |
Old Index