2013-04-03 92 views
1

我檢查了這個問題,它不適用。 Python missing or unusable error while cross compiling GDB在Cent OS下編譯gdb時Python缺失或無法使用5

我試圖建立GDB 7.5 Python支持分上OS 5

configure --with-expat --with-python 

不記錄任何錯誤和Python的devel的文件安裝。

我設置LDFLAGS="L/usr/local/expat-2.1 -L/opt/python27/lib

/opt/python27/lib包含:

rwxrwxrwx 1 root root  19 Mar 14 15:35 libpython2.7.so -> libpython2.7.so.1.0 
-r-xr-xr-x 1 root root 1893448 Aug 30 2012 libpython2.7.so.1.0 
drwxr-xr-x 2 root root 4096 Mar 14 15:35 pkgconfig 
drwxr-xr-x 27 root root 20480 Mar 14 21:49 python2.7 

運行make產生這個錯誤:

checking whether to use python... yes 
checking for python... /opt/python27/bin/python 
checking for python2.7... no 
configure: error: python is missing or unusable 

/opt/python27/bin/python存在具有正確的權限和可執行。

爲什麼鏈接進程找不到python?

+0

您需要閱讀'config.log'並找出失敗的原因。 – wRAR 2013-04-03 20:34:45

+0

config.log中沒有錯誤。 – Robert 2013-04-03 20:45:28

+0

然後你正在閱讀錯誤的config.log。 – wRAR 2013-04-03 20:47:38

回答

1

Why can't the link process find python?

這不是鏈接過程;這是其中一個子目錄中的配置過程。

找出它是子目錄(make應該說Leaving directory XXXX),並期待在config.log該子目錄中的什麼地方出了錯。

The reason I posted is that config.log does not point to a problem, yet when I run make I receive the error from the original post

make進程運行附加configure過程。您的錯誤是明確從該額外的過程。您聲稱檢查了所有子目錄中的所有config.log,但由於您描述的症狀,這似乎不太可能。

+0

這是我首先檢查的唯一錯誤是窒息錯誤。然後我檢查了所有其他人,看看他們是否會含有線索。我發佈的原因是config.log沒有指出問題,但是當我運行make時,我從原始帖子收到錯誤。 – Robert 2013-04-04 03:12:10

+0

@羅伯特我已經更新了答案;希望能夠更清楚地表明(或者至少看起來是)正在發生的事情。 – 2013-04-04 03:47:48

+0

感謝您更新回覆。所以,「make [1]:離開目錄'/home/rhancock/Downloads/gdb-7.5',這個目錄下的config.log最後一行是」configure:exit 0「,在文件中搜索」error「僅顯示阻塞錯誤。對「python」不區分大小寫的搜索僅顯示LDFLAGS的內容和文字命令行開關「python」。 – Robert 2013-04-04 14:16:44

2

下一行configure: error:行後應該是這樣的:

make[1]: [configure-gdb]: .... 

告訴你,這個錯誤來自運行配置gdb的子目錄。所以你應該看看那裏的config.log文件。這應該向你展示配置試圖做的失敗的事情 - 可能是編譯失敗的C代碼塊,並且來自編譯器的錯誤消息像'找不到包含文件'Python.h''。這告訴你問題是什麼 - 它無法找到用於在gdb中嵌入python的python頭文件。

現在你的問題可能會略有不同,但它可能與沒有正確安裝python嵌入組件相關。