Building native extensions fails when CMAKE_GENERATOR is non-default
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
The extconf.rb file seems to be hardcoded to use gmake or make under Linux environments. This will fail when a different generator is used, like CMAKE_GENERATOR=Ninja.
CMake projects should use cmake --build to build, which makes CMake automatically use the correct build tool.
(Alternatively, if your project must use a specific kind of build system, you need to override it with the -G parameter when generating the build files.)
As a workaround to install the gem, one can run this:
CMAKE_GENERATOR= gem install rugged
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in extconf.rb and reproduce the failure with CMAKE_GENERATOR=Ninja during rugged installation. Check how the native extension currently invokes gmake or make, then verify the build works through CMake’s build command with a non-default generator. Done means installation succeeds without clearing CMAKE_GENERATOR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, ruby
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100