By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2623 - tdebindings - ld: cannot find -ltqt-mt, ruby 2.2 support fails, and no disable ruby configure switch
Summary: tdebindings - ld: cannot find -ltqt-mt, ruby 2.2 support fails, and no disabl...
Status: NEW
Alias: None
Product: TDE
Classification: Unclassified
Component: other (any) (show other bugs)
Version: R14.0.x [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Slávek Banko
URL:
Depends on:
Blocks: 2968
  Show dependency treegraph
 
Reported: 2016-03-28 22:06 CDT by James
Modified: 2018-08-30 02:52 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
build log errors (8.65 KB, text/x-log)
2016-03-28 22:06 CDT, James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James 2016-03-28 22:06:52 CDT
Created attachment 2642 [details]
build log errors

Arch Linux
tde-tdebindings 14.0.3-1

When using a probably uncommon location for the tqt3 library files in /opt/trinity/tqt3/lib/, then building tdebindings gives an error, "/usr/bin/ld: cannot find -ltqt-mt".  The command generated by the Makefile never searches in /opt/trinity/tqt3/lib/, despite including "configure ... 
--with-qt-libraries=/opt/trinity/tqt3/lib/...".

Looking at
tdebindings/dcopjava/binding/Makefile.am

I suspect that
libjavadcop_la_LDFLAGS = $(KDE_LDFLAGS) $(KDE_PLUGIN) -lDCOP -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx

should instead be
libjavadcop_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_LDFLAGS) $(KDE_PLUGIN) -lDCOP -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx

which produces a working Makefile.

---

Also, there is no configure switch to disable the ruby bindings, but tdebindings will build successfully if there is no ruby installed on the system.  That is awkward when ruby support fails to build, requiring ruby to be removed before building tdebindings.

---

And then, tdebindings fails to build if ruby is installed, in particular, using the AUR ruby2.2 package.

The build fails at
make[5]: Entering directory '/var/build/tde-tdebindings/src/tdebindings/qtruby/rubylib/qtruby'
...
libtool: compile:  g++ ... -o .libs/Qt.o
...
In file included from /opt/ruby2.2/include/ruby-2.2.0/ruby.h:33:0,
                 from Qt.cpp:49:
/opt/ruby2.2/include/ruby-2.2.0/ruby/ruby.h:861:0: note: this is the location of the previous definition
 #define RSTRING_LEN(str) \
 ^
Qt.cpp:123:95: error: ambiguating new declaration of ‘void rb_str_catf(VALUE, const char*, ...)’
 void rb_str_catf_1(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
                                                                                               ^
...
Qt.cpp: In function ‘VALUE add_signal_methods(VALUE, VALUE, VALUE)’:
Qt.cpp:68:35: error: ‘struct RArray’ has no member named ‘len’
 #define RARRAY_LEN(x) (RARRAY(x)->len)
                                   ^
Qt.cpp:2294:31: note: in expansion of macro ‘RARRAY_LEN’
  for (long index = 0; index < RARRAY_LEN(signalNames); index++) {
                               ^
...

There are many similar errors generate here.  See attached.

Was qtruby/rubylib/qtruby/Qt.cpp actually modified to work with ruby 2.2?
Or, is there some other problem here?
Comment 1 Slávek Banko 2016-03-29 19:44:08 CDT
The problem with linking tqt-mt manifests itself only in dcopjava? That would be weird. I would expect that would be equally manifest in other builds using automake.


On Debian builds are successful with Ruby 2.3. A problem that you mention seems that in your case is not defined HAVE_RUBY_1_9. Please check or attach configure log, because this should be defined - see qtruby/rubylib/qtruby/configure.in.in
Comment 2 James 2016-03-30 01:52:50 CDT
Aha!  Thanks for that.  I had misconfigured the --with-extra-libs= for the ruby libraries.

But then, when you say Debian was successful building with Ruby 2.3, they must have patched the stock configure files.  I had to patch
tdebindings/qtruby/rubylib/qtruby/configure.in.in
and
tdebindings/korundum/rubylib/korundum/configure.in.in

to extend the tests for Ruby 2.3:

     if test -z "$RUBY_VERSION"; then
       RUBY_VERSION=`$PKGCONFIG ruby-2.3 --modversion 2>/dev/null`
       if test -n "$RUBY_VERSION"; then
         RUBY_CFLAGS=`$PKGCONFIG ruby-2.3 --cflags`
       fi
     fi

This is a bit silly because the same code is repeated for each and every one of ruby 1.9, 2.0, 2.1, 2.2, and now, 2.3.  This is not very scalable, where there is likely to be a ruby 2.4 and on and on.

Patching three files, setting the environment variables, and running with "make -j1", tdebindings builds successfully.

BTW, I notice that the PKGBUILD also applies

 cp /usr/share/aclocal/libtool.m4 ./admin/libtool.m4.in
 cp /usr/share/libtool/build-aux/ltmain.sh ./admin/ltmain.sh

which are from libtool 2.4.6, if that is of interest.
Comment 3 Slávek Banko 2016-03-30 13:10:09 CDT
Interestingly, on Debian and Fedora has Ruby 2.3 pkg-config file simply 'ruby.pc' == rule by version number is no longer needed. In any case, it would be a good make the code for testing Ruby better :)

Copy libtool.m4.in and ltmain.sh from the current system is standard basic step for all automake builds. On wiki is mentioned in Building Packages with Autoconf section - see Regenerate Autoconf/Automake files: https://wiki.trinitydesktop.org/How_to_Build_TDE_Core_Modules

Yes, tdebindings is one of the packages for which it is not possible to use a parallel build. It is the same for Debian / Ubuntu. I believe that it is not practical to address this issue == would be preferable to prepare cmake build.
Comment 4 Michele Calgaro 2018-08-04 07:42:15 CDT
What is the status of this bug?
Comment 5 James 2018-08-04 11:30:13 CDT
Sorry - I haven't tried to build this lately.  There does not really exist a proper set of TDE PKGBUILD files for Arch Linux.

I expect that, if nobody has addressed the issues with the tdebindings build, then these problems are still there.  For instance, at
 https://wiki.trinitydesktop.org/How_to_Build_TDE_Core_Modules
"tdebindings" is still not included under "List of Packages Building with cmake".

Creating Arch Linux PKGBUILD files for a fully functioning TDE becomes something of a "layered" challenge, where the core packages must build successfully before the tdebindings build can be attempted.

We might visit this again after R14.0.5.
Comment 6 Slávek Banko 2018-08-04 12:10:31 CDT
(In reply to James from comment #5)
> Sorry - I haven't tried to build this lately.  There does not really exist a
> proper set of TDE PKGBUILD files for Arch Linux.
> 
> I expect that, if nobody has addressed the issues with the tdebindings
> build, then these problems are still there.  For instance, at
>  https://wiki.trinitydesktop.org/How_to_Build_TDE_Core_Modules
> "tdebindings" is still not included under "List of Packages Building with
> cmake".
> 
> Creating Arch Linux PKGBUILD files for a fully functioning TDE becomes
> something of a "layered" challenge, where the core packages must build
> successfully before the tdebindings build can be attempted.
> 
> We might visit this again after R14.0.5.

It looks like the tdebinding PKGBUILD for Arch is already ready - you can look at the mirror on TDE Gitea:

https://mirror.git.trinitydesktop.org/gitea/SlavekB/tde-packaging-arch/src/branch/master/R14.0.4/tde-base/tde-tdebindings
Comment 7 James 2018-08-05 12:16:51 CDT
Thanks for that Slávek.  I haven't been following for a while:
 https://github.com/michael-manley/Trinity_ArchLinux_PKGBUILD

In answer to Michele, I will point-out Michael's opening build instruction:

"Before installing please remove any presence of JRE and RUBY packages, after install you can put them back."

Michael tends to resolve build problems by disabling Trinity features and functionality, which is a work-around, not a fix, and not very interesting for me.

So I will infer that this bug is still an issue which should be addressed.
Comment 8 Michele Calgaro 2018-08-05 22:19:40 CDT
Thanks James, I agree with you point of view.
Comment 9 James 2018-08-06 13:36:23 CDT
Indirectly related - maybe Trinity wants to move to Meson, instead of CMake?  Just to put the idea on the table.  I don't know if there has already been discussion about this.
Comment 10 Slávek Banko 2018-08-06 15:10:45 CDT
James, thank you for your notice in comment 7! I did not look at the Arch builds in detail, but only passively follow their development.

Regarding your comment 9. For now, no one has asked a question about Meson. In any case, there are several facts:

1) In individual parts of Trinity can be found Automake, CMake and Scons. Adding Meson would be another wood in the forest.

2) Major developers are aware of Automake and CMake. Meson we would have to learn from the beginning.

3) At present, individual projects are gradually converted to CMake. It's a slow job, but we are moving forward. Selecting Meson would mean a shift to the beginning.

4) And finally, why should we want Meson?
https://www.rojtberg.net/1481/do-not-use-meson/
Comment 11 Michele Calgaro 2018-08-06 23:27:19 CDT
I agree with Slavek. Given the resources available and the list of things to do/fix, moving to Meson is not a priority. And there not seem to be a major killer benefit to do so either.
But thanks for raising the point. I didn't know about Meson, so I learnt some new today :-)