Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - gdb compiled, now gcc errors: (11 Items)
   
gdb compiled, now gcc errors  
Hi,
I successfully compiled gdb, continuing the same spirit I started gcc here is error message, I came across error that 
said no binutils-2.17, then I downloaded binutils for linux 2.17 from download area. This is as far I could get.

---------------------------snip--------------------
/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/./gcc/xgcc -B/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/./gcc
/ -B/opt/qnx630/host/linux/x86/usr/mips-unknown-nto-qnx6.3.0/bin/ -B/opt/qnx630/host/linux/x86/usr/mips-unknown-nto-qnx6
.3.0/lib/ -isystem /opt/qnx630/host/linux/x86/usr/mips-unknown-nto-qnx6.3.0/include -isystem /opt/qnx630/host/linux/x86/
usr/mips-unknown-nto-qnx6.3.0/sys-include -O2 -O2 -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-
prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include -I /usr/local/work/qnx632/target/qnx6/usr/
include -I. -I. -I/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/../gcc -I/home/prem/tmp/tools/gcc/trunk/linux-x86-o
-ntomips/../gcc/. -I/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/../gcc/../include -I/home/prem/tmp/tools/gcc/
trunk/linux-x86-o-ntomips/../gcc/../libcpp/include  -I/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/../gcc/../
libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized
-in-bss -fno-toplevel-reorder  -G 0 -fpic -mqnx-pic \
          -c /home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/../gcc/crtstuff.c -DCRT_BEGIN \
          -o crtbegin.o
/tmp/ccAClArB.s: Assembler messages:
/tmp/ccAClArB.s:37: Warning: expected `$'
/tmp/ccAClArB.s:37: Warning: Macro instruction expanded into multiple instructions
/tmp/ccAClArB.s:37: Error: junk at end of line, first unrecognized character is `l'
/tmp/ccAClArB.s:76: Warning: expected `$'
/tmp/ccAClArB.s:134: Warning: expected `$'
make[6]: *** [crtbegin.o] Error 1
make[6]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/gcc'
make[5]: *** [extra] Error 2
make[5]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/gcc'
make[4]: *** [stmp-multilib] Error 2
make[4]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips/gcc'
make[3]: *** [all-gcc] Error 2
make[3]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntomips'
make: *** [all] Error 2
Re: gdb compiled, now gcc errors  
> Hi,
> I successfully compiled gdb, continuing the same spirit I started gcc here is 
> error message, I came across error that said no binutils-2.17, then I 
> downloaded binutils for linux 2.17 from download area. This is as far I could 
> get.
> 

Hi Prem, 

Can you download and install the binutils 2.17 again? I posted updated binutils packages today. After reinstalling the 
binutils, do a svn up in the gcc dir to make sure you have latest revision. Then wipe out your build dirs except the 
GNUmakefile (i.e. rm -rf linux-x86-o-nto*/[!G]*) and then rebuild for the linux hosts with "make OSLIST=linux"

Regards,

Ryan Mansfield

Re: gdb compiled, now gcc errors  
Hi,
Here is what i did
-> installed new binutils
-> rm -rf linux-x86-o-nto*/[!G]*
-> svn up in gcc/.../trunk

-> make OSLIST=linux

new set of errors 
---------------------------snip---------------------
checking complex.h presence... yes
configure: WARNING: complex.h: present but cannot be compiled
configure: WARNING: complex.h:     check for missing prerequisite headers?
configure: WARNING: complex.h: see the Autoconf documentation
configure: WARNING: complex.h:     section "Present But Cannot Be Compiled"
configure: WARNING: complex.h: proceeding with the preprocessor's result
configure: WARNING: complex.h: in the future, the compiler will take precedence
configure: WARNING:     ## ----------------------------------------- ##
configure: WARNING:     ## Report this to the package-unused lists.  ##
configure: WARNING:     ## ----------------------------------------- ##
checking for complex.h... yes
checking for ISO C99 support in <complex.h>... no
checking for ISO C99 support in <stdio.h>... yes
checking for ISO C99 support in <stdlib.h>... no
checking for ISO C99 support in <wchar.h>... no
checking for fully enabled ISO C99 support... no
configure: Debug build flags set to -g3 -O0
checking for additional debug build... no
checking for extra compiler flags for building... 
checking for thread model used by GCC... posix
checking for atomic builtins... yes
checking for g++ that supports -ffunction-sections -fdata-sections... yes
checking for ld version... 21700
checking for ld that supports -Wl,--gc-sections... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES
.
make[3]: *** [configure-target-libstdc++-v3] Error 1
make[3]: Leaving directory `/home/pmallapp/tmp/tools/gcc/trunk/linux-x86-o-ntoppc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/pmallapp/tmp/tools/gcc/trunk/linux-x86-o-ntoppc'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/pmallapp/tmp/tools/gcc/trunk/linux-x86-o-ntoppc'
make: *** [all] Error 2
-----------------------------
Re: gdb compiled, now gcc errors  
> checking for ld that supports -Wl,--gc-sections... configure: error: Link 
> tests are not allowed after GCC_NO_EXECUTABLES.
> make[3]: *** [configure-target-libstdc++-v3] Error 1

You'll get this GCC_NO_EXECUTABLES error if your newly built cross compiler is unable to compile properly.

Can you go into the inux-x86-o-ntoppc build directory and type './gcc/xgcc -B gcc/ -xc -v - < /dev/null' and paste the 
output?

Regards,

Ryan Mansfield
Re: gdb compiled, now gcc errors  
Hi,
Sorry for the delay. here is the output
----------------------
Reading specs from gcc/specs
Target: powerpc-unknown-nto-qnx6.3.0
Configured with: ../configure --srcdir=.. --enable-cheaders=c --with-as=/usr/local/work/qnx632/host/linux/x86/usr/bin/
ntoppc-as-2.17 --with-ld=/usr/local/work/qnx632/host/linux/x86/usr/bin/ntoppc-ld-2.17 --with-sysroot=/usr/local/work/
qnx632/target/qnx6/ --disable-werror --libdir=/opt/qnx630/host/linux/x86/usr/lib --libexecdir=/opt/qnx630/host/linux/x86
/usr/lib --target=powerpc-unknown-nto-qnx6.3.0 --srcdir=/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntoppc/.. --prefix=/
opt/qnx630/host/linux/x86/usr --exec-prefix=/opt/qnx630/host/linux/x86/usr --with-local-prefix=/opt/qnx630/host/linux/
x86/usr --enable-languages=c++ --enable-threads=posix --disable-nls --disable-libssp --disable-tls --enable-__cxa_atexit
 --with-gxx-include-dir=/usr/local/work/qnx632/target/qnx6/usr/include/c++/4.2.1 --enable-multilib --enable-shared
Thread model: posix
gcc version 4.2.1
 gcc/cc1 -quiet -v -iprefix /home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntoppc/gcc/../lib/gcc/powerpc-unknown-nto-qnx6.3.
0/4.2.1/ -isystem gcc/include -idirafter /usr/local/work/qnx632/target/qnx6/usr/include -D__BIGENDIAN__ - -msdata=none -
mno-fp-moves -quiet -dumpbase - -auxbase - -version -o /tmp/ccK7bFEj.s
ignoring nonexistent directory "/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntoppc/gcc/../lib/gcc/powerpc-unknown-nto-
qnx6.3.0/4.2.1/include"
ignoring nonexistent directory "/home/prem/tmp/tools/gcc/trunk/linux-x86-o-ntoppc/gcc/../lib/gcc/powerpc-unknown-nto-
qnx6.3.0/4.2.1/../../../../powerpc-unknown-nto-qnx6.3.0/include"
ignoring nonexistent directory "/usr/local/work/qnx632/target/qnx6//opt/qnx630/host/linux/x86/usr/include"
ignoring nonexistent directory "/opt/qnx630/host/linux/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.3.0/4.2.1/include"
ignoring nonexistent directory "/opt/qnx630/host/linux/x86/usr/powerpc-unknown-nto-qnx6.3.0/include"
ignoring duplicate directory "/usr/local/work/qnx632/target/qnx6/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 gcc/include
 /usr/local/work/qnx632/target/qnx6//usr/include
End of search list.
GNU C version 4.2.1 (powerpc-unknown-nto-qnx6.3.0)
        compiled by GNU C version 4.2.1 (Debian 4.2.1-3).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 92bd14aebb8786427fef8edf304e3b88
 /usr/local/work/qnx632/host/linux/x86/usr/bin/ntoppc-as-2.17 -mppc -many -V -Qy -mbig -o /tmp/ccGmL7xw.o /tmp/ccK7bFEj.
s
GNU assembler version 2.17 (powerpc-unknown-nto-qnx6.3.0) using BFD version 2.17
 gcc/collect2 --sysroot=/usr/local/work/qnx632/target/qnx6/ --eh-frame-hdr -V -Qy -melf32ppcnto --dynamic-linker /usr/
lib/ldqnx.so.2 /usr/local/work/qnx632/target/qnx6/ppcbe/lib/crt1.o /usr/local/work/qnx632/target/qnx6/ppcbe/lib/crti.o 
gcc/crtbegin.o -Lgcc -L/usr/local/work/qnx632/target/qnx6//usr/lib /tmp/ccGmL7xw.o gcc/libgcc.a -L /usr/local/work/
qnx632/target/qnx6/ppcbe/lib/gcc/4.2.1 -L /usr/local/work/qnx632/target/qnx6/ppcbe/lib -L /usr/local/work/qnx632/target/
qnx6/ppcbe/usr/lib -L /usr/local/work/qnx632/target/qnx6/ppcbe/opt/lib -rpath-link /usr/local/work/qnx632/target/qnx6/
ppcbe/lib/gcc/4.2.1:/usr/local/work/qnx632/target/qnx6/ppcbe/lib:/usr/local/work/qnx632/target/qnx6/ppcbe/usr/lib:/usr/
local/work/qnx632/target/qnx6/ppcbe/opt/lib -lc -Bstatic -lc gcc/libgcc.a gcc/crtend.o /usr/local/work/qnx632/target/
qnx6/ppcbe/lib/crtn.o
GNU ld version 2.17
  Supported emulations:
   elf32ppcnto
/usr/local/work/qnx632/host/linux/x86/usr/bin/ntoppc-ld-2.17: a.out: Not enough room for program headers (allocated 5, 
need 6)
 Section to Segment mapping:
  Segment              Sections...
  00:           PHDR:  
  01:         INTERP:  .interp 
  02:           LOAD:  .interp .hash .dynsym .dynstr .rela.dyn .rela.plt .init .text .fini 
  03:           LOAD:  .eh_frame .ctors .dtors .jcr .dynamic .got .plt 
 ...
View Full Message
Re: gdb compiled, now gcc errors  
Hi Prem,

I've made a change in to the ppc linker to resolve this problem. I've committed a change and refreshed the binutils 
packages. Can you reinstall the latest package? 

Regards,

Ryan Mansfield
Re: gdb compiled, now gcc errors  
Thanks, 
This version of binutils works and compiles everything fine.
How to install these compiled files to QNX_HOST directory, 
make install doesn't seem to go smoothly
---------- Attached make install output -----
Attachment: Text install_err 117.91 KB
Re: gdb compiled, now gcc errors  
From the error log:

mkdir: cannot create directory `/usr/local/work/qnx632/target/qnx6/usr/include/c++/4.2.1': Permission denied

Regards,

Ryan Mansfield
Re: gdb compiled, now gcc errors  
Oops missed that one,
-Thanks
Re: gdb compiled, now gcc errors  
Hi Again,
there were a lot of following warnings/errors. Is  these warnings OK?
-----------------------
416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 12108 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 13451 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 12551 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 13505 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 12663 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 13559 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(sstream-inst.o): invalid string 
offset 12775 >= 10416 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29201 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29228 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29299 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29421 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29492 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29555 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.a(wlocale-inst.o): invalid string 
offset 29617 >= 29179 for section `.shstrtab'
BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/libstdc++.
-------------------------------------
Re: gdb compiled, now gcc errors  
> Hi Again,
> there were a lot of following warnings/errors. Is  these warnings OK?
> -----------------------
> 416 for section `.shstrtab'
> BFD: /opt/qnx630/host/linux/x86/usr/arm-unknown-nto-qnx6.3.0/lib/pic/be/
> libstdc++.a(sstream-inst.o): invalid string offset 12108 >= 10416 for section 

This appears to be a mismatch between the existing binutils (2.12) and binutils 2.17. On your system, I'm guessing arm-
unknown-nto-qnx6.3.0-ranlib is still 2.12. I haven't hit these warnings before because I've replaced the canonically 
named binutils (arm-unknown-nto-qnx6.3.0-*) with their 2.17 versions. 

The binutils packages on the Foundry download site do not overwrite the existing tools on purpose. 

The warning messages go away if you replace the 2.12 ranlib with its 2.17 version

For example:

" cp -f $QNX_HOST/usr/bin/ntoarm-ranlib-2.17 $QNX_HOST/usr/bin/arm-unknown-nto-qnx6.3.0-ranlib"

Regards,

Ryan Mansfield