Re: GCC build issues - struggling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 December 2010 18:32, Dan Track wrote:
>
> Thanks for the detailed response. Due to the server layout I can't
> install anywhere except in /opt. Apologies, the original gmp layout
> was a mistake, I can confirm that my gmp is in the following location:
>
> file /opt/gcc/usr/lib/libgmp.so
> /opt/gcc/usr/lib/libgmp.so: symbolic link to `libgmp.so.3.5.2'
>
> file /opt/gcc/usr/lib/libgmp.so.3.5.2
> /opt/gcc/usr/lib/libgmp.so.3.5.2: ELF 64-bit LSB shared object,
> x86-64, version 1 (SYSV), not stripped

(Personally I wouldn't have put "usr" in the path for gmp, i.e I'd
have installed it in /opt/gcc/lib not /opt/gcc/usr/lib, but it
shouldn't hurt, as long you actually pass the right path to configure,
which you're not doing.)

> My server is:
> uname -a
> Linux sn37v98 2.6.16.60-0.69.1-smp #1 SMP Fri Sep 17 17:07:54 UTC 2010
> x86_64 x86_64 x86_64 GNU/Linux
>
> With regards to the LD_LIBRARY_PATH, I’ve generally not liked its use.
> I know it will work when I set it with the location, but I would
> prefer to pass the details via the configure script. Is there a way to
> do, it given the –with-gmp doesn’t work for the second stage?

--with-gmp would work if you said --with-gmp=/opt/gcc/usr instead of /opt/gcc

But it would still need to find the shared libs at runtime, which is
why I suggest the use of LD_LIBRARY_PATH.  The other options are to
link statically to gmp (the easiest option IMHO) which is what my
config-gcc.mk makefile configures, by putting the GMP, MPFR and MPC
sources in the GCC source tree.

If you want to hardcode the library locations into the gcc executables
you can try using the -R or -rpath linker options, but the -L options
you're passing to configure will not help.

> Also I’ve compiled the same gcc with just a prefix location and
> nothing else in the configure argument except the environment
> variables but it still didn’t build, I had to set LD_LIBRARY_PATH to
> make it find mpr, gmp etc...
>
> The various environment variables set:
>
>>> CC=/opt/utils/usr/bin/gcc CXX=/opt/utils/usr/bin/g++ CFLAGS="-g3 -O0
>>> -I/opt/utils/usr/include" BOOT_LDFLAGS="-L/opt/gcc/lib
>>> -L/opt/gcc/usr/lib -L/opt/utils/lib -L/opt/utils/usr/lib"

Just use --with-gmp and --with-mpfr and --with-mpc instead.  They set
the include dirs and lib dirs correctly (assuming you give the right
path, which seems to be /opt/gcc/usr not /opt/gcc as you have been
using)

But, as I said above, that won't remove the need for finding the
shared libs at runtime.

> were done to aid in finding mpc etc, which are located in another location i.e.:
> /opt/gcc/lib and
> /opt/gcc/lib64

If you'd put gmp in there too it would've made things a bit simpler :-)



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux