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 1333 - Build Issue: krdc FTBFS
Summary: Build Issue: krdc FTBFS
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdenetwork (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 major
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2012-11-22 07:53 CST by Alexander Golubev (Fat-Zer)
Modified: 2013-08-15 00:33 CDT (History)
5 users (show)

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


Attachments
Build log (12.68 KB, application/octet-stream)
2012-11-22 07:53 CST, Alexander Golubev (Fat-Zer)
Details
The problem generated header (3.07 KB, application/octet-stream)
2012-11-22 07:56 CST, Alexander Golubev (Fat-Zer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Golubev (Fat-Zer) 2012-11-22 07:53:13 CST
Created attachment 1010 [details]
Build log

One of uic-generated header contains Debug() instead of qDebug() (or tqDebug() I'm not sure how it should be named now). See the log.

I'm Building with qt3/tqtinterface.
Comment 1 Alexander Golubev (Fat-Zer) 2012-11-22 07:56:35 CST
Created attachment 1011 [details]
The problem generated header
Comment 2 Darrell 2012-11-22 08:46:18 CST
In the GIT repository:

http://git.trinitydesktop.org/cgit/tdenetwork/tree/krdc/rdp/rdpprefs.ui.h

Notice line 76:

tqDebug("current depth: %i", cmbColorDepth->currentItem() );

Not sure why your sources are different.
Comment 3 Alexander Golubev (Fat-Zer) 2012-11-22 08:59:21 CST
> In the GIT repository:
> 
> http://git.trinitydesktop.org/cgit/tdenetwork/tree/krdc/rdp/rdpprefs.ui.h
> 
> Notice line 76:
> 
> tqDebug("current depth: %i", cmbColorDepth->currentItem() );
> 
> Not sure why your sources are different.

Those files shouldn't present in repository at all. They are compile-time generated.
Comment 4 Darrell 2012-11-22 09:58:47 CST
Do you see the same build failure when building against TQt3 rather than Qt3?
Comment 5 Alexander Golubev (Fat-Zer) 2012-11-22 10:14:11 CST
(In reply to comment #4)
> Do you see the same build failure when building against TQt3 rather than Qt3?
I haven't build tqt yet. But Slavek said he doesn't expect it with tqt.
Comment 6 Darrell 2012-11-22 10:14:44 CST
>Those files shouldn't present in repository at all. They are compile-time generated.

Searching the entire GIT source tree shows 362 *.ui.h files. Are you saying none of them should be in the source tree?
Comment 7 Alexander Golubev (Fat-Zer) 2012-11-22 11:46:16 CST
(In reply to comment #6)
> >Those files shouldn't present in repository at all. They are compile-time generated.
> 
> Searching the entire GIT source tree shows 362 *.ui.h files. Are you saying
> none of them should be in the source tree?

Generally, yes. But it seems they exist since kde-3.5 times so some of them may be included to Makefile.am's or CMakeList.txt's so their removal can break build process in some particular cases.
Comment 8 Timothy Pearson 2012-11-22 15:22:42 CST
Use tqDebug.

For reference, qDebug is provided by Qt4 and therefore we cannot safely use that method name in TQt3/TDE.
Comment 9 Alexander Golubev (Fat-Zer) 2012-11-23 03:56:36 CST
(In reply to comment #8)
> Use tqDebug.
> 
> For reference, qDebug is provided by Qt4 and therefore we cannot safely use
> that method name in TQt3/TDE.

It's not the explanation why qt's uic produces broken code...
Comment 10 Timothy Pearson 2012-11-23 13:56:35 CST
(In reply to comment #3)
> > In the GIT repository:
> > 
> > http://git.trinitydesktop.org/cgit/tdenetwork/tree/krdc/rdp/rdpprefs.ui.h
> > 
> > Notice line 76:
> > 
> > tqDebug("current depth: %i", cmbColorDepth->currentItem() );
> > 
> > Not sure why your sources are different.
> 
> Those files shouldn't present in repository at all. They are compile-time
> generated.

No, they are not.  There are several ui-related files, and their purposes are listed below:
<uifile>.ui:   XML-format description of GUI structure
<uifile>.ui.h: User- or Qt Designer- generated bindings for the .ui file of the same name
<uifile>.h:    Automatically generated file (from uic)
<uifile>.cpp:  Automatically generated file (from uic)
<uifile>.moc:  Automatically generated file (from moc)

If something is regenerating or modifying a .ui.h file, there is something very wrong in the build system.
Comment 11 Timothy Pearson 2012-11-23 14:21:47 CST
(In reply to comment #0)
> Created attachment 1010 [details]
> Build log
> 
> One of uic-generated header contains Debug() instead of qDebug() (or tqDebug()
> I'm not sure how it should be named now). See the log.
> 
> I'm Building with qt3/tqtinterface.

Are you using CMake or Autotools?
Comment 12 Alexander Golubev (Fat-Zer) 2012-11-23 15:46:59 CST
(In reply to comment #11)
> Are you using CMake or Autotools?

cmake(In reply to comment #10)

> (In reply to comment #3)
> No, they are not.  There are several ui-related files, and their purposes are
> listed below:
> <uifile>.ui:   XML-format description of GUI structure
> <uifile>.ui.h: User- or Qt Designer- generated bindings for the .ui file of the
> same name
> <uifile>.h:    Automatically generated file (from uic)
> <uifile>.cpp:  Automatically generated file (from uic)
> <uifile>.moc:  Automatically generated file (from moc)
> 
> If something is regenerating or modifying a .ui.h file, there is something very
> wrong in the build system.

are you sure about that? 
I'm not really into qt3 build process etc. But as I can see <uifile>.ui.h files are generated everywhere. So if you are right I suspect we got two bugs: 
1. One in Qt code generators (in a part of Designer or wherever those ui.h are come from)
2. In cmake core functionality.

On 3.5.13.1 that works well.
Comment 13 Timothy Pearson 2012-11-23 15:56:21 CST
(In reply to comment #12)
> (In reply to comment #11)
> > Are you using CMake or Autotools?
> 
> cmake(In reply to comment #10)
<snip>
> are you sure about that? 

Yes.

> I'm not really into qt3 build process etc. But as I can see <uifile>.ui.h files
> are generated everywhere. So if you are right I suspect we got two bugs: 
> 1. One in Qt code generators (in a part of Designer or wherever those ui.h are
> come from)

Qt Designer (a GUI application) is supposed to be able to generate/edit ui.h files.  uic is not.

> 2. In cmake core functionality.
> 
> On 3.5.13.1 that works well.

Can you please attach a full verbose CMake build log to this report?  I would like to see exactly what tools are run and on which files during the build process.

Thanks!
Comment 14 Alexander Golubev (Fat-Zer) 2012-11-23 16:38:42 CST
> > I'm not really into qt3 build process etc. But as I can see <uifile>.ui.h files
> > are generated everywhere. So if you are right I suspect we got two bugs: 
> > 1. One in Qt code generators (in a part of Designer or wherever those ui.h are
> > come from)
> 
> Qt Designer (a GUI application) is supposed to be able to generate/edit ui.h
> files.  uic is not.
>
> > 2. In cmake core functionality.
> > 
> > On 3.5.13.1 that works well.
> 
> Can you please attach a full verbose CMake build log to this report?  I would
> like to see exactly what tools are run and on which files during the build
> process.
> 
> Thanks!

First off all sorry for such loud words, I can be sometimes really offensive and mistrustful to the source and other people's work when I can't find the reason of a bug.

First of all ui.h files are just being copied to build directory and then processed by the tqt-replace.
The blame in all this is the next substitution in tqt-replace:
 sed -i 's/\([ \t]\)tq\([^:(_)\t ]\)/\1\2/g' "$1"
I've got no idea that this is supposed to do but it renames tqDebug->Debug as well.

So now I think it's up to you to decide how to better fix it... 
IMHO to add another substitution for qDebug to tqt-replace is the right choise.

PS: And what do you mean under the «verbose build log»?
Comment 15 Timothy Pearson 2012-11-23 17:27:46 CST
> First off all sorry for such loud words, I can be sometimes really offensive
> and mistrustful to the source and other people's work when I can't find the
> reason of a bug.

No problem; I know first hand how frustrating debugging can be!

> First of all ui.h files are just being copied to build directory and then
> processed by the tqt-replace.
> The blame in all this is the next substitution in tqt-replace:
>  sed -i 's/\([ \t]\)tq\([^:(_)\t ]\)/\1\2/g' "$1"
> I've got no idea that this is supposed to do but it renames tqDebug->Debug as
> well.

Weird!  I would expect that line to read:
sed -i 's/\([ \t]\)tq\([^:(_)\t ]\)/\1q\2/g' "$1"

If you make that change does the build succeed?

> PS: And what do you mean under the «verbose build log»?

CMake can either show or hide the program and arguments of each command it executes AFAIK.  I wanted to see what CMake was executing and when, but since you found the source of the problem I don't need the build logs :-)
Comment 16 Timothy Pearson 2012-11-23 17:29:25 CST
Actually now that I think about it further, why are ui.h files being run through tqt-replace at all?  Only the .ui files themselves should be run through tqt-replace; this smells like a subtle TDE CMake build system bug to me.
Comment 17 Alexander Golubev (Fat-Zer) 2012-11-23 18:36:28 CST
(In reply to comment #15)
> > First of all ui.h files are just being copied to build directory and then
> > processed by the tqt-replace.
> > The blame in all this is the next substitution in tqt-replace:
> >  sed -i 's/\([ \t]\)tq\([^:(_)\t ]\)/\1\2/g' "$1"
> > I've got no idea that this is supposed to do but it renames tqDebug->Debug as
> > well.
> 
> Weird!  I would expect that line to read:
> sed -i 's/\([ \t]\)tq\([^:(_)\t ]\)/\1q\2/g' "$1"
> 
> If you make that change does the build succeed?

yes. 

So after all it's just a trivial mistake in the script since the first days of trinity existence >_<

> > PS: And what do you mean under the «verbose build log»?
> 
> CMake can either show or hide the program and arguments of each command it
> executes AFAIK.  I wanted to see what CMake was executing and when, but since
> you found the source of the problem I don't need the build logs :-)
You're about make VERBOSE=1? The log is attached since the bug filled... So I surprised and thought you know some very-verbose mode.
Comment 18 Timothy Pearson 2012-11-23 19:24:32 CST
I'm pretty sure the mistake is actually in the cmake folder, at Line 25 of tde_uic.cmake:

http://git.trinitydesktop.org/cgit/cmake/tree/modules/tde_uic.cmake

As far as I know there is absolutely no reason to execute tqt-replace on those files, and also AFAIK Autotools does not do this, hence the reason Autotools sometimes works while CMake does not.
Comment 19 Alexander Golubev (Fat-Zer) 2012-11-24 04:08:53 CST
(In reply to comment #18)
> I'm pretty sure the mistake is actually in the cmake folder, at Line 25 of
> tde_uic.cmake:
> 
> http://git.trinitydesktop.org/cgit/cmake/tree/modules/tde_uic.cmake
> 
> As far as I know there is absolutely no reason to execute tqt-replace on those
> files, and also AFAIK Autotools does not do this, hence the reason Autotools
> sometimes works while CMake does not.

yes, if you say so, the lines 23 through 26 seems to be unnecessary. But  if this change will break something else requires a further testing...

Anyway that the «q» is missing in the tqt-replace sounds reasonable as well.
Comment 20 Slávek Banko 2013-02-04 15:25:50 CST
Please, this issue is still valid? On Debian and Ubuntu is tdenetwork built using CMake from 2 December 2012 and the problem does not occur.
Comment 21 Alexander Golubev (Fat-Zer) 2013-02-19 20:37:46 CST
(In reply to comment #20)
> Please, this issue is still valid? On Debian and Ubuntu is tdenetwork built
> using CMake from 2 December 2012 and the problem does not occur.

Sorry I've lost my test virtualmachines's and can't test it for now...
But it should be there...
It seems there was no major changes since it was opened. 
May be it compiles well  because you already fixed tqt-replace script somewhere? Or TQT_REPLACE_SCRIPT cmake variable haven't been set at all during configuration...

So keep it opened yet...
Comment 22 Darrell 2013-04-13 14:35:48 CDT
Is this problem still valid? I have been compiling package sets from GIT the past couple of weeks. I have no problem building krdc. krdc also was fixed recently with commit 339d5c5 as noted in bug report 1403. As reported in comment 10 of that report, I have no problem using krdc/krfb.
Comment 23 Darrell 2013-05-09 16:02:30 CDT
No response from the original reporter. Closing as WORKSFORME.