Using apt-file to track down build errors(fatal error: X11/Intrinsic.h: No such file or directory)
来源:互联网 发布:中科vipexam数据库 编辑:程序博客网 时间:2024/06/05 06:56
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:~$ <strong>apt-file find Intrinsic.h</strong>libxt-dev: /usr/include/X11/Intrinsic.h
It appears, then, that you need to install the package libxt-dev.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Using apt-file to track down build errors
Someone was asking for help building XEphem on the XEphem mailing list.It was a simple case of a missing include file, where the only trickis to find out what package you need to install to get that file.(This is complicated on Ubuntu, which the poster was using,by the way they fragment the X developement headers into a maze ofa xillion tiny packages.)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.oranlib libz.amake[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.cIn 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 directoryIn 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 directoryIn file included from ../../libXm/linux86/Xm/Xm.h:61, from aavso.c:12:../../libXm/linux86/Xm/VirtKeys.h:108: error: expected `)' before `*' tokenIn 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.hlibxt-dev: /usr/include/X11/Intrinsic.htendra: /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.
- Using apt-file to track down build errors(fatal error: X11/Intrinsic.h: No such file or directory)
- Using apt-file to track down build errors(fatal error: X11/Intrinsic.h: No such file or directory)
- fatal error: X11/Xlib.h: No such file or directory
- 【解决】fatal error: X11/XXXX.h: No such file or directory
- error: X11/extensions/XInput.h: No such file or directory
- error: X11/xpm.h: No such file or directory 解决
- error: X11/xpm.h: No such file or directory 解决
- X11/Xlib.h: No such file or directory X11/xpm.h: No such file or directory
- fatal error: Python.h: No such file or directory
- fatal error: zlib.h: No such file or directory
- fatal error: png.h: No such file or directory
- fatal error: mysql.h: No such file or directory
- fatal error: linux/limits.h: No such file or directory
- fatal error: Python.h: No such file or directory
- fatal error: cocostudio/CocoStudio.h: No such file or directory
- fatal error: android/native_window.h: No such file or directory
- fatal error: curses.h: No such file or directory
- fatal error: curses.h: No such file or directory
- 安装编译和使用OpenCV(Mac OS X 10.10)
- android 如何获取当前时间
- Activity的四种launchMode
- 流体分离技术:茶多酚提纯膜过滤技术
- Socket通信
- Using apt-file to track down build errors(fatal error: X11/Intrinsic.h: No such file or directory)
- Linux加载vmlinux调试
- 经典SQL学习笔记 (七) - pl/sql编程一
- 如何使用GDI+装载图片对象(支持png图片)
- 《跨界杂谈》商业模式(三):黑帮
- python学习笔记6--python模块
- STL源码剖析 - 第5章 关联式容器 - set
- POJ 2186 Popular Cows (强连通分量)
- Python yield 使用浅析