I get errors when I build gdb.
- target is the m54455EVB.
- build release is ltib-mcfv4m-20090730
- host is running fedora 10.
- here are the packages and patches it is using.
$ ls /opt/freescale/pkgs/gdb*.*
/opt/freescale/pkgs/gdb-4.2-82-from-fsf-6_6.diff.gz
/opt/freescale/pkgs/gdb-4.2-82-from-fsf-6_6.diff.gz.md5
/opt/freescale/pkgs/gdb-6.0-tcsetpgrp.patch
/opt/freescale/pkgs/gdb-6.0-tcsetpgrp.patch.md5
/opt/freescale/pkgs/gdb-6.6.tar.gz
/opt/freescale/pkgs/gdb-6.6.tar.gz.md5
- here is the error:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -DTRAD_CORE -I. -I.././bfd -I.././bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c -o trad-core.lo trad-core.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -DTRAD_CORE -I. -I.././bfd -I.././bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c trad-core.c -o trad-core.o
trad-core.c: In function 'trad_unix_core_file_p':
trad-core.c:122: error: 'UPAGES' undeclared (first use in this function)
trad-core.c:122: error: (Each undeclared identifier is reported only once
trad-core.c:122: error: for each function it appears in.)
trad-core.c:191: error: 'HOST_TEXT_START_ADDR' undeclared (first use in this function)
trad-core.c:197: error: 'HOST_STACK_END_ADDR' undeclared (first use in this function)
make[4]: *** [trad-core.lo] Error 1
make[4]: Leaving directory `/opt/freescale/ltib-mcfv4m-20090730/rpm/BUILD/gdb-6.6/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/freescale/ltib-mcfv4m-20090730/rpm/BUILD/gdb-6.6/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/freescale/ltib-mcfv4m-20090730/rpm/BUILD/gdb-6.6/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/opt/freescale/ltib-mcfv4m-20090730/rpm/BUILD/gdb-6.6'
make: *** [all] Error 2
error: Bad exit status from /opt/freescale/ltib-mcfv4m-20090730/tmp/rpm-tmp.22193 (%build)
RPM build errors:
Bad exit status from /opt/freescale/ltib-mcfv4m-20090730/tmp/rpm-tmp.22193 (%build)
Build time for gdb: 180 seconds
Failed building gdb
已解决! 转到解答。
Those values are defined in user.h in the linux kernel includes for the m68k architecture, there are many ways to fix this issue, I was in a hurry and just copied linux/include/asm-m68k/user.h into the gdb/bfd directory. Not elegant but effective.
Those values are defined in user.h in the linux kernel includes for the m68k architecture, there are many ways to fix this issue, I was in a hurry and just copied linux/include/asm-m68k/user.h into the gdb/bfd directory. Not elegant but effective.
Thank you.
I patched /opt/freescale/usr/local/gcc-4.3.43-eglibc-2.5.43/m68k-linux/m68k-linux-gnu/libc/usr/include/sys/user.h, so that it has the missing code block from
/opt/freescale/ltib-mcfv4m-20090730/rpm/BUILD/linux-2.6.25/include/asm-m68k/user.h and rebuilt everything. gdb is working now.