As the title says I am trying to build gdb with python 2.7 support. I am using Tiny Core 5.4 (32bit) as a virtualbox guest. I downloaded gdb 7.5.1 as that is the current version in the repo. I checked the dependencies listed and made sure to install those from the repo. I decompressed the gdb source, ran "./configure --prefix=/usr/local --with-python --with-ncurses" and it runs fine. I then run make and it throws the following errors:
gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -c -o tui-command.o -MT tui-command.o -MMD -MP -MF .deps/tui-command.Tpo ./tui/tui-command.c
In file included from ./tui/tui-command.c:25:0:
./tui/tui-data.h:38:3: error: unknown type name 'WINDOW'
In file included from ./tui/tui-command.c:26:0:
./tui/tui-win.h:40:1: error: unknown type name 'chtype'
./tui/tui-win.h:41:1: error: unknown type name 'chtype'
./tui/tui-win.h:42:1: error: unknown type name 'chtype'
./tui/tui-win.h:43:1: error: unknown type name 'chtype'
./tui/tui-win.h:44:1: error: unknown type name 'chtype'
./tui/tui-win.h:45:1: error: unknown type name 'chtype'
./tui/tui-command.c: In function 'tui_dispatch_ctrl_char':
./tui/tui-command.c:79:15: error: unknown type name 'WINDOW'
./tui/tui-command.c:84:5: warning: implicit declaration of function 'wgetch' [-Wimplicit-function-declaration]
./tui/tui-command.c:85:21: error: 'ERR' undeclared (first use in this function)
./tui/tui-command.c:85:21: note: each undeclared identifier is reported only once for each function it appears in
./tui/tui-command.c:92:17: error: 'KEY_PPAGE' undeclared (first use in this function)
./tui/tui-command.c:94:17: error: 'KEY_NPAGE' undeclared (first use in this function)
./tui/tui-command.c:112:7: error: 'KEY_DOWN' undeclared (first use in this function)
./tui/tui-command.c:113:7: error: 'KEY_SF' undeclared (first use in this function)
./tui/tui-command.c:116:7: error: 'KEY_UP' undeclared (first use in this function)
./tui/tui-command.c:117:7: error: 'KEY_SR' undeclared (first use in this function)
./tui/tui-command.c:120:7: error: 'KEY_RIGHT' undeclared (first use in this function)
./tui/tui-command.c:123:7: error: 'KEY_LEFT' undeclared (first use in this function)
make[2]: *** [tui-command.o] Error 1
make[2]: Leaving directory `/home/tc/build/gdb-7.5.1/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/tc/build/gdb-7.5.1'
make: *** [all] Error 2
tc@box:~/build/gdb-7.5.1$
In my research I found the following link
https://github.com/hashdist/hashstack/issues/710, which said I needed to export some flags. Some more looking around and I found
http://wiki.tinycorelinux.net/wiki:creating_extensions which let me know what to set those flags to:
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl,-O1"
but I still get the same errors. I'm going to keep looking, but any help would be greatly appreciated.