Qt-interest Archive, June 2007
Problem in .la files installed in qt/libs
Message 1 in thread
Hi
I'm currently running Qt 4.3.0-snapshot-20070602 (LINUX).
The problem is that, every .la file installed in qt/libs directory
contains following line:
dependency_libs='-L/usr/local/qt4/lib -lz -lm -pthread
-L/opt/gnome/lib -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl '
Here -pthread should have been -lpthread?
As a result build of (any qt4) application fail at link time.
I update qt build at least once a week for the past 2-3 months as far
as I can trace back this problem even existed then.
Thanks
--
[ signature omitted ]
Message 2 in thread
Sorry for earlier posting at qt-interest@xxxxxxxxxxxxx
---------- Forwarded message ----------
From: Yogesh M <yogeshm02@xxxxxxxxx>
Date: 02-Jun-2007 18:00
Subject: Problem in .la files installed in qt/libs
To: qt-interest@xxxxxxxxxxxxx
Hi
I'm currently running Qt 4.3.0-snapshot-20070602 (LINUX).
The problem is that, every .la file installed in qt/libs directory
contains following line:
dependency_libs='-L/usr/local/qt4/lib -lz -lm -pthread
-L/opt/gnome/lib -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl '
Here -pthread should have been -lpthread?
As a result build of (any qt4) application fail at link time.
I update qt build at least once a week for the past 2-3 months as far
as I can trace back this problem even existed then.
Thanks
--
[ signature omitted ]
Message 3 in thread
Hi,
> Here -pthread should have been -lpthread?
There's already an -lpthread option to link with libpthread, this looks like
the compiler's -pthread option.
> As a result build of (any qt4) application fail at link time.
How?
--
[ signature omitted ]
Message 4 in thread
On 02/06/07, Dimitri <dimitri@xxxxxxxxxxxxx> wrote:
> Hi,
>
> > Here -pthread should have been -lpthread?
>
> There's already an -lpthread option to link with libpthread, this looks like
> the compiler's -pthread option.
>
> > As a result build of (any qt4) application fail at link time.
>
> How?
>
> --
> Dimitri
>
Output produced while -pthread is there in .la file is attached herewith.
I've no idea where the problem lies. I just checked that changing
-pthread to -lpthread solves it.
Thanks
--
[ signature omitted ]
# libQtCore.la - a libtool library file
# Generated by qmake/libtool (2.01a) (Qt 4.3.0-snapshot-20070602) on: Sat Jun 2 15:19:12 2007
# The name that we can dlopen(3).
dlname='libQtCore.so.4'
# Names of this library.
library_names='libQtCore.so.4.3.0 libQtCore.so.4 libQtCore.so'
# The name of the static archive.
old_library='libQtCore.a'
# Libraries that this one depends upon.
dependency_libs='-L/usr/local/qt4/lib -lz -lm -pthread -L/opt/gnome/lib -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl '
# Version information for libQtCore.la
current=43
age=0
revision=0
# Is this an already installed library.
installed=yes
# Files to dlopen/dlpreopen.
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/usr/local/qt4/lib'
cd '/home/yogesh/gravity/debug' && gmake -j2
cd '/home/yogesh/gravity/debug' && gmake -j2
gmake all-recursive
Making all in src
Making all in PlayerEngines
Making all in GAkodeEngine
gmake[4]: Nothing to be done for `all'.
gmake[4]: Nothing to be done for `all-am'.
if g++ -DHAVE_CONFIG_H -I. -I/home/yogesh/gravity/src -I.. -I/home/yogesh/gravity/src/PlayerEngines/GAkodeEngine -I/opt/kde3/include -I/usr/lib/qt3/include -I. -I/usr/include/taglib -I/usr/local/qt4/include -I/usr/local/qt4/include/Qt -I/usr/local/qt4/include/QtCore -I/usr/local/qt4/include/QtGui -I/usr/local/qt4/include/QtXml -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -fno-builtin -g3 -fno-inline -O0 -g3 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -MT gplaylistmodelstandarditem.o -MD -MP -MF ".deps/gplaylistmodelstandarditem.Tpo" -c -o gplaylistmodelstandarditem.o /home/yogesh/gravity/src/gplaylistmodelstandarditem.cpp; then mv -f ".deps/gplaylistmodelstandarditem.Tpo" ".deps/gplaylistmodelstandarditem.Po"; else rm -f ".deps/gplaylistmodelstandarditem.Tpo"; exit 1; fi
/bin/sh ../libtool --silent --tag=CXX --mode=link g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -fno-builtin -g3 -fno-inline -O0 -g3 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -o gravity gcollection.o gcollectionholder.o gexpressionparser.o gfiletyperesolver.o gfiltereditor.o ghistorymodel.o glistsmanagermodel.o glistsmanagermodelitem.o glistsmanagermodelitemiterator.o glistsmanagerview.o gmediabrowser.o gmessenger.o gnowplayingmodel.o gplayer.o gplayerengine.o gplaylistitemdelegate.o gplaylistmodelbase.o gplaylistmodelstandarditem.o gplaylistmodelstandarditemiterator.o gplaylistserver.o gplayqueuemodel.o gravity.o gravitymainwindow.o groupbymenumanager.o gshortplaylistcontainer.o gstandardplaylistmodel.o gsystemtrayicon.o gtabwidget.o gtreeview.o main.o metaserver.o myapplication.o playerwidget.o playlistcontainer.o playlistiohandler.o playlistsmanager.o sqlite3.o sqliteengine.o ../src/PlayerEngines/GAkodeEngine/libAkodeEngine.a -lQtGui -lQtXml -lakode -ltag
libtool: link: cannot find the library `'
gmake[3]: *** [gravity] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***
Message 5 in thread
Hi,
> Output produced while -pthread is there in .la file is attached herewith.
>
> I've no idea where the problem lies. I just checked that changing
> -pthread to -lpthread solves it.
I'm afraid I have no idea why this happens, I don't have much experience with
*.la files used by libtool. it looks like libtool accepts the -pthread option,
but then passing it to the linker causes problems.
Removing -pthread altogether instead of changing it to -lpthread should also
fix the problem.
How did you create your Makefiles? Did you build you own versions of
automake/autoconf/libtool? Which exact distribution of Linux is this?
> [...]
> cd '/home/yogesh/gravity/debug' && gmake -j2
Please use gmake, not gmake -j2, or the output will be garbled.
Then you could try running the libtool command that's causing problems with
the --debug option. We'll probably get more information.
--
[ signature omitted ]
Message 6 in thread
---------- Forwarded message ----------
From: Yogesh M <yogeshm02@xxxxxxxxx>
Date: 04-Jun-2007 19:55
Subject: Re: Problem in .la files installed in qt/libs
To: Dimitri <dimitri@xxxxxxxxxxxxx>
>
> How did you create your Makefiles? Did you build you own versions of
> automake/autoconf/libtool? Which exact distribution of Linux is this?
>
> > [...]
> > cd '/home/yogesh/gravity/debug' && gmake -j2
>
> Please use gmake, not gmake -j2, or the output will be garbled.
>
> Then you could try running the libtool command that's causing problems with
> the --debug option. We'll probably get more information.
>
--debug is of no help.
I'm using KDevelop 3.4 to manage my project and it seems that
KDevelops generates its own libtool script. Project created with qmake
do well. So, the problem seems at the KDevelop end.
>
> Removing -pthread altogether instead of changing it to -lpthread should also
> fix the problem.
>
gcc man says "-pthread: Add support for multithreading using the POSIX
threads library. This option sets flags for both the preprocessor and
linker. It does not affect the thread safety of object code produced
by the compiler or that of libraries supplied with it. These are HP-UX
specific flags."
Since I'm using threads in my project and it compiles/links correctly
without -pthread, can I disable it for the time being?
Thanks & regards
--
[ signature omitted ]
Message 7 in thread
On 04.06.07 19:55:42, Yogesh M wrote:
> ---------- Forwarded message ----------
> From: Yogesh M <yogeshm02@xxxxxxxxx>
> Date: 04-Jun-2007 19:55
> Subject: Re: Problem in .la files installed in qt/libs
> To: Dimitri <dimitri@xxxxxxxxxxxxx>
>
>
> >
> >How did you create your Makefiles? Did you build you own versions of
> >automake/autoconf/libtool? Which exact distribution of Linux is this?
> >
> >> [...]
> >> cd '/home/yogesh/gravity/debug' && gmake -j2
> >
> >Please use gmake, not gmake -j2, or the output will be garbled.
> >
> >Then you could try running the libtool command that's causing problems with
> >the --debug option. We'll probably get more information.
> >
> --debug is of no help.
> I'm using KDevelop 3.4 to manage my project and it seems that
> KDevelops generates its own libtool script. Project created with qmake
> do well. So, the problem seems at the KDevelop end.
Thats wrong, KDevelop doesn't generate anything, in particular not the
libtool script in your build directory. That is generated by autotools,
so its no wonder qmake projects work fine. You should redirect this to
an autotools mailing list
Andreas
--
[ signature omitted ]
Message 8 in thread
Yogesh M wrote:
> I'm currently running Qt 4.3.0-snapshot-20070602 (LINUX).
>
> The problem is that, every .la file installed in qt/libs directory
> contains following line:
> dependency_libs='-L/usr/local/qt4/lib -lz -lm -pthread
> -L/opt/gnome/lib -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl '
In my experience, .la files are oftentimes more trouble than their worth,
and I usually just remove them (except when static linking is required).
-- Rex
--
[ signature omitted ]