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 1761

Summary: Build issue: tdevelop FTBFS with recent (t)qassistantclient patches
Product: TDE Reporter: Darrell <darrella>
Component: non-core programsAssignee: Michele Calgaro <michele.calgaro>
Status: RESOLVED FIXED    
Severity: blocker CC: albator78, bugwatch, darrella, michele.calgaro, slavek.banko
Priority: P5    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Patch to build tdevelop
incomplete example patch for tdevelop
tdevelop patch
Cleaner tdevelop patch
tqtinterface : Not build tqassistantclient with native tqt
tdevelop : fix ftbfs due to tqassistantclient
tqtinterface : Not build tqassistantclient for native tqt, embed static library for qt3

Description Darrell 2013-12-08 12:11:14 CST
Created attachment 1706 [details]
Patch to build tdevelop

Proposed patch attached.
Comment 1 Slávek Banko 2013-12-08 12:16:07 CST
I'm just researching the same thing. However, this simple patch does not work for me - for me still occurs FTBFS. I believe that it has the relationship with FBTFS tqt3 along with a patch from attachment 1360 [details] (bug 1560).
Comment 2 Darrell 2013-12-08 12:46:43 CST
That's fine. I suspected the patch might not work for everybody.
Comment 3 Slávek Banko 2013-12-08 13:28:03 CST
I may have a clue. Previously, in the tqt3 is library libqassistantclient, while in the tqtinterface is library libtqassistantclient linked to libqassistantclient. But now is libtqassistantclient linked to himself?
Comment 4 Michele Calgaro 2013-12-09 00:40:45 CST
Created attachment 1709 [details]
incomplete example patch for tdevelop

Also for me the patch from Darrell doesn't work (actually I had already tried that). 
I have attached the patch that I used, but still gives FTBFS on my system.
The funny thing is that in the file
obj-x86_64-linux-gnu/kdevdesigner/designer/CMakeFiles/libkdevdesignerpart-module.dir/link.txt 
if we replace the part "-ltqassistantclient" with "/usr/lib/libtqassistantclient.a", the error disappear (I haven't done a full package rebuild, but kdevdesigner/designer builds completely). 
What I still don't understand is why with such replacement, it builds without error, since -lXXXX should look for libXXXX.a which is exactly the same as the replacement.
Any ideas?

Now I am trying to work through the cmake files to find the place where link.txt is created, to make a proper patch, even though there must be something that I still don't quite understand.
Comment 5 Michele Calgaro 2013-12-09 01:05:15 CST
Created attachment 1710 [details]
tdevelop patch

This new patch fixes the problem, nevetheless I am still puzzled by the fact that we need to specify the full patch for libtqassistantclient.a
Comment 6 Michele Calgaro 2013-12-09 03:10:18 CST
Created attachment 1711 [details]
Cleaner tdevelop patch

This patch is cleaner. The reference to libtqassistantclient in tdevelop/kdevdesigner/designer/Makefile.am is not needed.
Comment 7 Slávek Banko 2013-12-09 10:43:08 CST
Two notes:

1) I assume that the change in Makefile.am is necessary for those who will build using autotools.

2) The key question is, what is the significance of the shared library tqassistantclient in libtqtinterface? When I removed shared library tqassistantclient, tdevelop are build as before - with a static library tqassistantclient from tqt3, without need to explicitly state this in cmake.
Comment 8 Slávek Banko 2013-12-09 13:10:18 CST
Mail from François confirms that forced linking with a static library is not the good solution:

http://trinity-devel.pearsoncomputing.net/?0::11697
Comment 9 Darrell 2013-12-09 16:27:16 CST
The latest patch fails for me. My git sources are current as of Dec. 8. The first patch still works for me although not correct for all users. Build log:

[100%] Building CXX object kdevdesigner/designer/CMakeFiles/libkdevdesignerpart-module.dir/workspace.moc.cpp.o
cd /dev/shm/tdevelop.build/kdevdesigner/designer && /usr/bin/c++   -DDESIGNER -DHAVE_CONFIG_H -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_COMPAT -DQT_NO_STL -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -Dlibkdevdesignerpart_module_EXPORTS -O2 -march=i486 -mtune=i686 -ggdb -include tqt.h -fPIC -I/dev/shm/tdevelop.build/kdevdesigner/designer -I/dev/shm/tdevelop/kdevdesigner/designer -I/dev/shm/tdevelop/kdevdesigner/shared -I/dev/shm/tdevelop/lib/interfaces/external -I/opt/trinity/include -I/usr/include/tqt    -include tqt.h -UQT_NO_ASCII_CAST -o CMakeFiles/libkdevdesignerpart-module.dir/workspace.moc.cpp.o -c /dev/shm/tdevelop.build/kdevdesigner/designer/workspace.moc.cpp
make[2]: *** No rule to make target `/usr/lib/libtqassistantclient.a', needed by `kdevdesigner/designer/libkdevdesignerpart.so'.  Stop.
make[2]: Leaving directory `/dev/shm/tdevelop.build'
make[1]: *** [kdevdesigner/designer/CMakeFiles/libkdevdesignerpart-module.dir/all] Error 2
make[1]: Leaving directory `/dev/shm/tdevelop.build'
make: *** [all] Error 2
Comment 10 Slávek Banko 2013-12-09 16:30:13 CST
Created attachment 1712 [details]
tqtinterface : Not build tqassistantclient with native tqt

As I stated in previous comments, it seems pointless to build tqassistantclient in tqtinterface if built with native TQt.

The attached patch solves this.
Comment 11 Slávek Banko 2013-12-09 16:34:41 CST
Created attachment 1713 [details]
tdevelop : fix ftbfs due to tqassistantclient

Updated patch for tdevelop assumes that tqtinterface is built with a patch from attachment 1712 [details] == without tqassistantclient
in tqtinterface to allow use real tqassistantclient from tqt.
Comment 12 Darrell 2013-12-09 16:46:18 CST
In my tqt3 package I find the following:

/opt/trinity/include/ntqassistantclient.h
/opt/trinity/lib/libtqassistantclient.a
/opt/trinity/lib/libtqassistantclient.prl

In my tqtinterface package I find the following:

/usr/include/tqt/tqassistantclient.h
/usr/lib/libtqassistantclient.la
/usr/lib/libtqassistantclient.so.4.2.0

I see libtqassistantclient being built only in tqtinterface. Are others seeing libtqassistantclient being built in tqt3?
Comment 13 Slávek Banko 2013-12-09 16:57:06 CST
(Odpověď na komentář #12)
> In my tqt3 package I find the following:
> 
> /opt/trinity/include/ntqassistantclient.h
> /opt/trinity/lib/libtqassistantclient.a
> /opt/trinity/lib/libtqassistantclient.prl
> 
> In my tqtinterface package I find the following:
> 
> /usr/include/tqt/tqassistantclient.h
> /usr/lib/libtqassistantclient.la
> /usr/lib/libtqassistantclient.so.4.2.0
> 
> I see libtqassistantclient being built only in tqtinterface. Are others seeing
> libtqassistantclient being built in tqt3?

The problem is that libtqassistantclient.a and libtqassistantclient.so.4.2.0 are then seen as the same library => first static, second shared. But it is not true. Therefore if the linker uses the shared library, link is not possible, because it does not contain same functions as static library.

François on RPM distributions build tqt3 as shared, so there arises the immediate conflict, because a shared library is first build in tqt3 and the second in tqtinterface.

Patch from attachment 1712 [details] addresses exactly this problem.
Comment 14 Darrell 2013-12-09 17:16:23 CST
Ok, I see. I'm learning all the time. :-)

I rebuilt tqtinterface patched. The previous three tqassistantclient files no longer exist in the final tqtinterface package.

Thereafter tdevelop built without failure with the respective patch.

Good job!
Comment 15 Slávek Banko 2013-12-09 20:30:18 CST
Created attachment 1714 [details]
tqtinterface : Not build tqassistantclient for native tqt, embed static library for qt3

I believe that the previous version, which for qassistantclient library will create an "envelope" tqassistantclient, will not work if qassistantclient was static library (as is by default).

Updated patch is a bit more complex - in the case of static library will be embedded into shared library. In the case of shared library will link.

Note: This concerns to not native tqt builds.
Comment 16 Francois Andriot 2013-12-10 15:33:29 CST
Attachment 1714 [details] seems to fix build issue for me.
Comment 17 Francois Andriot 2013-12-10 15:41:20 CST
Attachment 1713 [details] fix build issue in tdevelop (after having rebuilt tqt3 and tqtinterface)
Comment 18 Slávek Banko 2013-12-11 02:36:05 CST
Fixed in GIT hash b67c2e55 (tqtinterface) and 64006cfc (tdevelop).
Comment 19 Michele Calgaro 2013-12-11 07:55:09 CST
Sorry for the late reply, I couldn't test before. I will rebuild and test as well, even though I believe the problem is now fixed judging by the other comments.
I am also learning all the time, so thanks for pointing out my mistakes Slavek :)