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

Add Power ppc64le support on 2024-1-8 #3

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

DBres4Power
Copy link
Contributor

@DBres4Power DBres4Power commented Jan 8, 2024

Summary

Changed files:
file: rpm/obdevtools-llvm.spec ## add ppc64le support:
elif [[ x"$arch" == x"ppc64le" ]]; then
echo "Build arch: ppc64le"
arch=PowerPC

file: rpm/devdeps-mariadb-connector-c.spec ## mariadb-connector-c-3.1.12 cmake template issue, END() should beENDIF()
sed -i 's/END()/ENDIF()/g' mariadb-connector-c-3.1.12/cmake/ConnectorName.cmake

file: rpm/obdevtools-flex.spec ## add ppc64le support:
elif [ "${OS_ARCH}x" = "ppc64lex" ]; then
BUILD_OPTION='--build=ppc64le'

file: rpm/obdevtools-bison.spec ## add ppc64le support:
elif [ "${OS_ARCH}x" = "ppc64lex" ]; then
BUILD_OPTION='--build=ppc64le'

file: rpm/devdeps-libcurl-static.spec ## add ppc64le support:
elif [ "${OS_ARCH}x" = "ppc64lex" ]; then
BUILD_OPTION='--build=ppc64le'

file: rpm/devdeps-isa-l-static.spec ##add ppc64le support:
BUILD_OPTION=''
OS_ARCH="$(uname -m)"
if [ "${OS_ARCH}x" = "ppc64lex" ]; then
BUILD_OPTION='--build=ppc64le'
fi

./configure ${BUILD_OPTION} --enable-static --with-pic=yes --disable-shared --prefix=%{_tmppath}

file: rpm/devdeps-icu.spec ## add necessary .h files to rpm
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/include/%{_product_prefix}/i18n/unicode
cp ../icu4c/source/i18n/unicode/*.h $RPM_BUILD_ROOT/%{_prefix}/include/%{_product_prefix}/i18n/unicode/

file: rpm/devdeps-cos-c-sdk.spec.patch ##add CFLAG="-O2" \ to avoid such issue: ld.lld: error: undefined symbol: _restfpr_31
CFLAG="-O2" \

file: rpm/build_all.sh ##build llvm 11.1.0, zlib_shard, openssl-static.1.1.1u for ppc64le
if [ "${OS_ARCH}x" = "ppc64lex" ]; then
##backup local spec file first
if ! grep 11.1.0 obdevtools-llvm.spec |grep -i version > /dev/null
then
scp obdevtools-llvm.spec obdevtools-llvm.11.0.1.spec
scp obdevtools-llvm.11.1.0.spec obdevtools-llvm.spec
fi
bash obdevtools-llvm-build-11.1.0.sh

bash devdeps-zlib-shared-build.sh

##backup local spec file first
if ! grep 1.1.1u devdeps-openssl-static.spec |grep -i version > /dev/null
then
    scp devdeps-openssl-static.spec devdeps-openssl-static.1.0.1e.spec
    scp devdeps-openssl-static.1.1.1u.spec devdeps-openssl-static.spec
fi
bash devdeps-openssl-static-build.1.1.1u.sh

bash devdeps-rocksdb-build-with-system-gcc.sh

fi

Add Files:

1. Now use LLVM 11.1.0 to build oceanbase

obdevtools-llvm-build-11.1.0.sh obdevtools-llvm.11.1.0.spec

2. shared zlib is needed to build oceanbase

devdeps-zlib-shared-build.sh devdeps-zlib-shared.spec

3. upgrade openssl to 1.1.1u

devdeps-openssl-static-build.1.1.1u.sh devdeps-openssl-static.1.1.1u.spec

4. devdeps-rocksdb-build-with-system-gcc.sh

Shell Scripts:

Need to upload rpms onto http://mirrors.aliyun.com/oceanbase/community/stable/el/$releasever/$basearch/ and http://mirrors.aliyun.com/oceanbase/development-kit/el/$releasever/$basearch/

file: rpm/devdeps-cos-c-sdk-build.sh ## depends on: obdevtools-cmake
file: rpm/devdeps-icu-build.sh ## depends on: obdevtools-gcc9 obdevtools-cmake
file: rpm/devdeps-oss-c-sdk-build.sh ## depends on: devdeps-mxml devdeps-apr
file: rpm/devdeps-s2geometry-build.sh ## depends on: obdevtools-gcc obdevtools-cmake devdeps-openssl-static
file: rpm/obdevtools-llvm-build.sh ## depends on: obdevtools-gcc9 obdevtools-cmake

Solution Description

For issue of error: ‘numeric_limits’ is not a member of ‘std’,  add #include <limits> to llvm/utils/benchmark/src/benchmark_register.h
Copy link

@LINxiansheng LINxiansheng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@LINxiansheng LINxiansheng left a comment

Choose a reason for hiding this comment

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

LGTM

@LINxiansheng
Copy link

Thanks for your contribution.

@LINxiansheng LINxiansheng merged commit f3c98ee into oceanbase:master Apr 8, 2024
1 check passed
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.

2 participants