首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在mac os x上安装cgdb

在mac os x上安装cgdb
EN

Stack Overflow用户
提问于 2014-08-09 05:59:26
回答 3查看 2.5K关注 0票数 1

我知道这可能很容易,我已经查看了read文件和cgdb中的其他文件,比如。我试图安装cgdb,说明说:

代码语言:javascript
复制
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

但是,在我从运行git克隆命令获得的文件中没有这样的文件。即跑步:

代码语言:javascript
复制
$ git clone git://github.com/cgdb/cgdb.git

我在文件中查看了安装说明,它说:

代码语言:javascript
复制
Basic Installation
==================

   These are generic installation instructions.

   The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation.  It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions.  Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').

   If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release.  If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.

   The file `configure.in' is used to create `configure' by a program
called `autoconf'.  You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.

    The simplest way to compile this package is:  

1. `cd' to the directory containing the package's source code and type
     `./configure' to configure the package for your system.  If you're
     using `csh' on an old version of System V, you might need to type
     `sh ./configure' instead to prevent `csh' from trying to execute
     `configure' itself.

     Running `configure' takes awhile.  While running, it prints some
     messages telling which features it is checking for.

  2. Type `make' to compile the package.

  3. Optionally, type `make check' to run any self-tests that come with
     the package.

  4. Type `make install' to install the programs and any data files and
     documentation.

  5. You can remove the program binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package for
     a different kind of computer), type `make distclean'.  There is
     also a `make maintainer-clean' target, but that is intended mainly
     for the package's developers.  If you use it, you may have to get
     all sorts of other programs in order to regenerate files that came
     with the distribution.

还有更多我没有粘贴的。

令我困惑的部分是以下段落:

代码语言:javascript
复制
   The file `configure.in' is used to create `configure' by a program
called `autoconf'.  You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.

这是否意味着我应该运行./figre.in?我有点害怕运行它,因为我需要以sudo的形式运行它,而且在我从git克隆获得的代码中,该文件甚至没有退出。这就是我在那个目录中所拥有的:

代码语言:javascript
复制
➜  cgdb git:(master) ls
AUTHORS          Makefile.am      autogen.sh       doc              roadmap.txt
COPYING          NEWS             autorelease.sh   indent.sh        test
ChangeLog        README           cgdb             lib
FAQ              README.md        config           packages
INSTALL          TODO             configure.init   release-todo.txt
➜  cgdb git:(master)

我在那个目录中为config或config.in做了grep,但是它没有产生任何有用的结果。

我也尝试过安装brew,但遇到了问题。当我cgdb文件并点击它时,在打印状态下运行它,而不是像在(gdb)中那样移动到gdb的下一个命令提示符。有人知道些什么吗?是因为我使用的是go源文件吗?

人们做了什么让cgdb在mac上工作?

EN

回答 3

Stack Overflow用户

发布于 2014-08-09 07:56:32

Неу,是的,cgdb的git源代码没有附带预构建的配置脚本。(不过,官方发行版确实如此。)

如果安装了正确的工具,可以通过运行以下命令来修复这个问题:

代码语言:javascript
复制
./autogen.sh

这将生成配置脚本,然后您可以像安装任何其他基于autoconf的源代码包一样安装它。

票数 1
EN

Stack Overflow用户

发布于 2014-08-09 08:48:12

忘记所有那些带有配置和依赖库的快捷键;安装MacPorts,然后做:

代码语言:javascript
复制
$ sudo port install cgdb

在编写本报告时,它们的数量为0.6.7。

票数 1
EN

Stack Overflow用户

发布于 2014-08-09 18:15:30

对我起作用的是:

代码语言:javascript
复制
brew install cgdb

然而,对我来说,这还不够。我需要这样做它才能运行:

代码语言:javascript
复制
sudo cgdb

我从来没有想到我需要这样做.我想出来了,因为它把我抛到了下面这个问题中提到的错误:

gdb失败,出现“无法找到进程id的Mach任务端口”错误。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25215695

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档