rdkit / homebrew-rdkit

Homebrew formula for rdkit
44 stars 19 forks source link

Build error in Ubuntu 16.04.6 LTS #95

Closed jnooree closed 4 years ago

jnooree commented 4 years ago

When I try this formula as is, I've got this error:

g++-5: error: unrecognized command line option '-stdlib=libc++'

https://github.com/rdkit/homebrew-rdkit/blob/d9abeeaaa0ac10e482a9f7d7eb9a1d230e53fbfc/Formula/rdkit.rb#L32

And after changing the related line into

'ENV['CXXFLAGS'] = -std=c++11 -Wno-parentheses -Wno-logical-op-parentheses -Wno-format'

build was successful. This might be related to the compiler. In my environment, homebrew used gcc, so the formula must check whether the compiler is gcc or clang.

UnixJunkie commented 4 years ago

A PR to fix the problem would be gladly appreciated. Maybe a fix would be to enforce that we use clang in order to build rdkit on mac.

jnooree commented 4 years ago

It would be great contributing to this wonderful package, but unfortunately, I'm not that familiar with ruby. Also gcc was able to build this without errors, so enforcing clang seems not necessary.

UnixJunkie commented 4 years ago

You tried the brew recipe on Linux Ubuntu?! Not on a Mac?

jnooree commented 4 years ago

Yes I did, as the linuxbrew project was merged into the homebrew. Maybe the build success was just a great luck!

UnixJunkie commented 4 years ago

Can you send the command you tried on linux to install rdkit via brew? If I fix the recipe, I want to be able to test.

jnooree commented 4 years ago

Oh, I was too late 😅 sorry. It was just the same as mentioned in the readme file. The only change I made is in the original comment.

UnixJunkie commented 4 years ago

closed by https://github.com/rdkit/homebrew-rdkit/pull/96

UnixJunkie commented 4 years ago

@jnooree thanks for the feedback and details of your proposed fix

jnooree commented 4 years ago

Thanks for the fast fix!