Buildling gdb on Ubuntu 18.04

Simon Marchi
Wed Jan 30 15:50:00 GMT 2019

On 2019-01-30 10:12, Ömer Sinan Ağacan wrote:
> Actually it's not undefined, I see this in the file
>     /* Define as the return type of ptrace. */
>     #define PTRACE_TYPE_RET long
> Do I need to include config.h in a file maybe?

config.h should already be included wherever necessary.  I am a bit at 
loss here.  GDB should build fine using these standard steps in most 

git clone git://
cd binutils-gdb

I just tried these commands in an Ubuntu 18.04 Docker container, and it 
built fine.  Note that to make sure to have all necessary dependencies 
required to build GDB, you can use "apt-get build-dep gdb" on 
Debian/Ubuntu (to be able to use "build-dep" in a docker container, you 
need to uncomment the "deb-src" lines in /etc/apt/sources.list and do an 
"apt-get update").  The versions of all the build tools in Ubuntu 18.04 
are expected to work, so there should be no need to build bison or 
anything from source.


More information about the Gdb mailing list