This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

libcblas.a: could not read symbols: File in wrong format

Hi,

I'm trying to compile a program to use blas lib on k2hevm but I get these linking errors:

make[2]: Warning: File `Make.inc' has modification time 40467420 s in the future
/opt/ti-openmpi/bin/mpicc  -DHPL_CALL_CBLAS -I/home/mpiuser/hpl-annotations/include -I/home/mpiuser/hpl-annotations/include/arm  -I/opt/ti-openmpi/include  -O3  -o /home/mpiuser/hpl-annotations/bin/arm/xhpl HPL_pddriver.o         HPL_pdinfo.o           HPL_pdtest.o /home/mpiuser/hpl-annotations/lib/arm/libhpl.a  /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a /home/mpiuser/hpl-annotations/other_things/blas/lib/libatlas.a -L/opt/ti-openmpi/lib
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/usr/lib/gcc/arm-oe-linux-gnueabi/4.7.2/../../../../arm-oe-linux-gnueabi/bin/ld: /home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a(cblas_dgemm.o): Relocations in generic ELF (EM: 140)
/home/mpiuser/hpl-annotations/other_things/blas/lib/libcblas.a: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [dexe.grd] Error 1
make[2]: Leaving directory `/home/mpiuser/hpl-annotations/testing/ptest/arm'
make[1]: *** [build_tst] Error 2
make[1]: Leaving directory `/home/mpiuser/hpl-annotations'
make: *** [build] Error 2
collect2: error: ld returned 1 exit status

The blas lib files are those come with MCSDK, and I'm compiling these files locally on MCSDK_linux. I've compiled other files successfully without the blas lib. So would anyone please provide any idea on solving this?

Thanks,

Shang

  • I figure I need to rebuild the lib to target to arm?
  • Shang Li,

    The BLAS lib support is available in MCSDK-HPC package. Moving this thread over HPC forum for appropriate and faster response.

    Thank you.
  • The MCSDK HPC user guide is available: processors.wiki.ti.com/.../MCSDK_HPC_3.x_Getting_Started_Guide

    When we compile the BLAS inside HPC package, we didn't have any error:

    =============== blas =================
    Using FC_DIR = /usr/src/dsp/framework_components_3_31_00_02
    Using XDAIS_DIR = /usr/src/dsp/xdais_7_24_00_04
    Using BLAS_DIR = /usr/src/dsp/blas_c66x_3_11_0_3
    make[2]: Warning: File `../make.inc' has modification time 2357 s in the future
    Compiling blas_demo.cpp
    "/usr/include/xdc/std.h", line 100: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 101: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 102: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 103: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 104: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 105: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 106: warning: typedef name has already been declared (with same type)
    "/usr/include/xdc/std.h", line 107: warning: typedef name has already been declared (with same type)
    Compiling facade.c
    warning #10247-D: creating output section ".cio" without a SECTIONS
    specification
    Compiling kernel.cl
    =============== simple =================