Gilles, and others,
I have received the following after discussion on the Debian lists. Apparently this is a common case with many non-Debian build environments linking in unnecessary libraries even if they don't need them. In the digikam case, the fact that cImg specifically includes pthread.h means that ${CMAKE_THREAD_LIBS_INIT} should be specifically included in TARGET_LINK_LIBRARIES. Mark ---------- Forwarded Message ---------- Subject: Re: Build issues; Debian, cmake, KDE4/digikam = undefined reference to `pthread_create'. Date: Tue, 8 Jul 2008 From: Sune Vuorela <[hidden email]> To: [hidden email] On Tuesday 08 July 2008 00:33:33 Mark Purcell wrote: > Hi, > > I think I have come across a Debian specific issue in that digikam for kde4 > doesn't link with -pthread. Others on non-Debian build enviroment report > success. Non-debian environments recursively links everything in. This is a bug fixed in debian. It is slowly getting accepted by kde people. For details, see the "excessive linking" thread on kde-buildsystem maillist > I find I am able to force by including ${CMAKE_THREAD_LIBS_INIT} as a > TARGET_LINK_LIBRARIES, Yes. and this is the right thing to do. there seems to be several includes of pthread.h in the sources, so it should specify it. > but the concensus upstream is that this should > already be pulled in by the other KDE libraries. This is getting slowly changed. 'Cause it is a bug. It should not be pulled in by other KDE libraries unless those other libraries *exposes* the library. I don't think any of the kde libraries exposes pthread. (a quick way to see this is looking at the installed header files and see that none of them is including a pthread header file) > I am out of my depth with cmake, so I am looking for some further Debian > assistance here. > > ana/pusling have you seen this with any other KDE4 packages? Most of them. We are fixing them one by one. /Sune > cmake team an suggestions? > > Mark > > ---------- Forwarded Message ---------- > > Subject: Re: [Digikam-devel] 0.10.0-beta1 release tarball... > Date: Mon, 7 Jul 2008 > From: "Gilles Caulier" <[hidden email]> > To: "digiKam developers" <[hidden email]> > > 2008/7/7 Mark Purcell <[hidden email]>: > > On Mon, 7 Jul 2008, Gilles Caulier wrote: > >> Please give me a feedback if all compile fine on your computers before > >> to make the official release. > > > > Gilles, > > > > This version still fails to link using -lpthread for me on Debian which > > results in: > > undefined reference to `pthread_create'. > > > > As I mentioned yesterday I can workaround by manually patching links.txt, > > during build. > > > > Before building I have also found out how to force this inclusion in > > TARGET_LINK_LIBRARIES in digikam/CMakeLists.txt: > > > > --- digikam/CMakeLists.txt.orig 2008-07-07 22:21:31.000000000 +1000 > > +++ digikam/CMakeLists.txt 2008-07-07 21:57:05.000000000 +1000 > > @@ -117,6 +117,7 @@ > > ${KDCRAW_LIBRARIES} > > ${KEXIV2_LIBRARIES} > > ${KIPI_LIBRARIES} > > + ${CMAKE_THREAD_LIBS_INIT} > > ) > > > > IF(MARBLEWIDGET_FOUND) > > > > I suspect that this should automatically be included, and that is why > > others are having success. But for the Debian builds it appears that > > -lpthread isn't included and the binary doesn't link. > > ${CMAKE_THREAD_LIBS_INIT} evaluates to "-lpthread". > > > > I am unsure if this is going to effect anything else though as I don't > > grok CMake. > > > > Mark > > Perhaps a Debian expert can confirm a bug in CMake included in current > version ? Achim ? > > Gilles Caulier > _______________________________________________ > Digikam-devel mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-devel > > ------------------------------------------------------- Genius, I cannot turn off a hard disk, how does it work? You should log from a line over a LCD IRC case, in such way from AutoCAD you either must open the terminale, or must unmount the utility on the wordprocessor of a file of the device over the hardware to install a connector. ------------------------------------------------------- _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel signature.asc (204 bytes) Download Attachment |
File patched in svn. thanks for the report.
Gilles Caulier 2008/7/8 Mark Purcell <[hidden email]>: > Gilles, and others, > > I have received the following after discussion on the Debian lists. > > Apparently this is a common case with many non-Debian build environments > linking in unnecessary libraries even if they don't need them. > > In the digikam case, the fact that cImg specifically includes pthread.h means > that ${CMAKE_THREAD_LIBS_INIT} should be specifically included in > TARGET_LINK_LIBRARIES. > > Mark > > ---------- Forwarded Message ---------- > > Subject: Re: Build issues; Debian, cmake, KDE4/digikam = undefined reference > to `pthread_create'. > Date: Tue, 8 Jul 2008 > From: Sune Vuorela <[hidden email]> > To: [hidden email] > > > > On Tuesday 08 July 2008 00:33:33 Mark Purcell wrote: >> Hi, >> >> I think I have come across a Debian specific issue in that digikam for kde4 >> doesn't link with -pthread. Others on non-Debian build enviroment report >> success. > > Non-debian environments recursively links everything in. This is a bug fixed > in > debian. It is slowly getting accepted by kde people. > > For details, see the "excessive linking" thread on kde-buildsystem maillist > >> I find I am able to force by including ${CMAKE_THREAD_LIBS_INIT} as a >> TARGET_LINK_LIBRARIES, > > Yes. and this is the right thing to do. there seems to be several includes of > pthread.h in the sources, so it should specify it. > > >> but the concensus upstream is that this should >> already be pulled in by the other KDE libraries. > > This is getting slowly changed. 'Cause it is a bug. It should not be pulled in > by other KDE libraries unless those other libraries *exposes* the library. I > don't think any of the kde libraries exposes pthread. (a quick way to see this > is looking at the installed header files and see that none of them is > including > a pthread header file) > >> I am out of my depth with cmake, so I am looking for some further Debian >> assistance here. >> >> ana/pusling have you seen this with any other KDE4 packages? > > Most of them. We are fixing them one by one. > > /Sune > >> cmake team an suggestions? >> >> Mark >> >> ---------- Forwarded Message ---------- >> >> Subject: Re: [Digikam-devel] 0.10.0-beta1 release tarball... >> Date: Mon, 7 Jul 2008 >> From: "Gilles Caulier" <[hidden email]> >> To: "digiKam developers" <[hidden email]> >> >> 2008/7/7 Mark Purcell <[hidden email]>: >> > On Mon, 7 Jul 2008, Gilles Caulier wrote: >> >> Please give me a feedback if all compile fine on your computers before >> >> to make the official release. >> > >> > Gilles, >> > >> > This version still fails to link using -lpthread for me on Debian which >> > results in: >> > undefined reference to `pthread_create'. >> > >> > As I mentioned yesterday I can workaround by manually patching links.txt, >> > during build. >> > >> > Before building I have also found out how to force this inclusion in >> > TARGET_LINK_LIBRARIES in digikam/CMakeLists.txt: >> > >> > --- digikam/CMakeLists.txt.orig 2008-07-07 22:21:31.000000000 +1000 >> > +++ digikam/CMakeLists.txt 2008-07-07 21:57:05.000000000 +1000 >> > @@ -117,6 +117,7 @@ >> > ${KDCRAW_LIBRARIES} >> > ${KEXIV2_LIBRARIES} >> > ${KIPI_LIBRARIES} >> > + ${CMAKE_THREAD_LIBS_INIT} >> > ) >> > >> > IF(MARBLEWIDGET_FOUND) >> > >> > I suspect that this should automatically be included, and that is why >> > others are having success. But for the Debian builds it appears that >> > -lpthread isn't included and the binary doesn't link. >> > ${CMAKE_THREAD_LIBS_INIT} evaluates to "-lpthread". >> > >> > I am unsure if this is going to effect anything else though as I don't >> > grok CMake. >> > >> > Mark >> >> Perhaps a Debian expert can confirm a bug in CMake included in current >> version ? Achim ? >> >> Gilles Caulier >> _______________________________________________ >> Digikam-devel mailing list >> [hidden email] >> https://mail.kde.org/mailman/listinfo/digikam-devel >> >> ------------------------------------------------------- > > -- > Genius, I cannot turn off a hard disk, how does it work? > > You should log from a line over a LCD IRC case, in such way from AutoCAD you > either must open the terminale, or must unmount the utility on the > wordprocessor of a file of the device over the hardware to install a > connector. > > > ------------------------------------------------------- > > _______________________________________________ > Digikam-devel mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-devel > > Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |