conda-forge / lua-feedstock

A conda-smithy repository for lua.
BSD 3-Clause "New" or "Revised" License
3 stars 16 forks source link

Static library #38

Open HaoZeke opened 3 years ago

HaoZeke commented 3 years ago

Issue:

Linking against this in a new cmake build for a new recipe causes:

/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lapi.o): relocation R_X86_64_32 against hidden symbol `luaO_nilobject_' can not be used when making a PIE object
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ldebug.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ldo.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lgc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lmem.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lobject.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lparser.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lstate.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ltable.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ltm.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lundump.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lvm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lauxlib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(linit.o): relocation R_X86_64_32 against symbol `luaopen_base' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lcode.o): relocation R_X86_64_32S against hidden symbol `luaP_opmodes' can not be used when making a PIE object
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(llex.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lbaselib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lbitlib.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lcorolib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ldblib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(liolib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lmathlib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(loslib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(lstrlib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(ltablib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/conda/staged-recipes/build_artifacts/seams-core_1625445884165/_build_env/lib/liblua.a(loadlib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE

This seems related to the resolution of #30. Is there a way to determine which kind (static, shared) to get?

izahn commented 3 years ago

I guess this is coming from https://github.com/conda-forge/staged-recipes/pull/15499? That uses lua 5.2.4; shared libraries were only enabled in lua 5.4.0 and on. Is there a reason you pin to 5.2.4?

HaoZeke commented 3 years ago

Hi @izahn, yup it is related to https://github.com/conda-forge/staged-recipes/pull/15499. Unfortunately the sol3 lua-cpp wrapper used in d-SEAMS changed major versions from 2.x to 3.x (introducing some breaking changes) before supporting lua 5.4.x.

izahn commented 3 years ago

Right, well I'd prefer not to try maintaining a separate 5.2 branch, and share libraries are not available in existing conda-forge 5.2 builds. I'm not sure there is anything that can be done here, but I'm open to suggestions.