oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

Issues with the makefile - what about a cmake based build system?

Open emmenlau opened this issue 3 years ago • 1 comments

Describe the bug I'm having difficulties using the makefile based build system. Don't get me wrong, Makefile's are very powerful and I've used them for the better part of my active developer's time. So I do not generally dislike Makefiles. But the current makefile has a number of shortcomings that would be much easier to fix in a modern environment like cmake.

Problem's I've found:

  • If ccache is used for the build, then GCC_TOOLCHAIN_PATH may be set wrongly, because which gcc points to ccache instead of the real gcc in /usr.
  • The build seems to work against TBB from the Intel oneAPI Base Toolkit, when TBBROOT is set to TARGETDIR/oneapi/tbb/latest/. However a few variables have to be adjusted for that to work. For example, in a few places $$TBBROOT is used where $(TBBROOT) seems more correct, and other similar issues.
  • I'd like to build without Java, but I fail to see how this can be configured.

There are other similar issues, that would be all easy to implement in cmake, but are quite challenging to implement in Makefiles. Would it be possible to consider a change?

emmenlau avatar Apr 09 '22 08:04 emmenlau

Ok I've just found the individual build targets in the makefile, and they make it at least possible to configure the needed parts, that's quite nice! I could use them to build without Java, and it gives more control if sequential or threaded is wanted.

emmenlau avatar Apr 09 '22 14:04 emmenlau

@emmenlau
Several notes - we would be migrating from make to bazel overtime, so we would skip cmake and would go to next generation build system. We already have initial bazel support but it's running on Linux primarily for now

Also sequential version of library was dropped - this means less things to control.

As for problems within make system - i don't think they would ever be fixed due to migration to bazel

napetrov avatar Jan 05 '23 19:01 napetrov