配置脚本不能找到stdlib。h或sys / types.h

时间:2021-06-21 18:27:41

Earlier I ran into an issue with Ubuntu on my machine. I have since fixed the issue. Currently I am trying to configure the latest stable version of MPICH (MPICH 3.0.4). However, it seems to fail when attempting to determine the size of basic datatypes.

早些时候,我在我的机器上遇到了Ubuntu的问题。我已经解决了这个问题。目前我正在尝试配置MPICH的最新稳定版本(MPICH 3.0.4)。然而,当试图确定基本数据类型的大小时,它似乎失败了。

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 mpich-discuss@mcs.anl.gov ##
configure: WARNING:     ## ---------------------------------------- ##

After looking through the config.log file, as suggested, I have found that the configure script cannot find sys/types.h or stdlib.h.

查看配置之后。如建议的那样,我发现configure脚本不能找到sys/types。h或stdlib.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
...

Yet, I have found them both: /usr/include/stdlib.h and /usr/include/sys/types.h. What could cause the configure script to not find these two system libraries?

然而,我发现他们都是:/usr/include/stdlib。h和/usr/include/sys/types.h.什么原因可能导致配置脚本无法找到这两个系统库?

2 个解决方案

#1


0  

With time not on my side, I decided to perform a fresh install of Ubuntu 12.04. After doing so, everything worked perfectly.

随着时间的推移,我决定重新安装Ubuntu 12.04。这样做之后,一切都很顺利。

#2


0  

I hit the same error when building on an RHEL5 box. It appears to be due to a failure to find libtorque.so.2, which is installed in /usr/local/lib on this system (which is not automatically searched for libraries). The clue was hidden in src/pm/hydra/config.log:

当我在一个RHEL5框上构建时,我遇到了同样的错误。这似乎是由于未能找到libtorqueso。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

The solution was to put /usr/local/lib in LD_LIBRARY_PATH.

解决方案是将/usr/local/lib放在LD_LIBRARY_PATH中。

#1


0  

With time not on my side, I decided to perform a fresh install of Ubuntu 12.04. After doing so, everything worked perfectly.

随着时间的推移,我决定重新安装Ubuntu 12.04。这样做之后,一切都很顺利。

#2


0  

I hit the same error when building on an RHEL5 box. It appears to be due to a failure to find libtorque.so.2, which is installed in /usr/local/lib on this system (which is not automatically searched for libraries). The clue was hidden in src/pm/hydra/config.log:

当我在一个RHEL5框上构建时,我遇到了同样的错误。这似乎是由于未能找到libtorqueso。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

The solution was to put /usr/local/lib in LD_LIBRARY_PATH.

解决方案是将/usr/local/lib放在LD_LIBRARY_PATH中。