libgit2 / libgit2/rugged

Building native extensions fails when CMAKE_GENERATOR is non-default

Open
#983 0 comments 0 reactions 0 assignees View on GitHub

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.