0

I just compiled and installed gcc-5.2. I did not have root access so I installed it in my own directory. I forget at the end what I am meant to link through LD_LIBRARY_PATH and PATH

setenv LD_LIBRARY_PATH /bigbang/data/username/lib/gcc-5.2/lib
setenv LD_LIBRARY_PATH /bigbang/data/username/lib/gcc-5.2/lib64:$LD_LIBRARY_PATH
setenv PATH /bigbang/data/username/lib/gcc-5.2/bin:$PATH

When I simply run ./gcc I get the following error:

gcc: error while loading shared libraries: libiconv.so.2:

Is there something wrong with how I am linking the lib paths? Thanks in advance. Also, I simple did configure with ./configure --prefix=/bigbang/data/username/lib/gcc-5.2/, what is the recommended configuration flags I should use? I'm aiming to use graph_tool.

Griff
  • 2,064
  • 5
  • 31
  • 47

1 Answers1

0

If you have successfully installed GCC with some non-standard prefix /my/gcc/prefix then you can use that installation without any special preparations by passing:

-B/my/gcc/prefix

whenever you call the frontend (gcc, g++, etc). You just call the frontend with the usual command:

gcc -B/my/gcc/prefix ...

This assumes some version of GCC is installed standardly.

See 3.15 Options for Directory Search

Mike Kinghan
  • 55,740
  • 12
  • 153
  • 182