http://www.kubuntuforums.net/showthread.php?58964-failure-to-compile-on-kubuntu
A very handy tool to help you through situations like these is apt-file. It catalogs individual files in packages and thus helps you discover which packages will offer files that you might require. To install the tool:
sudo apt-get install --no-install-recommends apt-file
sudo apt-file update
steve@x1:~$ apt-file find Intrinsic.h libxt-dev: /usr/include/X11/Intrinsic.h
It appears, then, that you need to install the package libxt-dev.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The solution -- apt-file -- is so simple and easy to use, and yeta lot of people don't know about it. So here's how it works.
The poster reported getting these compiler errors:
ar rc libz.a adler32.o compress.o crc32.o uncompr.o deflate.o trees.o zutil.o inflate.o inftrees.o inffast.o ranlib libz.a make[1]: Leaving directory `/home/gregs/xephem-3.7.4/libz' gcc -I../../libastro -I../../libip -I../../liblilxml -I../../libjpegd -I../../libpng -I../../libz -g -O2 -Wall -I../../libXm/linux86 -I/usr/X11R6/include -c -o aavso.o aavso.c In file included from aavso.c:12: ../../libXm/linux86/Xm/Xm.h:56:27: error: X11/Intrinsic.h: No such file or directory ../../libXm/linux86/Xm/Xm.h:57:23: error: X11/Shell.h: No such file or directory ../../libXm/linux86/Xm/Xm.h:58:23: error: X11/Xatom.h: No such file or directory ../../libXm/linux86/Xm/Xm.h:59:34: error: X11/extensions/Print.h: No such file or directory In file included from ../../libXm/linux86/Xm/Xm.h:60, from aavso.c:12: ../../libXm/linux86/Xm/XmStrDefs.h:1373: error: expected `=', `,', `;', `asm' or `__attribute__' before `char' In file included from ../../libXm/linux86/Xm/Xm.h:60, from aavso.c:12: ../../libXm/linux86/Xm/XmStrDefs.h:5439:28: error: X11/StringDefs.h: No such file or directory In file included from ../../libXm/linux86/Xm/Xm.h:61, from aavso.c:12: ../../libXm/linux86/Xm/VirtKeys.h:108: error: expected `)' before `*' token In file included from ../../libXm/linux86/Xm/Display.h:49, from ../../libXm/linux86/Xm/DragC.h:48, from ../../libXm/linux86/Xm/Transfer.h:44, from ../../libXm/linux86/Xm/Xm.h:62, from aavso.c:12: ../../libXm/linux86/Xm/DropSMgr.h:88: error: expected specifier-qualifier-list before `XEvent' ../../libXm/linux86/Xm/DropSMgr.h:100: error: expected specifier-qualifier-list before `XEvent'How do you go about figuring this out?
When interpreting compiler errors, usually what matters is the*first* error. So try to find that. In the transcript above, the firstline saying "error:" is this one:
../../libXm/linux86/Xm/Xm.h:56:27: error: X11/Intrinsic.h: No such file or directory
So the first problem is that the compiler is trying to find a filecalled Intrinsic.h that isn't installed.
On Debian-based systems, there's a great program you can use to findfiles available for install: apt-file. It's not installed by default,so install it, then update it, like this (the update will take a long time):
$ sudo apt-get install apt-file $ sudo apt-file updateOnce it's updated, you can now find out what package would install afile like this:
$ apt-file search Intrinsic.h libxt-dev: /usr/include/X11/Intrinsic.h tendra: /usr/lib/TenDRA/lib/include/x5/t.api/X11/Intrinsic.h
In this case two two packages could install a file by that name.You can usually figure out from looking which one is the"real" one (usually the one with the shorter name, or the onewhere the package name sounds related to what you're trying to do).If you're stil not sure, try something likeapt-cache show libxt-dev tendra
to find out moreabout the packages involved.
In this case, it's pretty clear that tendra is a red herring,and the problem is likely that the libxt-dev package is missing.So apt-get install libxt-dev
and try the build again.
Repeat the process until you have everything you need for the build.
Remember apt-file if you're not already using it.It's tremendously useful in tracking down build dependencies.