Skip to content
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

[VL] Add find and build glog/gflags #3638

Merged
merged 2 commits into from
Nov 8, 2023
Merged

Conversation

marin-ma
Copy link
Contributor

@marin-ma marin-ma commented Nov 7, 2023

Currently, the CMake/Findglog.cmake module only finds libglog itself but doesn't resolve its dependency gflags. When libglog is found as static library, linking it to shared library such as libvelox.so will lead to undefined symbol.

Copy link

github-actions bot commented Nov 7, 2023

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/oap-project/gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

@marin-ma
Copy link
Contributor Author

marin-ma commented Nov 8, 2023

@Yohahaha Could you help to review? Thanks!

@marin-ma marin-ma marked this pull request as ready for review November 8, 2023 01:33
Comment on lines +19 to +23
set(GLUTEN_GFLAGS_BUILD_SHA256_CHECKSUM
34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf)
string(CONCAT GLUTEN_GFLAGS_SOURCE_URL
"https://github.com/gflags/gflags/archive/refs/tags/"
"v${GLUTEN_GFLAGS_VERSION}.tar.gz")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use below pattern to allow user specify deps URL? same for glog.

if(DEFINED ENV{GLUTEN_GTEST_SOURCE_URL})
  set(GLUTEN_GTEST_SOURCE_URL "$ENV{GLUTEN_GTEST_SOURCE_URL}")
endif()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this patch first, I will refine these deps download URL in follow up patch.

set(GLUTEN_GLOG_MINIMUM_VERSION 0.4.0)
set(GLUTEN_GLOG_VERSION 0.6.0)

if(NOT BUILD_GLOG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious could we just find first, then check glog_FOUND? seems BUILD_GLOG can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit tricky here. We cannot make sure user has both glog and gflags installed. If glog is found but gflags is missing, it fails. The option is for ignoring system glog then directly build glog and gflags from source. https://github.com/oap-project/gluten/pull/3638/files#diff-9df362ebf18ceb320fa6423ff9140fd2bd75906d57d92ca018febfc3a93864a9R66

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm fine with it.

@Yohahaha
Copy link
Contributor

Yohahaha commented Nov 8, 2023

Thank you! LGTM, only some comments.

@marin-ma
Copy link
Contributor Author

marin-ma commented Nov 8, 2023

@PHILO-HE @rui-mo Could you help to review? Thanks!

Copy link
Contributor

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@marin-ma marin-ma merged commit 2b9891b into apache:main Nov 8, 2023
16 checks passed
@GlutenPerfBot
Copy link
Contributor

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query log/native_3638_time.csv log/native_master_11_07_2023_e3eff1d8f_time.csv difference percentage
q1 34.41 34.38 -0.031 99.91%
q2 25.26 25.03 -0.234 99.07%
q3 38.49 38.14 -0.348 99.09%
q4 37.69 37.57 -0.114 99.70%
q5 70.56 71.50 0.940 101.33%
q6 7.94 6.26 -1.677 78.87%
q7 83.76 82.22 -1.538 98.16%
q8 87.99 86.95 -1.047 98.81%
q9 123.49 119.81 -3.681 97.02%
q10 54.73 51.26 -3.466 93.67%
q11 20.00 19.73 -0.266 98.67%
q12 26.15 24.39 -1.757 93.28%
q13 48.29 50.30 2.002 104.15%
q14 16.49 17.67 1.179 107.15%
q15 31.09 30.35 -0.734 97.64%
q16 16.23 16.20 -0.027 99.83%
q17 102.22 101.51 -0.712 99.30%
q18 147.89 148.26 0.371 100.25%
q19 14.82 16.17 1.351 109.12%
q20 30.21 30.31 0.102 100.34%
q21 226.25 224.88 -1.369 99.39%
q22 13.32 14.08 0.769 105.78%
total 1257.27 1246.98 -10.289 99.18%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants