oceanbase / oceanbase/seekdb

Fix C++ compiler detection failure during CMake project phase when building RPM on macOS

Open
#781 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dima type: bug
Dominant language
C++
Stars
2.9k
Forks
339
Avg merge
1d 19h
Merged PRs (30d)
52

Description

Environment

  • Repository: git@gitlab.oceanbase-dev.com:oceanbase-ce-publish/seekdb.git
  • Branch: master
  • Machine: macOS
  • Working Directory: /Users/admin/lvw/seekdb_mac

Description

When compiling the master branch on macOS, the build.sh rpm --init command fails during the CMake project phase because it cannot detect a valid C++ compiler.

Steps to Reproduce

  1. Clone the repository:
    git clone -b master --depth=20 git@gitlab.oceanbase-dev.com:oceanbase-ce-publish/seekdb.git seekdb
    
  2. Run the build script for release:
    bash build.sh release --init
    
  3. Navigate to the build directory and compile:
    cd build_release
    make -j 7 seekdb
    cd ..
    
  4. Attempt to build the tarball and RPM package:
    bash build.sh tgz --init --make -j32
    bash build.sh rpm --init --make -j32
    

The bash build.sh rpm --init --make -j32 command fails with an error indicating CMake cannot find a suitable C++ compiler.

Impact

This blocks the creation of RPM packages from the master branch on macOS development environments.

Proposed Solution

Investigate and fix the CMake configuration or the build.sh script to correctly locate and use the C++ compiler (e.g., clang++) on macOS systems during the RPM build phase.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with build.sh and the CMake project phase used by bash build.sh rpm --init --make -j32 on macOS. Reproduce the failure, then trace how the RPM build selects the C++ compiler and compare it with the release build's compiler configuration. Done means the RPM build detects a valid macOS compiler such as clang++ and completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, shell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.