Using apt-file to track down build errors(fatal error: X11/Intrinsic.h: No such file or directory)
2013-07-16 21:29
507 查看
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:
Code:
Next, update the catalog:
Code:
Finally, search for the file(s) in question. I checked for the first file missing in your post:
Code:
It appears, then, that you need to install the package libxt-dev.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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:
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:
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):
Once it's updated, you can now find out what package would install afile like this:
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 like
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
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.
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:
Code:
sudo apt-get install --no-install-recommends apt-file
Next, update the catalog:
Code:
sudo apt-file update
Finally, search for the file(s) in question. I checked for the first file missing in your post:
Code:
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.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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 wasusing,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.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 update
Once 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 like
apt-cache show libxt-dev tendrato 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-devand 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)
- fatal error: X11/Xlib.h: No such file or directory
- error: unable to invoke subcommand: /usr/bin/swift-build (No such file or directory)
- error: X11/Intrinsic.h: No such file or directory-reprint
- PIL的正确安装(“_imagingft.c:73:31: fatal error: freetype/fterrors.h: No such file or directory”)
- ndk编译C++,提示找不到头文件(ndk-build error string No such file or directory)
- .xsession-errors:openConnection: connect: No such file or directory cannot connect to brltty at :0
- mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-g
- centos环境下:gcc: error trying to exec 'cc1plus': execvp: No such file or directory
- arm-eabi-gcc: error trying to exec ‘cc1′: execvp: No such file or directory
- 当进行make命令学习是出现error trying to exec 'cc1': execvp: No such file or directory
- Ubuntu安装paramiko _openssl.c:433:30: fatal error: openssl/opensslv.h: No such file or directory
- gcc: error trying to exec 'cc1': execvp: No such file or directory
- 【Ubuntu】cannot find -lixxx && fatal error: xxx.h: No such file or directory 解决方法参考
- 阿里云服务器使用问题fatal error: Python.h: No such file or directory解决
- (诊断)处理错误fatal error: Python.h: No such file or directory
- src/core/ngx_regex.h:15:18:fatal error: pcre.h: No such file or directory
- fatal error: Python.h: No such file or directory 解决
- [异常解决] Make nRF51 DFU Project Appear "fatal error: uECC.h: No such file or directory"
- fatal error: zlib.h: No such file or directory