简体   繁体   English

如何判断是否配置并支持树外构建?

[英]How to tell if configure and make support out-of-tree builds?

I often need to build common link libraries like zlib, libpng, jpeglib, freetype, etc. for many different architectures. 我经常需要为许多不同的体系结构构建通用的链接库,例如zlib,libpng,jpeglib,freetype等。 I prefer to do out-of-tree builds then, like so: 我喜欢然后进行树外构建,如下所示:

mkdir build_linux_x64
cd build_linux_x64
../configure
make

This usually works fine but now I have read that this will only work if the following condition is met: "The project must be enabled for out-of-tree builds, typically with the user of VPATH if using make" ( Source ) 这通常可以正常工作,但是现在我已经读到,只有在满足以下条件的情况下,它才能正常工作:“必须为树外版本启用项目,如果使用make,通常必须由VPATH用户启用”(

This leads me to the question: How can I tell if a project is enabled for out-of-tree builds? 这就引出了一个问题:如何确定是否为树外构建启用了项目? Will configure or make just fail if the project isn't enabled for out-of-tree builds or how should I tell? configuremake如果该项目不乱树建立或我应该怎么告诉启用刚刚失败?

If the out-of-tree build works, then you know it works :). 如果树外构建有效,那么您就知道它有效:)。 When they say "enabled" they don't mean there's some switch or configuration option that the project has to turn on. 当他们说“启用”时,并不意味着项目必须打开某些开关或配置选项。 They mean that the author of the package needs to have written their Makefile.am (or Makefile.in if they don't use automake) files to work correctly when run out-of-tree. 它们的含义是,程序包的作者需要写出其Makefile.am (如果不使用automake则为Makefile.in )文件,以便在树外运行时正常工作。 There's no way to know whether these files are written correctly except by trying it out. 除非尝试一下,否则无法知道这些文件是否正确写入。

If you try it out and it doesn't work you should file a bug with the package. 如果您尝试了一下但仍无法正常工作,则应向软件包提交错误。

Note that the standard method of creating source distribution packages with autotools forces the use of out-of-tree builds, so if they're creating their source distribution using the standard methods then it will definitely build out-of-tree correctly. 请注意,使用自动工具创建源分发包的标准方法会强制使用树外构建,因此,如果他们使用标准方法创建源分发,则肯定可以正确构建树外。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在树中导入树外的git历史记录 - How to import out-of-tree git history in-tree 如何为启用安全启动时与 apt upgrade 一起使用的树外模块创建 Debian package - How to create Debian package for out-of-tree module that works with apt upgrade when secure boot is enabled 编译树外Linux内核模块时如何解决stdarg.h没有这样的文件或目录? - How can I solve stdarg.h No such file or directory while compiling out-of-tree Linux kernel module? 如何使用额外的include路径(包括外部头文件,yaml,boost等库文件)构建树外linux模块 - How to build an out-of-tree linux module with an additional include path (includes external header files, librairies like yaml, boost…) 针对文件系统上的任何内核源代码树编译树外内核模块 - Compiling out-of-tree kernel module against any kernel source tree on the filesystem 构建一个树外的Linux内核模块,它们与导出的符号共享目标文件 - Building an out-of-tree Linux kernel modules which share object files with exported symbols Linux内核:为内核构建树外模块,但在apt-cache搜索中没有linux-headers - Linux Kernel : Building Out-of-tree module for kernel , but no linux-headers in apt-cache search 如何通过程序配置DHCP超时? - how to Configure DHCP time out via program? 如何配置php以与mysql一起使用而无需重新编译 - how to configure php to work with mysql with out recompilation 如何在设备树中配置ADC ad7266的多路复用器选择? - How to configure the multiplexer select of the ADC ad7266 in the device tree?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM