-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clickhouse 1.1.54074 (new formula) #7222
Conversation
ENV["HOMEBREW_CC"] = "gcc-6" | ||
ENV["HOMEBREW_LD"] = "gcc-6" | ||
ENV["HOMEBREW_CXX"] = "g++-6" | ||
ENV["HOMEBREW_BUILD_FROM_SOURCE"] = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't do this. This and Boost need to be build using Clang.
depends_on "unixodbc" => :build | ||
depends_on "glib" => :build | ||
depends_on "libtool" => :build | ||
depends_on "gettext" => :build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are none of these linked to at runtime?
ENV["DISABLE_MONGODB"] = "1" | ||
|
||
# Hardcode the version assignment since there's no git repository | ||
inreplace "libs/libcommon/src/get_revision_lib.sh", /git.*\n.*/, "echo " + version.to_s[-5..-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a Git checkout instead of patching.
s.gsub! "<!-- <max_open_files>262144</max_open_files> -->", "<max_open_files>262144</max_open_files>" | ||
end | ||
|
||
# Copy configuration files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this comment.
|
||
inreplace "#{buildpath}/dbms/src/Server/config.xml" do |s| | ||
s.gsub! "/opt/clickhouse/", "#{var}/clickhouse/" | ||
s.gsub! "<!-- <max_open_files>262144</max_open_files> -->", "<max_open_files>262144</max_open_files>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this the default?
inreplace "libs/libcommon/src/get_revision_lib.sh", /git.*\n.*/, "echo " + version.to_s[-5..-1] | ||
|
||
mkdir "build" | ||
cd "build" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir "build" do
cd "build" do | ||
system "cmake", ".." | ||
system "make" | ||
bin.install "#{buildpath}/build/dbms/src/Server/clickhouse" => "clickhouse-server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no make install
we can use? If not, please request one from upstream.
If you're going to run the server, make sure to increase `maxfiles` limit: | ||
https://github.com/yandex/ClickHouse/blob/master/MacOS.md | ||
EOS | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need any of these caveats as they aren't Homebrew specific or different to normal.
end | ||
|
||
test do | ||
system "#{bin}/clickhouse-client", "--help" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this test be modified to do something more substantial than e.g. --version
or --help
? See cmake.rb
for an example of an application formula with a good test and tinyxml2.rb
for an example of a library formula with a good test. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for taking your time to review!
Any update here @hatarist? |
I'm very sorry, I have little to no experience with cmake/make and it seems that the project has a lot of issues regarding build-scripts. (see clickhouse issue #220 (ru->en translation)) I also have no idea what to do with
:( Sorry again. I guess this pull request should be closed until most of these things could be fixed? |
Don't worry about it! Thanks for making an effort to build this despite its build system difficulties. I'll close for now, but future PR(s) for this formula are always welcome. Thanks again! |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Here's an OS X build guide: https://github.com/yandex/ClickHouse/blob/master/doc/build_osx.md
In short, we have to recompile boost using gcc-6, hence the
HOMEBREW_CC
/HOMEBREW_BUILD_FROM_SOURCE
overriding beforedepends_on "boost"
.