dynamic libs/ L2 gen error
Brought to you by:
rwhaley,
tonyc040457
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.
Remember that this tracker item:
https://sourceforge.net/tracker/index.php?func=detail&aid=3133692&group_id=23725&atid=379483
is waiting for the answer to this problem.
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.
shell script to update arch defs
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.
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
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