1

我不是 C++ 人,所以请多多包涵。在我看来,最新的ddccontrol tarball 缺少 makefile 所需的 C++ 文件,但它指的是我无论如何都不需要的过时硬件。我可以简单地从需要此文件的 makefile 中删除该行并愉快地继续我的方式吗?运行make check时,我收到以下错误:

 - bruno():ddccontrol-0.4.2$ make check
Making check in src
make[1]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src'
Making check in lib
make[2]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src/lib'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src/lib'
Making check in ddccontrol
make[2]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src/ddccontrol'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src/ddccontrol'
Making check in gddccontrol
make[2]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src/gddccontrol'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src/gddccontrol'
Making check in ddcpci
make[2]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src/ddcpci'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src/ddcpci'
make[2]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/src'
make[2]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src'
make[1]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/src'
Making check in po
make[1]: Entering directory `/home/dotancohen/ddccontrol-0.4.2/po'
make[1]: *** No rule to make target `../src/ddcpci/intel740.c', needed by `ddccontrol.pot'.  Stop.
make[1]: Leaving directory `/home/dotancohen/ddccontrol-0.4.2/po'
make: *** [check-recursive] Error 1

考虑从以下复制和粘贴/home/dotancohen/ddccontrol-0.4.2/po/Makefile

POTFILES = \
    ../src/ddccontrol/main.c \
    ../src/ddcpci/i2c-algo-bit.c \
    ../src/ddcpci/intel740.c \
    ../src/ddcpci/intel810.c \
    ../src/ddcpci/main.c \
    ../src/ddcpci/nvidia.c \
    ../src/ddcpci/radeon.c \
    ../src/gddccontrol/fspatterns.c \
    ../src/gddccontrol/gddccontrol.desktop.in \
    ../src/gddccontrol/gprofile.c \
    ../src/gddccontrol/main.c \
    ../src/gddccontrol/notebook.c \
    ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in \
    ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml \
    ../src/gnome-ddcc-applet/ddcc-applet.c \
    ../src/lib/conf.c \
    ../src/lib/ddcci.c \
    ../src/lib/monitor_db.c

并考虑这些确实存在的文件:

 - bruno():ddccontrol-0.4.2$ ls -la src/ddcpci/
total 544
drwxrwxr-x 4 dotancohen dotancohen   4096 Nov 14 08:29 .
drwxrwxr-x 7 dotancohen dotancohen   4096 Nov 14 08:28 ..
-rwxrwxr-x 1 dotancohen dotancohen 139344 Nov 14 08:29 ddcpci
-rw-r--r-- 1 dotancohen dotancohen   1900 Mar  9  2006 ddcpci.h
drwxrwxr-x 2 dotancohen dotancohen   4096 Nov 14 08:29 .deps
-rw-r--r-- 1 dotancohen dotancohen  13597 Jun 15  2006 i2c-algo-bit.c
-rw-r--r-- 1 dotancohen dotancohen   2573 Jan 10  2005 i2c-algo-bit.h
-rw-rw-r-- 1 dotancohen dotancohen  92536 Nov 14 08:29 i2c-algo-bit.o
-rw-r--r-- 1 dotancohen dotancohen   8029 Apr  5  2006 intel810.c
-rw-rw-r-- 1 dotancohen dotancohen  27432 Nov 14 08:29 intel810.o
drwxrwxr-x 2 dotancohen dotancohen   4096 Nov 14 08:29 .libs
-rw-r--r-- 1 dotancohen dotancohen   8706 Mar  3  2006 main.c
-rw-rw-r-- 1 dotancohen dotancohen  47752 Nov 14 08:29 main.o
-rw-rw-r-- 1 dotancohen dotancohen  19944 Nov 14 08:28 Makefile
-rw-r--r-- 1 dotancohen dotancohen    265 Mar  3  2006 Makefile.am
-rw-r--r-- 1 dotancohen dotancohen  17227 Jul 27  2006 Makefile.in
-rw-r--r-- 1 dotancohen dotancohen   5647 Feb 14  2006 nvidia.c
-rw-rw-r-- 1 dotancohen dotancohen  21720 Nov 14 08:29 nvidia.o
-rw-r--r-- 1 dotancohen dotancohen   6982 Jul 11  2006 radeon.c
-rw-rw-r-- 1 dotancohen dotancohen  25416 Nov 14 08:29 radeon.o
-rw-r--r-- 1 dotancohen dotancohen   4832 Mar  3  2006 sis.c
-rw-rw-r-- 1 dotancohen dotancohen  24504 Nov 14 08:29 sis.o
-rw-r--r-- 1 dotancohen dotancohen   5814 Mar  3  2006 via.c
-rw-rw-r-- 1 dotancohen dotancohen  22200 Nov 14 08:29 via.o

请注意,./configure为了成功,我确实必须安装一些软件包:

sudo aptitude install libxml2-dev pciutils-dev libgtk2.0-dev

我可以简单地../src/ddcpci/intel740.c \从makefile中删除该行吗?

4

1 回答 1

2

尝试删除它。这可能只是意味着该文件中的功能(您不需要任何方法)将丢失。

根据 makefile 的构成方式,当链接器找不到该模块的目标文件时,您可能会从链接器收到错误,但它可能会被自动处理。

然而,更严重的风险是,还有其他代码依赖于该丢失文件中的代码;在这种情况下,链接器将报告未解决的依赖关系并修复您必须修改代码,而不仅仅是生成文件。

于 2013-11-14T06:57:55.257 回答