error when linking it++ static lib

Help
lzeng
2013-07-10
2013-07-10
  • lzeng
    lzeng
    2013-07-10

    Hi, All:

    Because I am not Root, so I setup IT++ at a local directory. The compilation is fine but I got the following errors during creating the output file. I have no idea on the error messages. Could you please help me to resolve the issue? Thank you so much.

    checking dependencies

    compiling object file "obj/main.o" ...
    compiling object file "obj/PolarCode.o" ...
    compiling object file "obj/robprob.o" ...

    creating binary "bin/a.out"
    /home/lzeng/it++4.3.1/lib/libitpp_static.a(random.cpp.o): In function itpp::GlobalRNG_set_state(itpp::Vec<int> const&)': random.cpp:(.text+0xe3f): undefined reference toGOMP_critical_start'
    random.cpp:(.text+0xe55): undefined reference to `GOMP_critical_end'

    /home/lzeng/it++4.3.1/lib/libitpp_static.a(transforms.cpp.o): In function itpp::idct(itpp::Vec<double> const&, itpp::Vec<double>&)': transforms.cpp:(.text+0x255): undefined reference toGOMP_critical_start'
    transforms.cpp:(.text+0x26f): undefined reference to `GOMP_critical_end'

    /home/lzeng/it++4.3.1/lib/libitpp_static.a(transforms.cpp.o): In function Mutex::Mutex()': transforms.cpp:(.text._ZN5MutexC1Ev[Mutex::Mutex()]+0x11): undefined reference toomp_init_lock'
    /home/lzeng/it++4.3.1/lib/libitpp_static.a(transforms.cpp.o): In function Mutex::~Mutex()': transforms.cpp:(.text._ZN5MutexD1Ev[Mutex::~Mutex()]+0x11): undefined reference toomp_destroy_lock'

    /home/lzeng/it++external-3.2.0/lib/libblas.a(xerbla.o): In function xerbla_': xerbla.f:(.text+0x51): undefined reference to_gfortran_st_write'
    xerbla.f:(.text+0x61): undefined reference to _gfortran_transfer_character' xerbla.f:(.text+0x71): undefined reference to_gfortran_transfer_integer'
    xerbla.f:(.text+0x79): undefined reference to _gfortran_st_write_done' xerbla.f:(.text+0x83): undefined reference to_gfortran_stop_numeric'
    collect2: ld returned 1 exit status
    make: *** [bin] Error 1

     
    Last edit: lzeng 2013-07-10
  • andy_panov
    andy_panov
    2013-07-10

    Hi,

    Try to add -lgomp to your gcc flags. Please consult following thread http://devgurus.amd.com/thread/154719 regarding the unresolved symbols in xerbla (it seems you are using incompatible versions of gnu fortran and acml)

    Andy

     
  • Bogdan Cristea
    Bogdan Cristea
    2013-07-10

    You could use itpp-config script for passing command line arguments to gcc. IT++ 4.3.1 generates and installs this script