ulmBLAS icon indicating copy to clipboard operation
ulmBLAS copied to clipboard

Needs -fPIC to build

Open medakk opened this issue 5 years ago • 1 comments

I'm trying to follow along this tutorial and the build fails on Ubuntu 18.04 with gcc4.8

/usr/bin/ld: ../libulmblas.a(dsymm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../libulmblas.a(dgemm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../libulmblas.a(dgemm_nn.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:19: recipe for target 'dblat3_ulm' failed
make[1]: *** [dblat3_ulm] Error 1
make[1]: Leaving directory '/home/karthik/Documents/playground/ulmBLAS/test'
Makefile:13: recipe for target 'test' failed
make: *** [test] Error 2

I fixed it by adding -fPIC to CCFLAGS in src/Makefile and bench/Makefile.

medakk avatar Jun 25 '20 14:06 medakk

Hi Karthik,

thanks a lot for the info!

Michael


Dr. Michael Lehn University of Ulm, Institute for Numerical Mathematics Helmholtzstr. 20 D-89069 Ulm, Germany Phone: (+49) 731 50-23534, Fax: (+49) 731 50-23548

On 25. Jun 2020, at 17:00, Karthik Karanth [email protected] wrote:

I'm trying to follow along this tutorial http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/page01/index.html and the build fails on Ubuntu 18.04 with gcc4.8

/usr/bin/ld: ../libulmblas.a(dsymm.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../libulmblas.a(dgemm.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../libulmblas.a(dgemm_nn.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:19: recipe for target 'dblat3_ulm' failed make[1]: *** [dblat3_ulm] Error 1 make[1]: Leaving directory '/home/karthik/Documents/playground/ulmBLAS/test' Makefile:13: recipe for target 'test' failed make: *** [test] Error 2 I fixed it by adding -fPIC to CCFLAGS in src/Makefile and bench/Makefile.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/michael-lehn/ulmBLAS/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJEQMJOU5XVIFA3WVIAEILRYNQ7JANCNFSM4OIOSE4A.

michael-lehn avatar Jun 25 '20 16:06 michael-lehn