What is config.log on osx and where does it live?

≯℡__Kan透↙ 提交于 2020-01-02 01:22:09

问题


Can anyone explain what 'configure' is and does, where the config.log file can be found in general?

This is in relation to a specific problem ( gcc not working - Xcode 3.2.6 - Snow Leopard ) but I thought this question might be of more general interest:

When trying to install rubies with RVM, and I think possibly anything involving Xcode's gcc compiler, or possibly even more general than that, if there are errors then the logs usually refer to a config.log file. E.g. in my /yaml/configure.log I get:

configure: error: in `/Users/duncanstuart/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

Googling around suggests that this file is specific to the package being installed, but various posts give a number of different locations, none of which exist on my machine - e.g. Error installing PostgreSQL on Mac OS X 10.5 using MacPorts says it's somewhere under /opt/local/var/

Can't install Ruby under Lion with RVM – GCC issues contains an example config.log which says:

This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.


回答1:


configure is part of a common source package layout - it's usually responsible for inspecting the target system and seeing what compilers, syscalls, libraries etc. are available on it. Using this information features are then enabled/disabled at build time.

Often (thought not always) it is automatically generated by autoconf from configure.ac (or configure.in).

config.log is used to store the results of tests - this can be useful to developers or to try and figure out why some optional feature was not built. It's stored in the current directory, at the time configure was called, thus for "in tree" builds it would be found at /Users/duncanstuart/.rvm/src/yaml-0.1.4 (or possibly a directory or two up if there was a sub directory being configured).



来源:https://stackoverflow.com/questions/8721779/what-is-config-log-on-osx-and-where-does-it-live

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!