ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] gdb-6.6 build problems


From: Stuart Hughes
Subject: Re: [Ltib] gdb-6.6 build problems
Date: Fri, 21 Nov 2008 10:05:35 +0000

Hi Vadim,

I completely missed the fact that during that phase we were building the
cross tool in the un-spoofed environment.  Your explanation is right,
the changes to the definition in stdio.h is causing the problem.

I've checked in a fix to the gdb*.spec files that adds --disable-werror
to the configure commands:

-    ../configure --prefix=%{_prefix} --target=$CFGHOST --mandir=%{_mandir}
+    ../configure --prefix=%{_prefix} --target=$CFGHOST --mandir=%{_mandir} \
+                 --disable-werror
     make


Thanks for your help.

Regards, Stuart

On Thu, 2008-11-20 at 20:05 +0100, Vadim Lebedev wrote:
> The asprintf comes  from:
> /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/includ
> e/stdio.h
> 
> btw when i follow your instructions it works without error
> i even tried to copy the whole offending command starting
> with /bin/sh ...
> 
> it works ok too...
> 
> It fails however when i do ./ltib -p gdb-6.6.spec
> 
> 
> Another observation:  when i do it form ./ltib -m shell
> it does not display the warning:
> cc1: warnings being treated as errors
> 
> Which brings me to following:
> When we do it manually it compiles using cross-compiler
> but WE are building CROSS DEBUGGER  which should be compiled with
> native host compiler, which is gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2  on
> my system.
> 
> So i simply tried the gcc command outside ltib environment and got the
> error:
> 
> the .i file conatined following:
> 
> extern int asprintf (char **__restrict __ptr,
>        __const char *__restrict __fmt, ...)
>      __attribute__ ((__nothrow__)) __attribute__ ((__format__
> (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
> 
> 
> which came from my /usr/include/stdio.h
> 
> 
> So this explain the problem,  the question how to resolve it?
> 
> Thanks
> Vadim
> 
> 
> 
> 
> 
> 
> Stuart Hughes wrote: 
> > Hi Vadim,
> > 
> > I took this off-list with Ned due to the attachments, but attachments
> > aside I've in-lined the email below.
> > 
> > Curiously -Werror has always been there, so it looks as though some host
> > related component is leaking in from the updated Ubuntu? whether there's
> > a difference in the configure results triggering this, or something else
> > I don't know.
> > 
> > Maybe you could try the steps and let me know what you see?
> > 
> > Regards, Stuart
> > 
> > ------------------------------------------------
> > Hi Ned,
> > 
> > I've taken this off the list until we resolve it as the attachments are
> > a bit big.
> > 
> > This has got me a bit stumped.  I just build the default configuration
> > for the imx27ads using the current sources at Savannah CVS.  I don't get
> > any build errors.
> > 
> > Looking at the log, the build command for that file is the same, so
> > I'm guessing that somehow you're pulling in a different header file from
> > me.  Did you change anything from the default?
> > 
> > Anyhow, can you try this:
> > 
> > $ ./ltib -m shell
> > LTIB> cd rpm/BUILD/gdb-6.6/cross-gdb/bfd
> > LTIB> gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I. -I../../bfd
> > -I../../bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes
> > -Werror -g -O2 -c ../../bfd/elf32-arm.c -o elf32-arm.o -save-temps
> > LTIB>
> > 
> > If you look at elf32-arm.i, search for asprintf and then go back and
> > find where it gets included from.  Mine is
> > from 
> > /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/include/stdio.h
> > 
> > I've attached my preprocessor file elf32-arm.i
> > 
> > Note to exit the ltib shell, type 'exit'
> > ---------------------------------------------
> > 
> > On Thu, 2008-11-20 at 16:40 +0100, Vadim Lebedev wrote:
> >   
> > > I have the same problem,
> > > 
> > > BTW i've started to see it since i've installed ubuntu 8.10  on 7.10
> > > whic i had previously there was no problem.
> > > 
> > > I suspect that this happens because -Werror  compile flag
> > > 
> > > Thanks
> > > Vadim
> > > 
> > > Ned Konz wrote: 
> > >     
> > > > I'm building for a mx27 board, and have had gdbserver compiled OK
> > > > before. 
> > > > 
> > > > However, after a clean and a recompile, it's quit compiling. 
> > > > 
> > > > What I'm getting is this (using the default gdb-6.6.spec) 
> > > > 
> > > > gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I. -I../../bfd
> > > > -I../../bfd/../include -W -Wall -Wstrict-prototypes
> > > > -Wmissing-prototypes -Werror -g -O2 -c ../../bfd/archive64.c -o
> > > > archive64.o 
> > > > rm -f elf32-target.h 
> > > > sed -e s/NN/32/g < ../../bfd/elfxx-target.h > elf32-target.new 
> > > > mv -f elf32-target.new elf32-target.h 
> > > > /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../bfd
> > > > -I. -I. -I../../bfd -I../../bfd/../include     -W -Wall
> > > > -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o
> > > > elf32-arm.lo ../../bfd/elf32-arm.c 
> > > > gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I. -I../../bfd
> > > > -I../../bfd/../include -W -Wall -Wstrict-prototypes
> > > > -Wmissing-prototypes -Werror -g -O2 -c ../../bfd/elf32-arm.c -o
> > > > elf32-arm.o 
> > > > cc1: warnings being treated as errors 
> > > > ../../bfd/elf32-arm.c: In function 'find_thumb_glue': 
> > > > ../../bfd/elf32-arm.c:2452: error: ignoring return value of
> > > > 'asprintf', declared with attribute warn_unused_result 
> > > > ../../bfd/elf32-arm.c: In function 'find_arm_glue': 
> > > > ../../bfd/elf32-arm.c:2485: error: ignoring return value of
> > > > 'asprintf', declared with attribute warn_unused_result 
> > > > make[4]: *** [elf32-arm.lo] Error 1 
> > > > make[4]: Leaving directory
> > > > `/home/ned/src/ltib/rpm/BUILD/gdb-6.6/cross-gdb/bfd' 
> > > > make[3]: *** [all-recursive] Error 1 
> > > > make[3]: Leaving directory
> > > > `/home/ned/src/ltib/rpm/BUILD/gdb-6.6/cross-gdb/bfd' 
> > > > make[2]: *** [all] Error 2 
> > > > make[2]: Leaving directory
> > > > `/home/ned/src/ltib/rpm/BUILD/gdb-6.6/cross-gdb/bfd' 
> > > > make[1]: *** [all-bfd] Error 2 
> > > > make[1]: Leaving directory
> > > > `/home/ned/src/ltib/rpm/BUILD/gdb-6.6/cross-gdb' 
> > > > make: *** [all] Error 2 
> > > > error: Bad exit status from /home/ned/src/ltib/tmp/rpm-tmp.56610 (%
> > > > build) 
> > > > 
> > > > 
> > > > I've attached the log file. 
> > > > 
> > > > ____________________________________________________________________
> > > > 
> > > >       
> > 
=]





reply via email to

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