iree: Linux portability: Missing deps on `dl` for `threading` and `dynamic_library`
Some Linux systems need to link against -ldl
explicitly for these two libraries in iree/base/internal
(I’ve encountered this sporadically on weird systems but most recently on NVidia Jetson).
Just adding -ldl
to the DEPS of both makes it work. The right answer is to wrap the in a generator expression which activates only on Linux. However, these files are bazel_to_cmake controlled. Should I just add this in the CMake specific section as a target_link_libraries
? Bazel really lacks configurability and I don’t care about making it work on the non mainline systems.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (3 by maintainers)
Commits related to this issue
- Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702) — committed to kintel/iree by kintel 3 years ago
- Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702) (#6253) * Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702) * Separated out -ldl into a ... — committed to iree-org/iree by kintel 3 years ago
- Merge main -> google * 79cf15440 Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702).. * 44be4ec76 Fix broken links in TensorFlow framework doc. (#6279) * 3924a1034 Add a p... — committed to iree-org/iree by ThomasRaoux 3 years ago
- Merge main -> google * 79cf15440 Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702).. * 44be4ec76 Fix broken links in TensorFlow framework doc. (#6279) * 3924a1034 Add a p... — committed to iree-org/iree by ThomasRaoux 3 years ago
- Link CMAKE_DL_LIBS where needed instead of adding -ldl to linker flags (#5702) — committed to kintel/iree by kintel 3 years ago
Also +1 on build bot, and I think this one would be a good one to add: aarch64, pegged to old LTS release that we don’t want to regress on, important embedded platform – hits all of the weird (for Linux). I think I know how to dockerize it so that we can build/test it on regular build systems.