gcc:跳过不兼容的库并返回错误

gcc:跳过不兼容的库并返回错误

这个问题与我的上一个问题。我正在尝试安装“TAUCS”图书馆

TAUCS 是一个稀疏线性求解器的 C 库。它依赖于 BLAS、ATLAS、LAPACK、METIS 等。

我按照@steeldriver 的解决方案操作,它在我的其中一台 ubuntu 计算机上运行,​​但在另一台计算机上运行不正常。

在其他计算机上,我收到以下错误:

$ sudo make "CC=gcc" "FC=gfortran" "LIBF77=-Wl,-Bstatic -lf2c -Wl,-Bdynamic -lgfortran"
mkdir obj
mkdir obj/linux/
echo exists > obj/linux/exists.log
gcc -c -O3 -Wall  -std=c99    -DMACHTYPE_ -I src/ -I build/linux/ -I external/src/   \
      progs/taucs_blas_underscore_test.c \
      -oobj/linux/taucs_blas_underscore_test.o
gcc   \
      -oobj/linux/taucs_blas_underscore_test \
      obj/linux/taucs_blas_underscore_test.o -L external/lib/linux -llapack -L external/lib/linux -lf77blas -lcblas -latlas -L external/lib/linux -lmetis  -Wl,-Bstatic -lf2c -Wl,-Bdynamic -lgfortran -lm 
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: cannot find -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: cannot find -lmetis
collect2: error: ld returned 1 exit status
make: [build/linux/taucs_config_tests.h] Error 1 (ignored)
obj/linux/taucs_blas_underscore_test build/linux/taucs_config_tests.h
make: obj/linux/taucs_blas_underscore_test: Command not found
make: [build/linux/taucs_config_tests.h] Error 127 (ignored)
gcc -c -O3 -Wall  -std=c99    -DMACHTYPE_ -I src/ -I build/linux/ -I external/src/   \
      progs/taucs_blas_nounderscore_test.c \
      -oobj/linux/taucs_blas_nounderscore_test.o
gcc   \
      -oobj/linux/taucs_blas_nounderscore_test \
      obj/linux/taucs_blas_nounderscore_test.o -L external/lib/linux -llapack -L external/lib/linux -lf77blas -lcblas -latlas -L external/lib/linux -lmetis  -Wl,-Bstatic -lf2c -Wl,-Bdynamic -lgfortran -lm 
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: cannot find -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: cannot find -lmetis
collect2: error: ld returned 1 exit status
make: [build/linux/taucs_config_tests.h] Error 1 (ignored)
obj/linux/taucs_blas_nounderscore_test build/linux/taucs_config_tests.h
make: obj/linux/taucs_blas_nounderscore_test: Command not found
make: [build/linux/taucs_config_tests.h] Error 127 (ignored)
gcc -c -O3 -Wall  -std=c99    -DMACHTYPE_ -I src/ -I build/linux/ -I external/src/   \
      progs/taucs_c99_complex_test.c \
      -oobj/linux/taucs_c99_complex_test.o
gcc   \
      -oobj/linux/taucs_c99_complex_test \
      obj/linux/taucs_c99_complex_test.o -L external/lib/linux -llapack -L external/lib/linux -lf77blas -lcblas -latlas -L external/lib/linux -lmetis  -Wl,-Bstatic -lf2c -Wl,-Bdynamic -lgfortran -lm 
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libf77blas.a when searching for -lf77blas
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libcblas.a when searching for -lcblas
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libatlas.a when searching for -latlas
/usr/bin/ld: cannot find -latlas
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible external/lib/linux/libmetis.a when searching for -lmetis
/usr/bin/ld: cannot find -lmetis
collect2: error: ld returned 1 exit status
make: [build/linux/taucs_config_tests.h] Error 1 (ignored)
obj/linux/taucs_c99_complex_test build/linux/taucs_config_tests.h
make: obj/linux/taucs_c99_complex_test: Command not found
make: [build/linux/taucs_config_tests.h] Error 127 (ignored)
gcc -c -O3 -Wall  -std=c99    -DMACHTYPE_ -I src/ -I build/linux/ -I external/src/   \
      progs/taucs_cilk_test.c \
      -oobj/linux/taucs_cilk_test.o
progs/taucs_cilk_test.c:8:19: fatal error: cilk.h: No such file or directory
 #include <cilk.h> 
                   ^
compilation terminated.
make: [build/linux/taucs_config_tests.h] Error 1 (ignored)
gcc   \
      -oobj/linux/taucs_cilk_test \
      obj/linux/taucs_cilk_test.o -L external/lib/linux -llapack -L external/lib/linux -lf77blas -lcblas -latlas -L external/lib/linux -lmetis  -Wl,-Bstatic -lf2c -Wl,-Bdynamic -lgfortran -lm 
gcc: error: obj/linux/taucs_cilk_test.o: No such file or directory
make: [build/linux/taucs_config_tests.h] Error 1 (ignored)
obj/linux/taucs_cilk_test build/linux/taucs_config_tests.h
make: obj/linux/taucs_cilk_test: Command not found
make: [build/linux/taucs_config_tests.h] Error 127 (ignored)
mkdir bin
mkdir bin/linux/
echo exists > bin/linux/exists.log
mkdir lib
mkdir lib/linux/
echo exists > lib/linux/exists.log
gcc -c -O3 -Wall  -std=c99    -DMACHTYPE_ -I src/ -I build/linux/ -I external/src/   \
    -DTAUCS_CORE_GENERAL \
    src/taucs_sn_llt.c \
    -oobj/linux/taucs_sn_llt.o
In file included from src/taucs_sn_llt.c:13:0:
src/taucs.h:6:32: fatal error: taucs_config_tests.h: No such file or directory
 #include <taucs_config_tests.h>
                                ^
compilation terminated.
make: *** [obj/linux/taucs_sn_llt.o] Error 1

当我查看以下位置时,我找到了这些文件:

$cd /home/dkumar/taucs_full/external/lib/linux
$ls
blas_aux.o  CVS  libatlas.a  libcblas.a  libf77blas.a  liblapack.a  libmetis.a

我该如何解决这个“不兼容的库”问题?

答案1

你必须安装 binutils 包,但缺少一些二进制文件

sudo apt-get 安装 binutils -y

相关内容