weechat: build with all plugins support?

Open
#30,788 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cmake, lua, perl, python, ruby
Domain
build-system

Research direction

The relevant file is the weechat package Makefile, where the PKG_BUILD_DEPENDS line and the per-plugin CMAKE_OPTIONS blocks for Lua, Perl, Ruby and Tcl live. Start by reproducing a minimal build with CONFIG_WEECHAT_LUA enabled and read the CMake error output to see which Lua library or include path is not found. Done means weechat-minimal builds with the Lua plugin on x86/64 and the Perl, Ruby and Tcl options are checked the same way.

Written by the indexing model from the issue text.

Description

Feature request Low
Package Name

weechat

Maintainer

@BKPepe

OpenWrt Version

SNAPSHOT

OpenWrt Target/Subtarget

x86/64

Steps to Reproduce

Trying to compiling weechat minimal with all plugins enabled with this following changes :

diff -Naur a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@
 	CONFIG_WEECHAT_PERL \
 	CONFIG_WEECHAT_TCL
 
-PKG_BUILD_DEPENDS:=$(if $(CONFIG_WEECHAT_PYTHON),python3/host)
+PKG_BUILD_DEPENDS:=$(if $(CONFIG_WEECHAT_PYTHON),python3/host) $(if $(CONFIG_WEECHAT_PERL),perl/host) $(if $(CONFIG_WEECHAT_TCL),tcl/host)
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -44,7 +44,7 @@
 	+WEECHAT_ZSTD:libzstd \
 	+WEECHAT_CJSON:cJSON \
 	+WEECHAT_PYTHON:python3-light \
-	+WEECHAT_LUA:liblua \
+	+WEECHAT_LUA:liblua5.4 \
 	+WEECHAT_RUBY:ruby \
 	+WEECHAT_PERL:perl \
 	+WEECHAT_TCL:tcl
@@ -138,6 +138,30 @@
 	-DPython_LIBRARY=$(STAGING_DIR)/usr/lib/libpython$(PYTHON3_VERSION).so
 endif
 
+ifneq ($(CONFIG_WEECHAT_RUBY),)
+CMAKE_OPTIONS += \
+	-DRuby_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/ruby \
+	-DRuby_CONFIG_INCLUDE_DIR=$(STAGING_DIR)/usr/include/ruby-4.0/x86_64-linux-gnu \
+	-DRuby_INCLUDE_DIR=$(STAGING_DIR)/usr/include/ruby-4.0 \
+	-Druby_LIBRARY=$(STAGING_DIR)/usr/lib/libruby.so
+endif
+
+ifneq ($(CONFIG_WEECHAT_PERL),)
+include ../../lang/perl/perlver.mk
+CMAKE_OPTIONS += \
+	-DPerl_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/usr/bin/perl \
+	-DPERL_INCLUDE_PATH=$(BUILD_DIR)/perl/perl-$(PERL_VERSION) \
+	-DPERL_LIBRARY=$(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION2)/CORE/libperl.so
+endif
+
+ifneq ($(CONFIG_WEECHAT_TCL),)
+CMAKE_OPTIONS += \
+	-DTCL_TCLSH=$(STAGING_DIR_HOSTPKG)/bin/tclsh \
+	-DTK_INCLUDE_PATH=$(STAGING_DIR)/usr/include \
+	-DTK_LIBRARY=$(STAGING_DIR)/usr/lib/libtcl.so
+endif
+
+
 define Package/weechat-minimal/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/weechat-headless $(1)/usr/bin/weechat-headless

But whatever I have done, I cannot build with LUA enabled.

Also it's not possible to enable weechat-full if I have selected luci-app-weechat.

Actual Behaviour

Cannot build with lua 5.4 plugins

Confirmation Checklist
Dominant language
Makefile
Stars
4.7k
Forks
4k
Avg merge
2d 2h
Merged PRs (30d)
251

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from openwrt/packages

All issues in openwrt/packages

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.