I am trying to install GCC 4.9.4 in a non-standard location on Red Hat Linux using the documentation provided.
I do not have sudo, but I have write access to the folder /testbed so I am trying to install GCC and all its prerequisites and dependencies into that directory rather than the default /usr/local.
The prerequisites are installed in the /testbed/local directory and the objdir is /testbed/objects, then from the /testbed/objects directory I run
/testbed/packages/gcc/gcc-4.9.4/configure \ --prefix=/testbed/local \ --program-prefix=test- \ --program-suffix=-4.9.4 \ --enable-multilib \ --with-local-prefix=/testbed/local \ --with-gmp=/testbed/local \ --with-mpfr=/testbed/local \ --with-mpc=/testbed/local`
during the make I get the following error:
/usr/local/bin/ld: -plugin-opt=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper: error loading plugin: -plugin-opt=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper: cannot open shared object file: No such file or directory collect2: error: ld returned 1 exit status
Given that the error seems to use the default path "/usr/local" I'm imagining that --prefix and --local-prefix is not all encompassing when it comes to defining the location you want to install GCC in or there is some other issue regarding the linker director or the lto-wrapper plugin. Does anyone know how I might resolve this issue given the constraints and conditions of what I am trying to accomplish?