2013-08-22 74 views
-1

早些時候,我在我的機器上用Ubuntu運行了an issue。我已經解決了這個問題。目前我正在嘗試配置MPICH的最新穩定版本(MPICH 3.0.4)。但是,嘗試確定基本數據類型的大小似乎失敗。配置腳本無法找到stdlib.h或sys/types.h

checking size of char... 0 
checking size of unsigned char... 0 
checking size of short... 0 
checking size of unsigned short... 0 
checking size of int... 0 
checking size of unsigned int... 0 
checking size of long... 0 
checking size of unsigned long... 0 
checking size of long long... 0 
checking size of unsigned long long... 0 
checking size of float... 0 
checking size of double... 0 
checking size of long double... 0 
checking size of void *... 0 
checking for ANSI C header files... (cached) no 
checking stddef.h usability... yes 
checking stddef.h presence... yes 
checking for stddef.h... yes 
checking size of wchar_t... 0 
checking size of float_int... 0 
checking size of double_int... 0 
checking size of long_int... 0 
checking size of short_int... 0 
checking size of two_int... 0 
checking size of long_double_int... 0 
checking sys/bitypes.h usability... no 
checking sys/bitypes.h presence... yes 
configure: WARNING: sys/bitypes.h: present but cannot be compiled 
configure: WARNING: sys/bitypes.h:  check for missing prerequisite headers? 
configure: WARNING: sys/bitypes.h: see the Autoconf documentation 
configure: WARNING: sys/bitypes.h:  section "Present But Cannot Be Compiled" 
configure: WARNING: sys/bitypes.h: proceeding with the compiler's result 
configure: WARNING:  ## ---------------------------------------- ## 
configure: WARNING:  ## Report this to [email protected] ## 
configure: WARNING:  ## ---------------------------------------- ## 

翻翻config.log文件的建議後,我發現,configure腳本找不到sys/types.hstdlib.h

... 
checking for sysroot... no 
checking for mt... mt 
checking if mt is a manifest tool... no 
checking for ANSI C header files... no 
checking for sys/types.h... no 
checking for sys/stat.h... no 
checking for stdlib.h... no 
checking for string.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
... 

然而,我發現他們兩個:/usr/include/stdlib.h/usr/include/sys/types.h。什麼可能導致配置腳本找不到這兩個系統庫?

+2

'configure'創建一個名爲'config.log'的日誌文件,記錄每個小測試C程序的源代碼,可能的編譯器錯誤以及每個程序調用的結果。看看更多的線索。 –

+0

@HristoIliev我編輯了我原來的帖子。原來configure腳本沒有找到'stdlib.h'或'sys/types.h'。任何想法爲什麼? –

+0

在Ubuntu 11.10和12.04中,'sys'目錄被移動到特定體系結構的位置,例如, '/ usr/include/x86_64-linux-gnu/sys',並且必須明確地將'-I/usr/include/x86_64-linux-gnu'添加到預處理器選項中。 –

回答

0

隨着時間的推移,我決定重新安裝Ubuntu 12.04。這樣做之後,一切都很完美。

0

在RHEL5盒子上構建時,我遇到了同樣的錯誤。這似乎是由於找不到libtorque.so.2,這是安裝在此係統上的/usr/local/lib(它不會自動搜索庫)。線索藏在src/pm/hydra/config.log

configure:15881: checking size of unsigned int 
configure:15886: gcc -o conftest -O2 -I/home/price/Software/mpich-3.0.4/src/mpl/include -I/home/price/Software/mpich-3.0.4/src/mpl/include -I/home/price/Software/mpich-3.0.4/src/openpa/src -I/home/price/Software/mpich-3.0.4/src/openpa/src -I/home/price/Software/mpich-3.0.4/src/mpi/romio/include -lnsl conftest.c -ltorque >&5 
configure:15886: $? = 0 
configure:15886: ./conftest 
./conftest: error while loading shared libraries: libtorque.so.2: cannot open shared object file: No such file or directory 

的解決辦法是把/usr/local/libLD_LIBRARY_PATH