tech-pkg archive

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

Re: configure finding "nonfunctional" c++ compiler



On 2019-06-28 22:22, Brook Milligan wrote:
On Jun 28, 2019, at 6:47 PM, Brook Milligan <brook%nmsu.edu@localhost> wrote:

I'm trying to build some packages in an HPC environment and am regularly running into the error

	configure: error: C++ compiler missing or inspirational

I think this is because configure finds /usr/bin/c++ (based upon the links in work/.gcc/bin), which is an OS supplied compiler, in this case gcc 4.4.7, not ones installed by the module system, which are the ones expected to be used.  I guess this is because configure checks all the "normal" places, but has no knowledge of the module specific directories.

What can be done so that pkgsrc will work correctly in this situation?
To add a bit more detail, it turns out that the configure fails because the native compiler does not support --std=c++03, which is required by gcc48, which is needed to build anything useful.  Yes, this is ridiculous, but that is a real constraint.

I have tried setting GCCBASE=/opt/gnu/gcc in mk.conf to point to a better compiler, but that seems to make no difference.

Is there a way to get pkgsrc to use a compiler other than the native one in /usr/bin?  I have others installed, but cannot figure out how to make pkgsrc see them.

Thanks for advice.

Cheers,
Brook


By module system I assume you're referring to environment modules bringing home grown compilers into PATH?

I tried to work with home grown "base" compilers years ago and found the process fraught with too many problems.

After some discussion with other pkgsrc developers, I found a pretty stable solution for CentOS 6 & 7 using the Yum gcc to build a pkgsrc gcc and its dependencies, and the pkgsrc gcc for everything else.  This has worked well with everything from 4.8 up to 7.0 so far.  ( 8.0 still fails to build on CentOS )

Have a look at auto-pkgsrc-setup at http://netbsd.org/~bacon/. ; You can either use it as-is or pick it apart and learn from it.  In particular see the mk.conf it generates.  The script is well-tested on CentOS, NetBSD and OS X.

Cheers,

    JB



Home | Main Index | Thread Index | Old Index