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

update googletest version to 1.11.0 #35

Merged
merged 5 commits into from
Sep 2, 2021

Conversation

emiatej9
Copy link
Contributor

fixed #34

existing submodule googletest v1.8.x caused cmake deprecation warning,
I updated googletest version to 1.11.0.

existing submodule googletest v1.8.x caused cmake deprecation warning, I updated googletest version to 1.11.0
@bab2min
Copy link
Owner

bab2min commented Aug 29, 2021

@emiatej9
Centos5 빌드가 실패하는데, 확인해보니 centos5에 포함된 g++ 4.8이 c++11을 완벽하게 지원하지 못해서 발생하는 문제네요.
gtest 1.8.x가 pre-c++11 컴파일러를 지원하는 마지막 버전이라고 하는걸 보니 그 이후 버전부터는 Centos5에서 계속 실패할걸로 보입니다.

Centos5를 테스트에 넣은건 오래된 레거시 환경에서도 작동이 잘되도록 보장하고 싶었기 때문인데요, gtest 최신 버전이 발목을 잡는 문제가 있군요. 어떻게 해결하는게 좋을지 좀 고민해봐야할거 같아요~

  1. 테스트 환경에서 Centos5를 빼고 6이나 7로 대체
  2. gtest는 1.8.x로 유지하되 patch를 붙여 cmake deprecation warning을 제거
  3. gtest를 최신 버전으로 업데이트하되 Centos5 빌드시에만 gtest 1.8.x를 사용하도록 빌드 workflow 수정

@emiatej9
Copy link
Contributor Author

그렇다면 CentOS 5에서는 빌드에서 사용하는 cmake 버전과 googletest 버전을 둘 다 낮춰서 테스트를 구성하는 방법이 있을까요? 제가 git workflow 는 잘 몰라서 감이 없네요.

만약 CentOS 5만 cmake 버전과 googletest 버전을 낮춰서 구성할 수 있다면, 이들 (구)버전까지 커버할 수 있도록 CMakeLists.txt 파일이나 googletest 관련 부분이 분기를 나누어주어야 할 수도 있겠네요.

@bab2min
Copy link
Owner

bab2min commented Aug 30, 2021

@emiatej9
네, 저도 고민해봤는데 Centos5에서만 버전을 낮추고 나머지는 최신 버전을 유지하는게 제일 좋아보이네요. 일단 third_party/googletest는 지금처럼 최신 버전으로 업데이트한채로 두고, Centos5에서만 tags/release-1.8.1로 checkout해주면 될것 같네요. (https://github.com/google/googletest/tree/release-1.8.1 )

steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Configure Build
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 ..
- name: Build
run: cd build && make
- name: Run Unit Test
run: ./build/test/kiwi-test

steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Configure Build
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 ..
- name: Build
run: cd build && make

요 두 부분이 Centos5관련 workflow인데 Configure Build 전에 step을 하나 추가해서 googletest 레포를 tags/release-1.8.1로 checkout해주도록 수정가능하신가요?

@emiatej9
Copy link
Contributor Author

네, 수정해서 커밋 해보겠습니다.

googletest v1.11.0 does not support pre-C++11, which causes build fail
on manylinux1 environment(CentOS 5).
Copy link
Owner

@bab2min bab2min left a comment

Choose a reason for hiding this comment

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

잘해주셨는데요 마지막에 cd가 빠졌네요. 해당부분만 수정해주시면 문제없이 빌드될거 같습니다!

.github/workflows/centos5.yml Outdated Show resolved Hide resolved
omitted 'cd' command in checking out googletest version v1.11.0.
googletest v1.11.0 does not support pre-C++11, which causes build fail
on manylinux1 environment(CentOS 5).
googletest v1.11.0 does not support pre-C++11, which causes build fail
on manylinux1 environment(CentOS 5).

therefore, googletest should be checked out v1.8.x before starting build process on
manylinux1 environment.
@bab2min bab2min merged commit 844474e into bab2min:main Sep 2, 2021
@bab2min
Copy link
Owner

bab2min commented Sep 2, 2021

@emiatej9
테스트 잘 통과해서 머지했습니다~ 기여에 감사드립니다.

bab2min added a commit that referenced this pull request Oct 18, 2021
update googletest version to 1.11.0

Former-commit-id: 844474e
bab2min added a commit that referenced this pull request Oct 18, 2021
update googletest version to 1.11.0

Former-commit-id: 844474e
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.

googletest에서 cmake deprecation warning 발생
2 participants