Menu

#166 dynamic libs/ L2 gen error

Developer
closed-out-of-date
8
2011-05-16
2011-01-21
No

Problem can be demonstrated on tony2. Configure with --shared results in:

ld: libatlas.a(ATL_dger2k__900004.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
libatlas.a(ATL_dger2k__900004.o): could not read symbols: Bad value

Need to track this down.

Discussion

  • R. Clint Whaley

    R. Clint Whaley - 2011-04-14

    The problem comes when the arch defs specify flags. In this case, the -fPIC is not added to those kernels that had their flags specified. Easiest fix for now is to not use the arch defs.

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-04-21

    shell script to update arch defs

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-04-21

    OK, here is a workaround until I have time for a better fix:
    (1) Save the attached addpic.sh to the machine in which you wish to install shared libs while using arch defs
    (2) Do configure with --shared as normal, but don't start build yet
    (3) Scope your generated Make.inc file, and see what ARCH is set to (eg., Corei264AVX) whatever this string is, substitute it for $ARCH in the below instructions
    (4) In your ATLAS SRC directory:
    cd ATLAS/CONFIG/ARCHS
    /path/to/addpic.sh $ARCH
    (5) Now go back to build directory, and start the build.

    Please let me know if this works for you.

     
  • Alex Leach

    Alex Leach - 2011-04-22

    Hi,
    First, sorry if this is the wrong place to post... I've been having problems compiling shared atlas libraries on Mac OS X 10.6.6 (Mac Pro Xeon).
    I followed the instructions posted here yesterday, downloaded the addpic.sh script, ran it, and still get the same error.
    Any help would be really appreciated!!
    The steps I took after extracting atlas:-
    cd ATLAS
    mkdir build && cd build
    ../configure -Ss flapack $HOME/Downloads/sources/lapack-3.3.0/SRC/ -Si latune 1 -Fa alg -fPIC --shared
    # Found the arch in build/Make.inc (Corei764SSE3)
    # download addpic.sh to ATLAS/SRC/
    cd ../CONFIG/ARCHS
    sh ../../addpic.sh Corei764SSE3
    cd ../../build/
    make
    make check
    make ptcheck
    make time
    cd lib
    make shared # which ends in this error:-

    ld: unknown option: -melf_x86_64
    make[2]: *** [LDTRY] Error 1
    ld -melf_x86_64 -shared -soname /usr/local/atlas/lib/libsatlas.so -o libsatlas.so \
    -rpath-link /usr/local/atlas/lib \
    --whole-archive liblapack.a libf77blas.a libcblas.a libatlas.a --no-whole-archive -lpthread -lm
    ld: unknown option: -melf_x86_64
    make[2]: *** [LDTRY] Error 1
    gcc -fPIC -force_cpusubtype_ALL -m64 -fPIC -shared -o libsatlas.so -Wl,"rpath-link /usr/local/atlas/lib" \
    -Wl,--whole-archive liblapack.a libf77blas.a libcblas.a libatlas.a -Wl,--no-whole-archive -lpthread -lm
    ld: file not found: rpath-link /usr/local/atlas/lib
    collect2: ld returned 1 exit status
    make[2]: *** [GCCTRY] Error 1
    make[1]: *** [TRYALL] Error 2
    make: *** [fat_shared] Error 2

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-05-16

    OK, the above error should be fixed in 3.9.41. However, other errors my crop up: I haven't debugged the OS X shared lib build process in a while.

    I'm closing this report, open up a new one if you get errors with 3.9.41.

    Thanks!
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-05-16
    • status: open --> closed-out-of-date
     

Log in to post a comment.

MongoDB Logo MongoDB