I just solved this problem at work. I was building qemu 2.0 on an ubuntu 12.04 machine.
This error says there is a variable "link_layer" is missing in the struct "ibv_port_attr" That struct exists in the file /usr/include/infiniband/verbs.h. Your version of that file is older than qemu likes. In ubuntu that file is managed by the package "libibverbs-dev" http://packages.ubuntu.com/pt/trusty/libibverbs-dev If you build and install this package before building qemu your problem should be solved. -Nick