https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90330

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Matt Thompson from comment #10)
> (In reply to Iain Sandoe from comment #9)
> > (In reply to Matt Thompson from comment #8)


> I don't usually remove it from my path because it had never caused any
> issues before. Note that I specifically do not let brew install gcc (or
> MPI). I like that control. I'm currently running a "no /usr/local/bin" test
> so we shall see if it helps.

OK - let's be clear here. You must install GCC into the path that its
configured with in order for the correct shared libraries to be found at
runtime.

so, if yo configure --prefix=/foo/bar/baz and then intstall into /baz/bar/foo
that will not work correctly.

The error you are showing seems that you are not finding the same libstdc++ at
runtime as was assumed to be available by the build.

> > If you can find the exact command line that fails and repeat it, prepended
> > by DYLD_PRINT_LIBRARIES=1, that will show you which dylibs are loaded as the
> > command tries to execute (there might be quite a lot of output, so not
> > necessarily easy to interpret)
> 
> I just tried this and nothing happens. I tried both "DYLD_PRINT_LIBRARIES=1
> g++ ..." and "env DYLD_PRINT_LIBRARIES=1 g++ ..." No change in output.

"which g++" probably says you are using clang++ and that it a protected exe
that will elide DYLD_* when invoked. In that case, it's hard to do that test.
> 
> > 
> > I have built
> > > gcc 8.2.0. Instead of using clang, I could try that...though I'm not sure
> > > how. Just pass in CC and CXX to configure?
> > 
> > yes, and/or make sure that the GCC toolchain bin dir is before the system
> > ones in your path.
> 
> I'll try this as well as soon as I can (I can maybe manage make -j4 on this
> laptop, so builds aren't quick!). Do I need to pass FC as well? Or does the
> gcc build with fortran not care?

Fortran is built with the C++ compiler, but I'd put the GCC bin dir in the path
first - and then you will be able to do the DYLD_** commands using the
bootstrap compiler tools to install.

Reply via email to