ecmwf / ecflow

ECMWF's workflow manager
Apache License 2.0
41 stars 15 forks source link

ecflow fails to build on armv7hl #136

Closed david-geiger closed 6 days ago

david-geiger commented 1 week ago

What happened?

Hi,

On Mageia Cauldron ecflow fails to build only on armv7hl with something like:

/usr/include/boost/asio/detail/reactive_socket_connect_op.hpp:69:(.text.unlikely+0x8bc): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(PlugCmd.cpp.o)(.text+0x1de4): R_ARM_TLS_LE32 relocation not permitted in shared object libs/libecflow_all.a(PlugCmd.cpp.o): in function boost::asio::detail::posix_mutex::unlock()': /usr/include/boost/asio/detail/posix_mutex.hpp:59:(.text+0x1de4): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(Ecf.cpp.o)(.text+0xf14): R_ARM_TLS_LE32 relocation not permitted in shared object libs/libecflow_all.a(Ecf.cpp.o): in functionEcf::incr_state_change_no()': /home/iurt/rpmbuild/BUILD/ecflow-5.13.5-build/ecFlow-5.13.5-Source/libs/core/src/ecflow/core/Ecf.cpp:88:(.text+0xf14): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(Ecf.cpp.o)(.text+0xf74): R_ARM_TLS_LE32 relocation not permitted in shared object libs/libecflow_all.a(Ecf.cpp.o): in function Ecf::incr_modify_change_no()': /home/iurt/rpmbuild/BUILD/ecflow-5.13.5-build/ecFlow-5.13.5-Source/libs/core/src/ecflow/core/Ecf.cpp:95:(.text+0xf74): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(Ecf.cpp.o)(.text+0xf78): R_ARM_TLS_LE32 relocation not permitted in shared object /home/iurt/rpmbuild/BUILD/ecflow-5.13.5-build/ecFlow-5.13.5-Source/libs/core/src/ecflow/core/Ecf.cpp:95:(.text+0xf78): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(Ecf.cpp.o)(.text+0xfac): R_ARM_TLS_LE32 relocation not permitted in shared object libs/libecflow_all.a(Ecf.cpp.o): in functionEcfPreserveChangeNo::EcfPreserveChangeNo()': /home/iurt/rpmbuild/BUILD/ecflow-5.13.5-build/ecFlow-5.13.5-Source/libs/core/src/ecflow/core/Ecf.cpp:102:(.text+0xfac): dangerous relocation: unsupported relocation /usr/bin/ld: libs/libecflow_all.a(Ecf.cpp.o)(.text+0xfe4): R_ARM_TLS_LE32 relocation not permitted in shared object libs/libecflow_all.a(Ecf.cpp.o): in function `EcfPreserveChangeNo::~EcfPreserveChangeNo()': /home/iurt/rpmbuild/BUILD/ecflow-5.13.5-build/ecFlow-5.13.5-Source/libs/core/src/ecflow/core/Ecf.cpp:107:(.text+0xfe4): dangerous relocation: unsupported relocation collect2: error: ld returned 1 exit status

Regards, David

What are the steps to reproduce the bug?

Compile on armv7 arch.

Version

5.13.5

Platform (OS and architecture)

Mageia Linux 32bit (armv7hl)

Relevant log output

No response

Accompanying data

No response

Organisation

No response

david-geiger commented 1 week ago

Attached full build log:

build.armv7hl.0.20241122192746.log

marcosbento commented 1 week ago

After some investigation, the failure to link the ecFlow Python extension seems to be due to a mismatch of the Position-independent code (PIC) options between:

We kindly recommend passing the option -DCMAKE_POSITION_INDEPENDENT_CODE=ON when configuring the CMake project.

This ensures that all ecFlow build artefacts are built with PIC enabled and, based on our experiments in a Mageia Cauldron docker based environment, allows a successful build.

david-geiger commented 6 days ago

I confirm that passing the option -DCMAKE_POSITION_INDEPENDENT_CODE=ON fixes build! Thanks a lot for the fix :)

Regards, David