Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

Use git submodule to handle external dependence

Open pcchen opened this issue 1 year ago • 1 comments

I want to discuss the possibility of using git submodule to handle external dependence. There are three main dependences

  • boost
  • pybind11
  • openblas (if MKL is not used)

I find that, on Ubuntu Linux (2x.x), if I use apt to install libopenblas*, it does not contain lapacke.h. If you also install liblapacke-dev, then you can compile cytnx. But when you import cytnx, it will complain undefined symbol: LAPACKE_dstev. Finally I find that the libopenblas.so does not have LAPACKE_* symbols.

If you download, compile, and install OpenBLAS, say in /opt/OpenBLAS. (It is easy). Then your compiled libopenblas.so DO have LAPACKE_* symbols and you have head file lapacke.h in /opt/OpenBLAS/include.

Since openblas and pybind11 are not difficult to install. It might be a good idea to use git submodule to handle them to have better control, consistence. and is easier to debug the build process.

In https://github.com/tensor4all/xfac , they use git submodule to handle pybind11 dependence.

Also, since we only need a very small part of the boost, mabye we can only include this small part as a submodule?

pcchen avatar Aug 30 '24 07:08 pcchen

If I recall correctly, there has been attempt to do that, I'll investigate it

jeffry1829 avatar Aug 30 '24 14:08 jeffry1829