On Wed, 17 Aug 2016 14:17:10 -0700 Steve Kargl <s...@troutmask.apl.washington.edu> wrote: > On Sun, Aug 14, 2016 at 07:34:30PM -0400, Diane Bruce wrote: >> On Sun, Aug 14, 2016 at 04:03:51PM -0700, Steve Kargl wrote: >>> Freebsd-ports could also use a wrapper: >>> % cat ~/bin/gfc7 >>> #! /bin/sh >>> DIR=`id -P sgk | sed 's/\:/\ /g' | awk '{print $9}'` >>> export DIR >>> >>> LD_LIBRARY_PATH=$DIR/work/7/lib >>> export LD_LIBRARY_PATH >>> >>> LD_RUN_PATH=$DIR/work/7/lib >>> export LD_RUN_PATH >>> >>> $DIR/work/7/bin/gfortran -fno-backtrace $@ >> >> Yes. I have also suggested we use a wrapper to the ports guys. > > I thought about this a bit, and cleaner solution might be > to add the program suffix to libgcc_s.so.1. For example, > > % cat foo.f90 > program foo > print *, 'Hello' > end program > % gfortran6 -o z foo.f90 && ./z > /lib/libgcc_s.so.1: version GCC_4.6.0 required by \ > /usr/local/lib/gcc6/libgfortran.so.3 not found > % ldconfig -r | grep libgcc > 6:-lgcc_s.1 => /lib/libgcc_s.so.1 > 735:-lgcc_s.1 => /usr/local/lib/gcc6/libgcc_s.so.1 > > Clearly, ldd is looking for 735 but finds 6. If the lang/gcc6 could > be convinced to build, install, and use libgcc_s6.so.1, then the > problem is solved without a wrapper.
In this case the real cause of the problem is that compilers and linkers search /lib and /usr/lib last and ldconfig searches them first. Renaming the library is just a hack around that. _______________________________________________ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"