Skip to content

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