Problem with v4.7.1 on Ubuntu
-
Please read my post again. It clearly says v4.7.1 - downloaded from Nokia directly.
Ubuntu canonical is BEHIND Qt as they install 4.7.0 as an update to maverick and NOT 4.7.1.
I should also state that v4.7.1 is installed in /opt/qtsdk-2010.5.1 as root by default (my choice to use the .1 extension) NOT /usr/lib. v4.7.0 from canonical is in /usr/lib.
QtCreator is configured to use the v4.7.1 and all environment variables point to version used.
-
The SDK consists of Qt creator and the Qt libs. The former is at version 4.7.0, the latter at 2.0.1 for the 2010.05.x releases of the SDK.
In your first post you mentioned Creator 2.1 beta, which has not been released officially. Maybe some of your libs and paths are messed up.
Or some KDE components have sneaked into your installation without you noticing it. I'd try
@
strace -e trace=file -o TRACELOG <myprogram>
@afteerwards look at the file TRACELOG and check which files are tried to open.
-
Your getting things mixed: Qt SDK is not Qt Creator.
Qt SDK consists of Qt Libs + Qt Creator in particular versions.
It does not matter which version of Qt Creator you use to edit your code, what's causing the problem seems to be the Qt libs version.
You happily switch between SDK and Creator and between versions.
And again: There is no official 4.7.1 release of the libs. And I really do doubt that the trolls put a pre-release version into the official 2010.05.1 SDK package.
Additionally there is no officially released SDK package including Creator 2.1 beta.
You definitely messed up versions. I don't think it's sidetracked to sort these things out.
-
Volker I do not know what provoked your post but I is not based on what is online.
I stated very clearly:
[quote]
The problem described in my original post exists whether I use v2.01 QtCreator or v2.1b1.
[/quote]That was to answer the question whether it might be a problem using the Beta release of QtCreator 2.1 or not.
I also said:
[quote]
Please read my post again. It clearly says v4.7.1 – downloaded from Nokia directly.Ubuntu canonical is BEHIND Qt as they install 4.7.0 as an update to maverick and NOT 4.7.1.
I should also state that v4.7.1 is installed in /opt/qtsdk-2010.5.1 as root by default (my choice to use the .1 extension) NOT /usr/lib. v4.7.0 from canonical is in /usr/lib.
QtCreator is configured to use the v4.7.1 and all environment variables point to version used.
[/quote]That was to clarify what version of the SDK I was using (including the libs). There is no question as to which libs are involved nor is there a question as to whether I know the difference between QtCreator (in the SDK) and the libs of the SDK.
Please deal with the issue I posted originally.
-
The strace results are interesting. Here is just some of the very large (287 lines) output file:
@
execve("./DXCentral2", ["./DXCentral2"], [/* 42 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/opt/qtsdk-2010.05.1/qt/lib/tls/i686/sse2/cmov/libQtHelp.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/qtsdk-2010.05.1/qt/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/qtsdk-2010.05.1/qt/lib/Xrandr", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/qtsdk-2010.05.1/qt/lib/Xinerama", O_RDONLY) = -1 ENOENT (No such file or directory)@
Notice the first place it looks for libQtHelp.so.4 is in .opt/qtsdk-2010.05.1/qt/lib/tls/i686/sse2/cmov/
and
the first place it looks for libpthread.so.0 is in /opt/qtsdk-2010.05.1/qt/lib/
It also looks for GStreamer, Xrandr and Xinerama even though there is no reference to these modules anywhere in my app or in the .pro file. In fact the app does not use sound at all (other than for system sounds generated by GNOME). This is possibly the source of some of the messages mentioned in the original post.
Subsequent lines look in other folders and eventually in the folder I specified in my QtCreator config.
This is in spite of the fact that my environment variables and the QtCreator environment variables in general or for the project are correct.
I am not sure if this is normal output or not.
Grasping at straws - I have also cleaned out the /home/ken/.confg/Trolltech.conf file to see if there is something in that cache causing the problem. No difference.
I hope this is enough to tell what is going on.
Is there a way to specify the order of search at runtime?
-
It's ok that the system looks in the qt paths for other libs. I suspect that /opt/qtsdk-2010.05.1/qt/lib is in LD_LIBRARY_PATHS
I know not exactly, but I suspect that your program depends on phonon and/or webkit. Do you have CONFIG += phonon webkit or something like that in your .pro file?
You can also check what libs your program is linking to with
@
ldd yourprogram
@The output should show you all the libs that your program needs, and the paths where they are found (or that they are missing).
-
Yes the
@QT += webkit @
does exist and
@CONFIG +=qt@
exists in the .pro file.Does this mean that webkit depends on phonon and the runtime will try to call it anyway? The phonon module is part of KDE on Ubuntu and the SDK only has a wrapper in the includes (which I do not use). I have even used the
@QT -= phonon@
in the .pro file and that does not change anything.ldd does list phonon, Xrender, Gstreamer, and Xrandr are in the list even though there is no reference to any of them in my project.
The Qt Environment Variables list does not contain LD_LIBRARY_PATHS only PATH and yes the /opt/qtsdk-2010.05.1/qt/lib is in my PATH
I know there has to be something I am overlooking but I can't figure out what.
-
Webkit depends on phonon (at least on some platforms, including linux, if I remember correctly). You always get the dependency on phonon injected by webkit then. Explicitly excluding it from CONFIG does not help in that case.
If phonon is included by ubuntu it may be that the versions don't match. Could be that your Qt version is too new for the KDE libs or something like that. I can't help more on that, since I do not have a running maverick box at the moment. Maybe someone else can step in.
For LD_LIBRARY_PATHS: maybe the installer has added an entry in /etc/ld.so.conf or /etc/ld.so.conf.d
-
Well /etc/ld.so.conf only has one entry that says include *.conf in /etc/ld.so.conf.d
In /etc/ld.so.conf.d there is only
libc.conf
libasound2.conf
GL.conf
i686-linux-gnu.conf
i486-linux-gnu.confI would have expected that since phonon is not a part of the SDK that the wrapper would use the webkit phonon I have and the webkit phonon version (as long as it is backward compatible i.e. 4.6.3+) would not matter. Maybe that is a mistaken assumption on my part.