fix bug #2056, tdebindings does not rely anymore on pkg-config #5

Συγχωνευμένα
SlavekB συγχώνευσε 1 υποβολές από fix/2056 σε master 5 έτη πριν
Ghost σχολίασε 5 έτη πριν

no more pkg-config for Ruby binding, only rbconfig.rb is needed.

It builds here with Ruby-1.8.7 and Ruby-2.6.5

no more pkg-config for Ruby binding, only rbconfig.rb is needed. It builds here with Ruby-1.8.7 and Ruby-2.6.5
Ghost πρόσθεσε τη σήμανση PR/rfc 5 έτη πριν
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

Test on Debian 7.x (Wheezy):

checking for ruby... ruby
-e:1:in `fetch': key not found: "rubyarchhdrdir" (KeyError)
        from -e:1:in `<main>'

                  archdir /usr/lib/ruby/1.9.1/x86_64-linux,
                  sitearchdir /usr/local/lib/site_ruby/1.9.1/x86_64-linux,
                  sitedir /usr/local/lib/site_ruby/1.9.1,
                  rubylibdir /usr/lib/ruby/1.9.1,
                  libdir /usr/lib,
                  includedir /usr/include/ruby-1.9.1,
                  librubyarg -lruby-1.9.1,
                  cflags -I/usr/include/ruby-1.9.1 -I

followed by FTBFS:

In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from Qt.cpp:49,
                 from libqtrubyinternal_la.all_cpp.cpp:2:
/usr/include/ruby-1.9.1/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file or directory
compilation terminated.
Test on Debian 7.x (Wheezy): ``` checking for ruby... ruby -e:1:in `fetch': key not found: "rubyarchhdrdir" (KeyError) from -e:1:in `<main>' archdir /usr/lib/ruby/1.9.1/x86_64-linux, sitearchdir /usr/local/lib/site_ruby/1.9.1/x86_64-linux, sitedir /usr/local/lib/site_ruby/1.9.1, rubylibdir /usr/lib/ruby/1.9.1, libdir /usr/lib, includedir /usr/include/ruby-1.9.1, librubyarg -lruby-1.9.1, cflags -I/usr/include/ruby-1.9.1 -I ``` followed by FTBFS: ``` In file included from /usr/include/ruby-1.9.1/ruby.h:32:0, from Qt.cpp:49, from libqtrubyinternal_la.all_cpp.cpp:2: /usr/include/ruby-1.9.1/ruby/ruby.h:24:25: fatal error: ruby/config.h: No such file or directory compilation terminated. ```
Ghost πρόσθεσε τη σήμανση PR/wip 5 έτη πριν
Ghost σχολίασε 5 έτη πριν
Συντάκτης

Ruby-1.9.1 rbconfig.rb does not seem to have rubyarchhdrdir, thanks for the testing.

Ruby-1.9.1 rbconfig.rb does not seem to have **rubyarchhdrdir**, thanks for the testing.
SlavekB αξιολόγησε 5 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

The current version of the patch may cause FTBFS.

The current version of the patch may cause FTBFS.
if test "$RUBY_VERSION" -ge "191"; then
RUBY_INCLUDEDIR=`${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(rubyhdrdir))"`
RUBY_ARCH=`${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(arch))"`
RUBY_CFLAGS="-I${RUBY_INCLUDEDIR} -I${RUBY_INCLUDEDIR}/${RUBY_ARCH}"
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

The method used to compose arch include directory works well for Debian 7.x (Wheezy), where the path is like /usr/include/ruby-1.9.1/x86_64-linux, but fails for newer versions where the path is like /usr/include/x86_64-linux-gnu/ruby-2.5.0. We should use rubyarchhdrdir if defined.

The method used to compose arch include directory works well for Debian 7.x (Wheezy), where the path is like `/usr/include/ruby-1.9.1/x86_64-linux`, but fails for newer versions where the path is like `/usr/include/x86_64-linux-gnu/ruby-2.5.0`. We should use `rubyarchhdrdir` if defined.
Ghost σχολίασε 5 έτη πριν
Συντάκτης

i don't see the need to push forwards in this direction with rbconfig.rb if we have to check regularly if the appropriate keys are there, it's no better than incrementing the ruby version with each new release. should i delete this?

i don't see the need to push forwards in this direction with rbconfig.rb if we have to check regularly if the appropriate keys are there, it's no better than incrementing the ruby version with each new release. should i delete this?
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

@cethyel I made a small modification to your patch – now rubyarchhdrdir is used, if defined. Similarly, a test for rubyhdrdir is performed, so there is no need test based on Ruby version number.

Please test on your systems. I did a test on Debian 7.x (Wheezy) and Debian 10.x (Buster).

@cethyel I made a small modification to your patch – now `rubyarchhdrdir` is used, if defined. Similarly, a test for `rubyhdrdir` is performed, so there is no need test based on Ruby version number. Please test on your systems. I did a test on Debian 7.x (Wheezy) and Debian 10.x (Buster).
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

i don’t see the need to push forwards in this direction with rbconfig.rb if we have to check regularly if the appropriate keys are there, it’s no better than incrementing the ruby version with each new release. should i delete this?

Your solution looks good – this will allow us to get rid of reliance on the Ruby version number. I think there is no reason to discard this PR.

> i don’t see the need to push forwards in this direction with rbconfig.rb if we have to check regularly if the appropriate keys are there, it’s no better than incrementing the ruby version with each new release. should i delete this? Your solution looks good – this will allow us to get rid of reliance on the Ruby version number. I think there is no reason to discard this PR.
Ghost σχολίασε 5 έτη πριν
Συντάκτης

I'll test tomorrow, then you will choose to keep this or not, but I feel that Ruby's keys aren't consistent over time enough, a ruby version pushing that kind of changes over the last release and so on.

I'll test tomorrow, then you will choose to keep this or not, but I feel that Ruby's keys aren't consistent over time enough, a ruby version pushing that kind of changes over the last release and so on.
Francois σχολίασε 5 έτη πριν
Συνεργάτης

Patch tested and working on CentOS 6, 7 and 8.

Patch tested and working on CentOS 6, 7 and 8.
Ghost σχολίασε 5 έτη πριν
Συντάκτης

@Francois Thanks for the testing.
@SlavekB we probably don't need RUBY_TEENY anymore.

@Francois Thanks for the testing. @SlavekB we probably don't need RUBY_TEENY anymore.
Ghost σχολίασε 5 έτη πριν
Συντάκτης

@SlavekB Works for me, at least It builds fine here (ruby 2.6.5p114).
I've removed RUBY_TEENY btw.

t1.rb from qtruby/rubylib/tutorial/t1 does not work though, is this one of the (many) broken tutorials/examples? I fairly don't know!

@SlavekB Works for me, at least It builds fine here (ruby 2.6.5p114). I've removed RUBY_TEENY btw. t1.rb from qtruby/rubylib/tutorial/t1 does not work though, is this one of the (many) broken tutorials/examples? I fairly don't know!
Ghost αφαίρεσε το σήμα PR/wip 5 έτη πριν
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

To my knowledge, @MicheleC observed that many examples and tutorials in tdebindings did not work. However, it will be a different story than this pull-request. Nothing seems to prevent merge.

To my knowledge, @MicheleC observed that many examples and tutorials in tdebindings did not work. However, it will be a different story than this pull-request. Nothing seems to prevent merge.
SlavekB σχολίασε 5 έτη πριν
Ιδιοκτήτης

One small note: @cethyel your Signed-off-by is now duplicated. This is probably not needed. Please, can you make an amend commit log and push again?

One small note: @cethyel your `Signed-off-by` is now duplicated. This is probably not needed. Please, can you make an amend commit log and push again?
SlavekB αφαίρεσε το σήμα PR/rfc 5 έτη πριν
Ghost έκλεισε αυτό το pull request 5 έτη πριν
SlavekB έκλεισε αυτό το pull request 5 έτη πριν
SlavekB διέγραψε το κλάδο fix/2056 5 έτη πριν
SlavekB το πρόσθεσε στο R14.0.7 release ορόσημο 5 έτη πριν
MicheleC σχολίασε 5 έτη πριν
Ιδιοκτήτης

@SlavekB: yes, tdebindings is mostly brokens and need work to fix it. There is an open PR, but it has been put on hold until R14.1.0 is released. It seems it needs some deep investigation 😧

@SlavekB: yes, tdebindings is mostly brokens and need work to fix it. There is an open PR, but it has been put on hold until R14.1.0 is released. It seems it needs some deep investigation :anguished:
Το pull request έχει συγχωνευθεί ως 1aaf11f05e.
Συνδεθείτε για να συμμετάσχετε σε αυτή τη συνομιλία.
Δεν υπάρχουν εξεταστές
Χωρίς Ορόσημο
Χωρίς Αποδέκτη
4 Συμμετέχοντες
Ειδοποιήσεις
Ημερομηνία Παράδοσης

Δεν ορίστηκε ημερομηνία παράδοσης.

Εξαρτήσεις

Δεν έχουν οριστεί εξαρτήσεις.

Αναφορά: TDE/tdebindings#5
Φόρτωση…
Δεν υπάρχει ακόμα περιεχόμενο.