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
pkg/kamailio/obs: Added ruby package #1761 #1762
Conversation
src/modules/app_ruby/Makefile
Outdated
@@ -30,7 +30,7 @@ ifneq (,$(findstring darwin,$(OS))) | |||
LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lev | |||
else | |||
DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include | |||
LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lruby -lpthread -ldl -lobjc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergey-safarov you are changing the module here!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes Victor @linuxmaniac,
I made this because objc
lib cannot find. I have created PR on Fedora29 environment. Think same error exist on CentOS.
I can see Travis-CI also build kamailio properly compiled without this options.
Is option really required?
What we can do to fix error with this options on RPM based dists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if is needed or not, I'm saying the changes need to be split. You are changing the app_ruby, those changes need to be in another commit with the proper commit message prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will do.
@sergey-safarov - that list of libs was taken from the output of Doesn't Fedora or CentOS have pkg-config for ruby devel lib? |
@sergey-safarov can you please add |
2c8450d
to
40c67eb
Compare
To @miconda
I have tested pkconfig for ruby:
@linuxmaniac , i will wait Daniel and your feedback about pckconfig usage for this module. |
@sergey-safarov - can you check if pkg-config has the settings for ruby-x.y, like for example: Overall, I am fine to do that change, I see that So, you can make a separate commit for the Makefile of app_ruby and you can push it to git repo. It can be also backported. |
Hello Daniel @miconda |
40c67eb
to
c13635a
Compare
Hello Victor @linuxmaniac |
@sergey-safarov -- can you give the output of next command:
The makefile for app_ruby tries to detect the version, but it seems to fail there... |
@miconda output is here
And all other
|
Looks ok, the Makefile of the module should detect is ruby-2.5 and do Can you go to src/modules/app_ruby and do:
and paste the output here. |
Daniel @miconda, requested log here
|
I am confused -- what issue you faced? Everything seems to be ok when compiling the module. Or actually now everything is ok from your point of view? |
@miconda
And some additional info
|
Maybe this is because on CentOS cannot be detected ruby version by command
On CentOS is exist
not |
How about this update diff --git a/src/modules/app_ruby/Makefile b/src/modules/app_ruby/Makefile
index 9e54ba2..66c71ff 100644
--- a/src/modules/app_ruby/Makefile
+++ b/src/modules/app_ruby/Makefile
@@ -7,10 +7,7 @@ include ../../Makefile.defs
auto_gen=
NAME=app_ruby.so
-RUBYVER=$(shell pkg-config --list-all | grep ruby-2 | tail -1 | cut -f 1 -d " ")
-ifeq ($(RUBYVER),)
-RUBYVER=ruby-2.3
-endif
+RUBYVER=$(shell pkg-config --list-all | grep ruby | tail -1 | cut -f 1 -d " ")
ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
ifneq ($(BUILDER),) |
I think it's ok to do By removing:
Another test has to be done to be sure RUBYVER is not empty. I looked a bit more into the Makefile, and I think that the order of doing the detection should be changed. I will push a commit very soon to fix all. |
Pushed that commit, can you test and see if now all ok? Thanks! |
@miconda diff --git a/src/modules/app_ruby/Makefile b/src/modules/app_ruby/Makefile
index 45a7b11..6a1eb43 100644
--- a/src/modules/app_ruby/Makefile
+++ b/src/modules/app_ruby/Makefile
@@ -21,6 +21,11 @@ endif
ifneq ($(PKGLIBRUBY),0)
BUILDER =
+else
+ RUBYACCEPTABLE = $(shell $(BUILDER) --libs "$(RUBYVER) >= 2" > /dev/null 2>&1 ; echo $$? )
+ifneq ($(RUBYACCEPTABLE),0)
+ BUILDER =
+endif
endif
ifneq ($(BUILDER),) |
Let's leave it as it is for the moment. If someone complains app_ruby doesn't work for ruby 1.x, then we can change it to what you proposed. Most OSes have ruby 2.x anyhow. |
Hello Victor @linuxmaniac |
@sergey-safarov - you can merge it. If @linuxmaniac want to amend, it can push a commit afterward. |
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description
Ruby module is disabled on CentOS6 and RHEL6 dist