WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: lto-wrapper "error loading plugin" when trying to link (during lapack build)  (Read 2918 times)

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
I am trying to compile lapack on corepure64 6.3 and am having problems.  The short build log is below:

Code: [Select]
$ wget http://www.netlib.org/lapack/lapack.tgz
$ tar xzf lapack.tgz
$ cd lapack*
$ cp INSTALL/make.inc.gfortran make.inc
$ make lapacklib
( cd INSTALL; make; ./testlsame; ./testslamch; ./testdlamch; \
./testsecond; ./testdsecnd; ./testieee; ./testversion )
make[1]: Entering directory '/home/admin/tmp/src/lapack-3.5.0/INSTALL'
gfortran  -O2 -frecursive -c lsame.f -o lsame.o
gfortran  -O2 -frecursive -c lsametst.f -o lsametst.o
gfortran  -o testlsame lsame.o lsametst.o
/usr/local/bin/ld: -plugin-opt=/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper: error loading plugin: -plugin-opt=/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper: cannot open shared object file: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'testlsame' failed
make[1]: *** [testlsame] Error 1
make[1]: Leaving directory '/home/admin/tmp/src/lapack-3.5.0/INSTALL'
/bin/sh: ./testlsame: not found
/bin/sh: ./testslamch: not found
/bin/sh: ./testdlamch: not found
/bin/sh: ./testsecond: not found
/bin/sh: ./testdsecnd: not found
/bin/sh: ./testieee: not found
/bin/sh: ./testversion: not found
Makefile:17: recipe for target 'lapack_install' failed
make: *** [lapack_install] Error 127
$ ls -al /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
lrwxrwxrwx    1 root     root            76 Aug  5 17:13 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper -> /tmp/tcloop/gcc/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
$ ls -al /tmp/tcloop/gcc/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
-rwxr-xr-x    1 root     root        552936 Sep 21  2014 /tmp/tcloop/gcc/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper

This is a pseudo-automated build process that I've run before on v6.0 and had no problems with at all.  The only difference that I know of is the Core version difference, and any extension differences (in compiletc, etc) that have resulted between the 6.0 timeframe and today.

When I pull up an old 6.0 image (with corresponding "6.0 era" toolchain frugally installed) and run the above `make lapack`, the build works perfectly.  No errors at all and the output is fine.

I don't know if it is related, or if it helps, but one difference that I do see is that the gcc (and gfortran in this case, which was built to match gcc) specs are being supplied by a specs file now, whereas previously they were not.  I don't know why, but expect this might be due to a gcc change that juanito made: "2015/02/24 updated specs to fix lib*.specs error (again)".  Here's the `gfortran -v` diff I get:


I know the "how was gfortran compiled" might matter, and I can provide details if relevant.  However, the compilation process there was *identical* between Core 6.0 and Core 6.3 and gfortran seems to be working ok.  It is the weird ld / lto-wrapper problem that I really don't understand at all.  The lto-wrapper file it appears to be complaining about actually does exist, and is provided by gcc.tcz (which adds to my suspicion).

Does anyone have any ideas what this ld / lto-wrapper issue might be?  Any hints are appreciated, as this is eating a lot of time.