dekamps / miind

http://miind.sf.net
MIT License
13 stars 7 forks source link

miindsim and possibly miindsimv fail to build on intel architectures #49

Open hugh-osborne opened 2 years ago

hugh-osborne commented 2 years ago

Because these libraries are declared as shared (they are the python modules), on intel architecture, a linker flag -fPIC is required which has been missed in these two libraries.

The correct and easy fix is to add ${CMAKE_CXX_FLAGS} to the linking step in the CMakeLists.txt of both libraries:

Line 69 in MIIND_ROOT/libs/MiindPythonLib/CMakeList.txt: target_link_libraries( ${MIIND_LIBRARY_PREFIX}sim ${LIBLIST}) -> target_link_libraries( ${MIIND_LIBRARY_PREFIX}sim ${LIBLIST} ${CMAKE_CXX_FLAGS})

Line 73 in MIIND_ROOT/libs/MiindPythonGPULib/CMakeList.txt: target_link_libraries( ${MIIND_LIBRARY_PREFIX}simv ${LIBLIST}) -> target_link_libraries( ${MIIND_LIBRARY_PREFIX}simv ${LIBLIST} ${CMAKE_CXX_FLAGS})

Check that this doesn't break the github actions build process then push to master as a hotfix. There is no need for a new pypi version.