Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs -fPIC to build #4

Open
medakk opened this issue Jun 25, 2020 · 1 comment
Open

Needs -fPIC to build #4

medakk opened this issue Jun 25, 2020 · 1 comment

Comments

@medakk
Copy link

medakk commented Jun 25, 2020

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.

@michael-lehn
Copy link
Owner

michael-lehn commented Jun 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants