无法建立图书馆

时间:2017-07-09 19:20:18

标签: c makefile configuration-files

编译库时遇到了很多麻烦。该库是this页面上提供的ESFlib。它依赖于Mescach和Ckit库,这两个库都可以在之前链接的网页上找到。我在构建Ckit库时没有任何问题,但是我确实遇到了Meschach库的一些问题,这些问题与名为zmachine的文件有关。尽管如此,我还是设法使用rebuild.sh文件构建了一个mesach.a库文件。但是,当我尝试构建ESFlib文件时,我收到内部编译器错误。

我正在使用带有Ubuntu 64的虚拟盒机,如果这完全相关的话。我对这种东西很新,所以任何帮助都会非常感激,因为这个库的内容会为我节省很多时间!

此致 斯蒂芬

./configure和make

的结果
./configure
"\n            Note: \n        configure can be run with the option --enable-SECOND_DERIVATIVES=t\n        to build the ESFLIB version which supports second derivatives.\n"
"\n            Note: \n        configure can be run with the option --enable-WRAP_AROUND=t\n        to build the ESFLIB version which supports the wrap-around \n        \(diffraction\) method of weight function smoothing at crack tips.\n"
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing strerror... none required
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
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
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ranlib... ranlib
checking for gcc... yes
checking compile with prototypes... yes (gcc )
checking preprocessor... gcc  -E  
checking for _get_list_next in -lckit... yes
checking ckitcfg.h usability... yes
checking ckitcfg.h presence... yes
checking for ckitcfg.h... yes
checking for LUfactor in -lmeschach... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/x86_64-pc-linux-gnu/libmeschach.a... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/x86_64-pc-linux-gnu/meschach.a... checking /home/stephen/Documents/ESFLib/src/../../Meschach/libmeschach.a... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/meschach.a... yes
checking matrix2.h usability... yes
checking matrix2.h presence... yes
checking for matrix2.h... yes
checking for unistd.h... (cached) yes
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking for random... yes
checking for rand... yes
checking for isnan... yes
configure: creating ./config.status
config.status: creating Makefile

make
arch=`./config.guess`; arch=`config.sub $arch`; \
if test "xx86_64-pc-linux-gnu" != "x$arch" ; then \
    make reconfigure; \
fi
/bin/sh: 1: config.sub: not found
make[1]: Entering directory '/home/stephen/Documents/ESFLib/src'
make clean; ./configure
make[2]: Entering directory '/home/stephen/Documents/ESFLib/src'
for n in 1 2 3 ; do \
        make SPDIM=$n ESFLIB_LANG="" clean_${n}d; \
        make SPDIM=$n ESFLIB_LANG=f  clean_${n}d; \
done
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[3]: Entering directory '/home/stephen/Documents/ESFLib/src'
Cleaning build files
make[3]: Leaving directory '/home/stephen/Documents/ESFLib/src'
make[2]: Leaving directory '/home/stephen/Documents/ESFLib/src'
"\n            Note: \n        configure can be run with the option --enable-SECOND_DERIVATIVES=t\n        to build the ESFLIB version which supports second derivatives.\n"
"\n            Note: \n        configure can be run with the option --enable-WRAP_AROUND=t\n        to build the ESFLIB version which supports the wrap-around \n        \(diffraction\) method of weight function smoothing at crack tips.\n"
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing strerror... none required
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
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
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ranlib... ranlib
checking for gcc... yes
checking compile with prototypes... yes (gcc )
checking preprocessor... gcc  -E  
checking for _get_list_next in -lckit... yes
checking ckitcfg.h usability... yes
checking ckitcfg.h presence... yes
checking for ckitcfg.h... yes
checking for LUfactor in -lmeschach... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/x86_64-pc-linux-gnu/libmeschach.a... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/x86_64-pc-linux-gnu/meschach.a... checking /home/stephen/Documents/ESFLib/src/../../Meschach/libmeschach.a... no
checking /home/stephen/Documents/ESFLib/src/../../Meschach/meschach.a... yes
checking matrix2.h usability... yes
checking matrix2.h presence... yes
checking for matrix2.h... yes
checking for unistd.h... (cached) yes
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking for random... yes
checking for rand... yes
checking for isnan... yes
configure: creating ./config.status
config.status: creating Makefile
make[1]: Leaving directory '/home/stephen/Documents/ESFLib/src'
Removing dim dependent files
make SPDIM=1 make_1d
make[1]: Entering directory '/home/stephen/Documents/ESFLib/src'
Running make for dim=1
make[2]: Entering directory '/home/stephen/Documents/ESFLib/src'
Creating esflibtop.h from template
Creating esflib1.h
Compiling sf.c
In file included from sf.c:19:0:
esflibpriv.h:1:0: internal compiler error: Segmentation fault
 #ifndef ESFLIBPRIV_H
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:203: recipe for target 'sf.o' failed
make[2]: *** [sf.o] Error 1
make[2]: Leaving directory '/home/stephen/Documents/ESFLib/src'
Makefile:112: recipe for target 'make_c1d' failed
make[1]: *** [make_c1d] Error 2
make[1]: Leaving directory '/home/stephen/Documents/ESFLib/src'
Makefile:100: recipe for target '1d' failed
make: *** [1d] Error 2

1 个答案:

答案 0 :(得分:0)

我看到gcc在内存不足时崩溃 - 增加虚拟机实例的内存并重试。