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 843

Summary: Tools provided by Qt3 conflict with ones from Qt4
Product: TDE Reporter: L0ner <sh4dou>
Component: qt3Assignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella
Priority: P5    
Version: 3.5.13 [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Rename binary files which conflict with Qt4

Description L0ner 2012-02-02 06:52:35 CST
I know that there were some changes in this filed with the
 introduction of TQt with already translated Q* objects to QT*. But I
 have I noticed on my system another thing having both qt3.3.8d and
 qt4.8.0 installed and I don't know if there are movements to resolve
 this.

 Qt provides set of tools that enable creation of qt-based
 applications. Those are: assistant, designer, linguist , lrelease,
 lupdate, moc, qmake, qtconfig, uic. Those are provided both by qt4 and
 our qt3.
 If I have both of the qt versions installed and I try to run one of
 those applications, only the qt4 versions are launched, and I am
 unable to launch qt3 ones unless i specify full path to them as
 command.
 That may be because I installed qt4 as second, and if I were to
 install it first and then qt3 then I'd be able to start only those
 provided by qt3.
 If I run those commands through whereis I get:

 assistant: /usr/bin/assistant /opt/qt/bin/assistant
 designer: /usr/bin/designer /opt/qt/bin/designer
 linguist: /usr/bin/linguist /opt/qt/bin/linguist
 lrelease: /usr/bin/lrelease /opt/qt/bin/lrelease
 lupdate: /usr/bin/lupdate /opt/qt/bin/lupdate
 moc: /usr/bin/moc /opt/qt/bin/moc
 qmake: /usr/bin/qmake /opt/qt/bin/qmake
 qtconfig: /usr/bin/qtconfig /opt/qt/bin/qtconfig

 Obviously, if I invoke assistant, the first path is executed.

 As a temporary solution for my packages I create links to the qt3
 tools in $prefix/bin/ and name them in the Qt3* scheme. Anyway I think
 those should be renamed in the TQt3 to avoid collisions with Qt4 ones.

While installing Qt3 under /opt doesn't result in direct binaries conflict, but only in path one, installing it under /usr would cause overwrite of Qt4 tools (if Qt4 was previously installed) or overwrite of Qt3 ones (if Qt3 was installed as first).
Comment 1 Darrell 2012-04-13 11:46:43 CDT
Are these bin files used only for compiling or are they used also during run-time?

Second, is there a way to rename the files when building (T)Qt3 such that when subsequent packages find the renamed bin files under the new name?
Comment 2 Darrell 2012-06-02 11:56:20 CDT
What is needed to rename the following (T)Qt3 bin files?

assistant
createcw
designer
linguist
lrelease
lupdate
makeqpf
mergetr
moc
msg2qm
qembed
qmake
qm2ts
qtconfig
uic

If these executables could be renamed, say witha prefix of t, such that building other packages still find and use these bin files, then possibly we could resolve this problem.
Comment 3 Timothy Pearson 2012-06-09 00:32:18 CDT
(In reply to comment #2)
> What is needed to rename the following (T)Qt3 bin files?

moc and uic are used during compilation, so any name changes of those two would require corresponding changes to tqtinterface (and possibly admin/ and cmake/).  The other applications can likely be renamed with minimal impact, provided that any .desktop files used to launch those applications are also updated.

For now, if a patch could be created against the tqt3 source tree in GIT which renames all applications except moc and uic, I would be willing to test it for inclusion in the qt3-->tqt3 generation scripts.  moc and uic will be more difficult to update, and will need coordination with updates to the TDE sources as mentioned above.
Comment 4 Darrell 2012-06-09 00:42:21 CDT
I'm willing to patch and test, but I don't know where to patch the files to force the name changes.

Qt4 uses the same moc and uic executable file names, so those two files would still conflict without a name change.

Would renaming these 15 (T)Qt3 executables be considered an ABI change?
Comment 5 Darrell 2012-06-09 00:50:58 CDT
For future discussion:

Qt4 executables:

assistant
assistant_adp
designer
lconvert
linguist
lrelease
lupdate
moc
pixeltool
qcollectiongenerator
qdbus
qdbuscpp2xml
qdbusviewer
qdbusxml2cpp
qdoc3
qhelpconverter
qhelpgenerator
qmake
qt3to4
qtconfig
qttracereplay
rcc
uic
uic3
xmlpatterns
xmlpatternsvalidator


(T)Qt3 executables:

assistant -> name conflict with Qt4
createcw
designer  -> name conflict with Qt4
linguist  -> name conflict with Qt4
lrelease  -> name conflict with Qt4
lupdate   -> name conflict with Qt4
makeqpf
mergetr
moc       -> name conflict with Qt4
msg2qm
qembed
qmake     -> name conflict with Qt4
qm2ts
qtconfig  -> name conflict with Qt4
uic       -> name conflict with Qt4
Comment 6 Timothy Pearson 2012-06-09 13:50:46 CDT
(In reply to comment #4)
> I'm willing to patch and test, but I don't know where to patch the files to
> force the name changes.

A quick look through the source shows that there are many supporting files that would need to change for each rename.  Directories of interest are:
./doc/man/man1/
./doc
./doc/html/

Renaming each executable is simpler.  Look for the .pro file that contains the executable name and simply change it!

If you do submit a patch to this report, please do NOT include moved files.  Instead, make a separate list of moved files.  Even better would be to patch all files before any file moving takes place.

> Qt4 uses the same moc and uic executable file names, so those two files would
> still conflict without a name change.
> 
> Would renaming these 15 (T)Qt3 executables be considered an ABI change?

There is no ABI to change here; the renaming would break the build process, not already-built executables and libraries.
Comment 7 Timothy Pearson 2012-06-19 14:35:29 CDT
Created attachment 682 [details]
Rename binary files which conflict with Qt4

This patch renames the conflicting binary files and adjust the TQt3 build process accordingly.  Before this patch can be pushed, patches for admin/ and cmake/ need to be created so that the TDE build process can detect the renamed binaries.

Also, this patch does NOT rename the manpages for the affected binaries.  That should be done via a script.
Comment 8 Timothy Pearson 2012-06-19 16:48:36 CDT
TQt3 updated in GIT hash 1ecf57d.

Some builds will likely fail until those failures are caught and repaired.
Comment 9 Darrell 2012-06-20 10:35:44 CDT
I ran a full build run against Slackware 13.1 32-bit. I pushed patches for some remaining nominal build failures, but all has been built. We're probably in the clear for this bug report, but should wait for others to report as well.
Comment 10 Timothy Pearson 2012-06-20 20:32:20 CDT
For reference, here are the new names:
> assistant -> tqassistant
> designer  -> tqdesigner
> linguist  -> tqlinguist
> lrelease  -> tqlrelease
> lupdate   -> tqlupdate
> moc       -> tqmoc
> qembed    -> tqembed
> qmake     -> tqmake
> qtconfig  -> tqtconfig
> uic       -> tquic
Comment 11 Timothy Pearson 2012-06-25 22:29:12 CDT
The rebuild tests on multiple distros have now completed successfully, so I am marking this bug RESOLVED FIXED.
Comment 12 Darrell 2012-08-20 14:43:37 CDT
I dislike reopening this bug report, but no renaming occurs when building Qt3 rather than TQt3.

I believe the renaming patch is be11de5d, 2012-06-19.
Comment 13 Timothy Pearson 2012-08-20 15:01:08 CDT
(In reply to comment #12)
> I dislike reopening this bug report, but no renaming occurs when building Qt3
> rather than TQt3.
> 
> I believe the renaming patch is be11de5d, 2012-06-19.

There is not supposed to be any renaming with Qt3--Qt3 is the stable maintenance tree, warts (Qt4 conflicts) and all.