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

generate position independent code #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jakobwenzel
Copy link

Using mstch in a shared object currently fails:

/usr/bin/ld: lib/mstch/src/libmstch.a(mstch.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(render_context.cpp.o): relocation R_X86_64_32S against symbol `_ZTVN5mstch15outside_sectionE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(template_type.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(token.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(utils.cpp.o): relocation R_X86_64_32 against symbol `_ZN5mstch6config6escapeB5cxx11E' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(outside_section.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: lib/mstch/src/libmstch.a(in_section.cpp.o): relocation R_X86_64_32S against symbol `_ZTVN5mstch10in_sectionE' can not be used when making a shared object; recompile with -fPIC

This PR addresses the issue by applying the linker's suggestion: Generating Posiion Independent Code

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

Successfully merging this pull request may close these issues.

1 participant