Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to compile bochs from source, I've already run this command:

./configure --with-x11 --with-wx --enable-ne2000 --enable-gdb-stub
 --enable-disasm --enable-e1000 --enable-usb --enable-pci

now it's time to run make.. after a while I get this error:

/usr/bin/ld: gui/libgui.a(x.o): undefined reference to symbol 'XSetForeground'
/usr/lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Any clue?

share|improve this question
I don't think that bochs source have this kind of bug. By the way the source can be downloaded from bochs homepage – Luca D'Amico Nov 12 '13 at 15:38
Installing xorg-dev fixed the problem! Thanks!! :) – Luca D'Amico Nov 12 '13 at 22:01
Next time you may also use auto-apt – Braiam Nov 13 '13 at 0:22
up vote 3 down vote accepted

If you are going to use --with-x11 you need the xorg-dev package installed.

sudo apt-get install xorg-dev

This will take care of all the possible dependencies that Bosch will need.

share|improve this answer
Mate I've another error with bochs dependencies: – Luca D'Amico Nov 12 '13 at 23:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.