rdkit / homebrew-rdkit

Homebrew formula for rdkit
44 stars 19 forks source link

rdpath in dylibs is not set (10.15.7 intel) #112

Open wgscott opened 3 years ago

wgscott commented 3 years ago

rpath unset in most of the libraries. eg:

otool -L libRDKitSimDivPickers.2020.09.1.dylib | grep rpath @rpath/libRDKithc.1.dylib (compatibility version 1.0.0, current version 2020.9.1) @rpath/libRDKitRDGeneral.1.dylib (compatibility version 1.0.0, current version 2020.9.1)

UnixJunkie commented 3 years ago

And so, how should we fix this?

UnixJunkie commented 3 years ago

Also, does this break something? I just use rdkit from Python and it looks like it is working even if I use this brew installer.

UnixJunkie commented 3 years ago

A pull request to fix/improve this would be welcome.

YoshitakaMo commented 3 years ago

This issue will be solved by adding -DCMAKE_INSTALL_RPATH=#{opt_lib}. See also https://github.com/Homebrew/homebrew-core/pull/71694 .

And I recommend using homebrew-core's rdkit formula instead.

brew untap rdkit/rdkit # if required
brew install rdkit
UnixJunkie commented 3 years ago

@YoshitakaMo if you created a new brew formula for rdkit, and this is to be the standard one, maybe it should be announced on the rdkit-mailing list... I was not aware of it, despite I try to maintain this recipe, which many people have contributed to over the years.

YoshitakaMo commented 3 years ago

Since RDKit is now also used as a component of other programs such as Coot, I created a new RDKit formula as a byproduct of it. Also, because the RDKit formula of this repository has not been updated recently and its syntax (e.g. install options such as --with-python3) became outdated, I had to create a new one to pass the homebrew-core's CI. Although I have tried it with some test scripts, I cannot guarantee its full functionality since I am not a hard-core user of RDKit.

I would like to thank the long-time contributors of this formula. I'll consider announcing it on the mailing list.

UnixJunkie commented 3 years ago

Did you create your formula starting from this one? If not, I will have to go look the differences, to check that what is here was also included in the new formula. For example, the formula here even works on Linux homebrew !

The fact that in your new formula, several things are no more optional makes it quite slow to install (not everybody requires PGSQL, the python wrappers, etc.).

Regards, Francois.

YoshitakaMo commented 3 years ago

Did you create your formula starting from this one?

Yes, I analyzed the rdkit formula here to create the new one. The basic functionalities are thus almost compatible, but I removed --with-java support and add a new option -DRDK_BUILD_YAEHMOP_SUPPORT=ON, which is used in the conda-rdkit.

For example, the formula here even works on Linux homebrew !

Thank you for this comment. Today I modified the new formula again to enable Linux OS to build rdkit from source. I tested it on my CentOS 7.8 and the installation was succeeded.

The fact that in your new formula, several things are no more optional makes it quite slow to install

I don't think it is such a big problem because homebrew-core provides a "bottle" of pre-compiled rdkit for each OS. This saves a lot of installation time, which is an advantage of using homebrew-core.

A bottle for Linux OS is not ready at this time for some reason, but I think homebrew-core/linuxbrew-core will generate it later.

UnixJunkie commented 3 years ago

You removed the java support because it doesn't compile on a Mac, right? We have an issue here tracking that, though no solution: https://github.com/rdkit/homebrew-rdkit/issues/38

UnixJunkie commented 3 years ago

If you announce your recipe on the mailing-list, many people use the new formula and are happy with it, we might stop maintaining this repository and just pointing to the new one.

The fact that we don't need a tap anymore makes the install simpler. Also, the new formula uses more modern syntax and looks simpler, embeds a test and enjoys the CI tests of homebrew-core plus "bottles" !

YoshitakaMo commented 3 years ago

You removed the java support because it doesn't compile on a Mac, right?

Yes, I removed it because I don't have a good idea to include java support. conda-rdkit neither.

If you announce your recipe on the mailing-list, many people use the new formula and are happy with it, we might stop maintaining this repository and just pointing to the new one.

Thanks @UnixJunkie and the contributors here. I will announce on the mailing-list in a few days.