avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] [avr-libc-dev] [bug #28837] using PSTR with c++ produ


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] [avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings
Date: Tue, 1 Nov 2011 17:08:30 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Volker Kuhlmann wrote:

> I've been trying for 3 days now (incl half a weekend) to get 4.6.2 to
> compile and I have to say build instructions are shockingly bad. What
> worked for 4.3.3 just wasted 3 days for me.

If you look into the correct (out of the many ;) config.log files,
you'll see the solution: the C compiler complains that it cannot find
one of the shared object files (libmpc.so, IIRC).

The correct file to look into is avr/libgcc/config.log (within the
build directory).  libgcc is the first time where the compilation
process wants to invoke the compiler for the target machine;
everything else before that happened using the host system's compiler.

All this happens if you compile the toolchain using some "esoteric"
--prefix setting, where ${prefix} is not part of your normal
LD_LIBRARY_PATH (or whatever your system uses as its default
equivalent of that).  libmpc (which has been recently added as a
prerequisite to GCC) installs a shared library, and the target
compiler wants to use it.

Three possible solutions:

. use a standard --prefix setting where all your binaries and shared
  libs are being found automatically by the system

. set LD_LIBRARY_PATH to ${prefix}/lib before compiling GCC

. use --disable-shared when configuring the gmp, mpc, and mpfr
  libraries for your new compiler

(In the latter case, make sure that there are no .so libs from
previous attempts sitting around in ${prefix}/lib.)

Based on experience from previous toolchain compilations, it's also
always a good idea to reset PATH to the minimal elements that are
strictly needed for the compilation, like /bin/:/usr/bin, or
/bin:/usr/bin:/usr/local/bin.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]