Skip to content

ruby : add cleaning of library names in dependencies #3241

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

danbev
Copy link
Member

@danbev danbev commented Jun 10, 2025

This commit adds a cleaning step to the library names in the Dependencies class of the Ruby bindings.

The motivation for this is that with the introduction of a library name alias for ggml in Commit (b933d17 "Add in-build ggml::ggml ALIAS library (ggml/1260)) causes the Makefile generation to break:

$ sed -n '165,170p' ext/Makefile
CLEANOBJS     = $(OBJS) *.bak
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time
$(TARGET_SO): libcommon.a libwhisper.a libggml\n(ggml::ggml).a libggml-cpu.a libggml-base.a
libcommon.a libwhisper.a libggml\n(ggml::ggml).a libggml-cpu.a libggml-base.a: cmake-targets
cmake-targets:
	/usr/bin/cmake -S sources -B build -D BUILD_SHARED_LIBS=OFF -D CMAKE_ARCHIVE_OUTPUT_DIRECTORY=/home/danbev/work/ai/whisper.cpp/bindings/ruby/ext -D CMAKE_POSITION_INDEPENDENT_CODE=ON

This commit adds a cleaning step to the library names in the
`Dependencies` class of the Ruby bindings.

The motivation for this is that with the introduction of a library name
alias for ggml in Commit (b933d17
"Add in-build ggml::ggml ALIAS library (ggml/1260)) causes the Makefile
generation to break:
```console
$ sed -n '165,170p' ext/Makefile
CLEANOBJS     = $(OBJS) *.bak
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time
$(TARGET_SO): libcommon.a libwhisper.a libggml\n(ggml::ggml).a libggml-cpu.a libggml-base.a
libcommon.a libwhisper.a libggml\n(ggml::ggml).a libggml-cpu.a libggml-base.a: cmake-targets
cmake-targets:
	/usr/bin/cmake -S sources -B build -D BUILD_SHARED_LIBS=OFF -D CMAKE_ARCHIVE_OUTPUT_DIRECTORY=/home/danbev/work/ai/whisper.cpp/bindings/ruby/ext -D CMAKE_POSITION_INDEPENDENT_CODE=ON
```
@danbev danbev requested a review from ggerganov June 10, 2025 12:00
@danbev
Copy link
Member Author

danbev commented Jun 10, 2025

@ggerganov This might not be the best fix (my Ruby skills are questionable) but it allows CI to pass (and rake test locally).

@danbev danbev merged commit 2679bec into ggml-org:master Jun 10, 2025
51 of 53 checks passed
bygreencn added a commit to bygreencn/whisper.cpp that referenced this pull request Jun 29, 2025
* ggerganov/master: (335 commits)
  server : add Voice Activity Detection (VAD) support (ggml-org#3246)
  cli : fix short name conflict for vad options [no ci] (ggml-org#3247)
  ruby : add .gitignore entries for ext directory (ggml-org#3245)
  ci : update windows runner to windows-2022 (ggml-org#3242)
  ruby : add cleaning of library names in dependencies (ggml-org#3241)
  ggml : fix weak alias win32 (#0)
  android : fix builds (#0)
  sync : ggml
  files : remove old sources (part 2)
  sync : ggml
  files : remove old sources
  talk-llama : sync llama.cpp
  sync : ggml
  metal : use less stack memory in FA kernel (llama/14088)
  ggml-cpu : split arch-specific implementations (llama/13892)
  cuda : fix device sync on buffer clear (llama/14033)
  CANN: Simplify the environment variable setting(#13104)
  sycl: Add reorder to Q6_K mmvq implementation (llama/13885)
  cuda : fix buffer type check with integrated GPUs (llama/14069)
  SYCL: Implement few same quantized type copy kernels (llama/13739)
  ...
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