Skip to content

recompile with -fPIC on test_correctness_generator in CMake #4895

@bfloch

Description

@bfloch

I am aware that there is a new CMake PR in progress via #4644

For the time being I had similar errors like #3747 with the suggestion to "recompile with -fPIC".

This happened during the build of Halide on a fresh Fedora 32. The errors appeared on the python bindings tests for addconstant and user_context in python_bindings/correctness/CMakeLists.txt

Adding the POSITION_INDEPENDENT_CODE ON property for the static libs within halide.cmake fixed it for me.

  set_target_properties("${BASENAME}_cc" PROPERTIES
    POSITION_INDEPENDENT_CODE ON
    EXCLUDE_FROM_ALL TRUE)

Metadata

Metadata

Assignees

Labels

buildIssues related to building Halide and with CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions