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

--- Comment #12 from Matt Thompson <matthew.thompson at nasa dot gov> ---
(In reply to Iain Sandoe from comment #11)
> (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.

Oh. I only ever do "make install" if I get --prefix wrong, I rebuild the whole
thing.

> 
> > > 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.
> > 

Yeah.

> > > 
> > > 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.

Well, 9.1.0 built just fine with 8.2.0 loaded in my environment. This seems to
point to clang, which, well, doesn't surprise me as clang and I have had a
difficult life together, but then again clang built 5.4.0 up to 8.2.0 just fine
for me. 

I'm ran a 'make check' and got:

Fixed:  time.h
Fixed:  tinfo.h
Fixed:  types/vxTypesBase.h
Fixed:  unistd.h
Newly fixed header:  sys/ucred.h

There were fixinclude test FAILURES
make[2]: *** [Makefile:177: check] Error 1
make[2]: Leaving directory
'/Users/mathomp4/src/GCC/gcc-9.1.0-BUILD-820loaded/fixincludes'
make[1]: *** [Makefile:3829: check-fixincludes] Error 2
make[1]: Leaving directory '/Users/mathomp4/src/GCC/gcc-9.1.0-BUILD-820loaded'
make: *** [Makefile:2358: do-check] Error 2

So...huh. Not sure what to do there. Still, fortune favors the bold/naive and
I'll continue work with this 9.1.0 and try to build my MPI stack, etc. and see
how it handles our model.

Reply via email to