Bug 276969 - [2.0.0-rc] pgfutils.cpp:154:45: error: invalid conversion from 'UINT32*' to 'int'
Summary: [2.0.0-rc] pgfutils.cpp:154:45: error: invalid conversion from 'UINT32*' to '...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Runtime (show other bugs)
Version: 2.0.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-02 18:26 UTC by Andreas K. Huettel
Modified: 2017-07-13 18:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Huettel 2011-07-02 18:26:58 UTC
2.0.0-rc fails to build with the following error:

[ 32%] Building CXX object digikam/CMakeFiles/digikamcore.dir/__/libs/threadimageio/pgfutils.o                                                                              
/var/tmp/portage/media-gfx/digikam-2.0.0_rc/work/digikam-2.0.0-rc/core/libs/threadimageio/pgfutils.cpp: In function 'bool Digikam::writePGFImageData(const QImage&, QByteArray&, int)':
/var/tmp/portage/media-gfx/digikam-2.0.0_rc/work/digikam-2.0.0-rc/core/libs/threadimageio/pgfutils.cpp:154:45: error: invalid conversion from 'UINT32*' to 'int'
/var/tmp/portage/media-gfx/digikam-2.0.0_rc/work/digikam-2.0.0-rc/core/libs/threadimageio/pgfutils.cpp:154:45: error:   initializing argument 2 of 'void CPGFImage::Write(CPGFStream*, int, bool (*)(double, bool, void*), UINT32*, void*)'
make[2]: *** [digikam/CMakeFiles/digikamcore.dir/__/libs/threadimageio/pgfutils.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [digikam/CMakeFiles/digikamcore.dir/all] Error 2
make: *** [all] Error 2

Installed pgf library is libpgf-6.09.44-r1

Regards from Perpignan, Andreas
Comment 1 caulier.gilles 2011-07-02 18:33:46 UTC
Which libPGF you use ? It's an external version or lib included in digiKam core ?

Gilles Caulier
Comment 2 Andreas K. Huettel 2011-07-02 19:09:55 UTC
That should be an external one... from the cmake output:

-- checking for module 'libpgf'
--   found libpgf, version 6.09.44
(...)
--  libpgf library found..................... YES (optional)
Comment 3 Andreas K. Huettel 2011-07-02 19:17:12 UTC
PS. Gilles, on which libpgf version is the bundled one based? I dont fully understand the various versions on the libpgf homepage yet, but if we need a newer version I can also just annoy our package maintainer and raise the deps... :)
Comment 4 caulier.gilles 2011-07-02 21:49:49 UTC
I recommend to use the libpgf version embeded in digiKam core which is the lasted one plus a lots of patches...

Gilles Caulier
Comment 5 Andreas K. Huettel 2011-07-02 22:07:54 UTC
Right... sorry, now I remember the various discussions with the libpgf author. 

I suggest we keep this bug open for now, in case other distros use the same older libpgf and also dont want to use bundled libraries.

I'll solve the problem for Gentoo by bringing our version up to the state of the bundled one. May take some time though.
Comment 6 caulier.gilles 2011-07-03 08:58:51 UTC
Git commit 1f80f35b68702136ebd3d315fe4baf7d75b3c142 by Gilles Caulier.
Committed on 03/07/2011 at 10:57.
Pushed by cgilles into branch 'master'.

compile with libpgf 6.09.44
BUGS: 276969

M  +7    -0    libs/threadimageio/pgfutils.cpp     

http://commits.kde.org/digikam/1f80f35b68702136ebd3d315fe4baf7d75b3c142
Comment 7 Matthias 2011-07-03 20:56:04 UTC
Not sure if my problem is a similiar problem, i can't compile version 2.0.0-rc because of a problem in pgfloader:

[  4%] Building CXX object digikam/CMakeFiles/digikamcore.dir/__/libs/dimg/loaders/pgfloader.o                                                                                     
/var/tmp/portage/media-gfx/digikam-2.0.0_rc/work/digikam-2.0.0-rc/core/libs/dimg/loaders/pgfloader.cpp: In member function âvirtual bool Digikam::PGFLoader::save(const QString&, Digikam::DImgLoaderObserver*)â:
/var/tmp/portage/media-gfx/digikam-2.0.0_rc/work/digikam-2.0.0-rc/core/libs/dimg/loaders/pgfloader.cpp:443: error: no matching function for call to âCPGFImage::Write(CPGFFileStream*, int, bool (&)(double, bool, void*), UINT32*, Digikam::PGFLoader* const)â
/usr/include/libpgf/PGFimage.h:209: note: candidates are: void CPGFImage::Write(CPGFStream*, UINT32*, bool (*)(double, bool, void*), void*)
/usr/include/libpgf/PGFimage.h:236: note:                 UINT32 CPGFImage::Write(int, bool (*)(double, bool, void*), void*)
make[2]: *** [digikam/CMakeFiles/digikamcore.dir/__/libs/dimg/loaders/pgfloader.o] Error 1
make[1]: *** [digikam/CMakeFiles/digikamcore.dir/all] Error 2
make: *** [all] Error 2

I'm using libpgf 6.11.24.

Thanks
Comment 8 Matthias 2011-07-03 22:03:18 UTC
> compile with libpgf 6.09.44

Sorry, works fine with that version :/
Comment 9 caulier.gilles 2011-07-04 11:54:29 UTC
Matthias,

You are right, digiKam do not compile with official libpgf package. I will fix it...

But i highly recommend to use embeded version in digiKam where i fixed a lots of problem OpenMP support, not yet included in official PGF repository. It will be done for next PGF release...

Gilles Caulier
Comment 10 caulier.gilles 2011-07-04 11:55:11 UTC
Git commit abd03787b7b1e3a392803edc5b40dfb25a69423c by Gilles Caulier.
Committed on 04/07/2011 at 13:54.
Pushed by cgilles into branch 'master'.

compile with last offcial libpgf
CCBUGS: 276969

M  +13   -9    cmake/modules/FindPGF.cmake     
M  +2    -0    digikam/utils/config-digikam.h.cmake     
M  +1    -0    libs/threadimageio/pgfutils.cpp     

http://commits.kde.org/digikam/abd03787b7b1e3a392803edc5b40dfb25a69423c
Comment 11 Dirk Tilger 2011-07-05 16:20:48 UTC
Does anything speak against making PGF support in digikam optional?
Comment 12 caulier.gilles 2011-07-05 19:54:02 UTC
Dirk,

libpgf cannot be optionnal, because it used bu digiKam database to store compressed thumbnails using wavelets to optimize storage.

Gilles Caulier