Bug 147626 - 0.9.2 fails to build
Summary: 0.9.2 fails to build
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 21:45 UTC by Markus
Modified: 2017-08-19 21:06 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2007-07-06 21:45:52 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3.6 
OS:                Linux

When i try to compile digikam-0.9.2 from source on Slackware 10.2/gcc 3.3.6 i get this error:

if /bin/sh ../../../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../digikam/utilities/imageeditor/editor -I../../../digikam/utilities/imageeditor/canvas -I../../../digikam/libs/histogram -I../../../digikam/libs/levels -I../../../digikam/libs/curves -I../../../digikam/libs/whitebalance -I../../../digikam/libs/widgets/common -I../../../digikam/libs/widgets/iccprofiles -I../../../digikam/libs/widgets/imageplugins -I../../../digikam/libs/dialogs -I../../../digikam/libs/dimg -I../../../digikam/libs/dmetadata -I../../../digikam/libs/dimg/filters -I../../../digikam/digikam -I/opt/kde/include -I/usr/lib/qt/include -I/usr/X11R6/include    -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE  -MT imageeffect_hotpixels.lo -MD -MP -MF ".deps/imageeffect_hotpixels.Tpo" -c -o imageeffect_hotpixels.lo imageeffect_hotpixels.cpp; \
then mv -f ".deps/imageeffect_hotpixels.Tpo" ".deps/imageeffect_hotpixels.Plo"; else rm -f ".deps/imageeffect_hotpixels.Tpo"; exit 1; fi

imageeffect_hotpixels.cpp: In member function `void 
   DigikamHotPixelsImagesPlugin::ImageEffect_HotPixels::slotAddBlackFrame()':
imageeffect_hotpixels.cpp:161: error: type specifier omitted for parameter `
   KImageIO::pattern()'
imageeffect_hotpixels.cpp:161: error: type specifier omitted for parameter
imageeffect_hotpixels.cpp:161: error: syntax error before `this'
imageeffect_hotpixels.cpp:162: error: request for member `setCaption' in `
   DigikamHotPixelsImagesPlugin::fileSelectDialog', which is of non-aggregate 
   type `KFileDialog ()(...)'
imageeffect_hotpixels.cpp:163: confused by earlier errors, bailing out
make: *** [imageeffect_hotpixels.lo] Error 1

If i replace

   void ImageEffect_HotPixels::slotAddBlackFrame()

with the last version included in digikamimageplugins-0.9.1 everything seem to build fine. I googled and found others with the same problem (http://mail.kde.org/pipermail/digikam-users/2007-June/003796.html) but without any solution yet... (except replace the whole function but me is unsure if it is safe to replace it).

Markus
Comment 1 Markus 2007-07-07 05:14:25 UTC
Hi...
I just tested digikam with the above replacment and at least the hotpixel plugin seem to work fine. This is what i have done:

In file imageeffect_hotpixels.cpp i replaced this in digikam-0.9.2:


void ImageEffect_HotPixels::slotAddBlackFrame()
{
    //Does one need to do this if digikam did so already?
    KImageIO::registerFormats(); 
    
    KFileDialog fileSelectDialog(QString(), KImageIO::pattern(), this, "", true);
    fileSelectDialog.setCaption(i18n("Select Black Frame Image"));
    fileSelectDialog.setURL(m_blackFrameURL.path());
    
    if (fileSelectDialog.exec() != QDialog::Rejected)
    {
       //Load the selected file and insert into the list
        
       m_blackFrameURL = fileSelectDialog.selectedURL();
       m_blackFrameListView->clear();
       new BlackFrameListViewItem(m_blackFrameListView, m_blackFrameURL);
    }
}


with this from digikamimageplugins-0.9.1:


void ImageEffect_HotPixels::slotAddBlackFrame()
{
    //Does one need to do this if digikam did so already?
    KImageIO::registerFormats(); 
    
    KFileDialog *fileSelectDialog = new KFileDialog(QString(), KImageIO::pattern(), this, "", true);
    fileSelectDialog->setCaption(i18n("Select Black Frame Image"));
    fileSelectDialog->setURL(m_blackFrameURL.path());
    
    if (fileSelectDialog->exec() != QDialog::Rejected)
    {
       //Load the selected file and insert into the list
        
       m_blackFrameURL = fileSelectDialog->selectedURL();
       m_blackFrameListView->clear();
       new BlackFrameListViewItem(m_blackFrameListView, m_blackFrameURL);
    }
        
    delete fileSelectDialog;
}


Comment 2 Markus 2007-07-07 06:00:00 UTC
to be correct: I can load an image using the above replacement, but like on digikam 0.9.1 and digikamimageplugins 0.9.1 the hotpixel plugin will crash if i select "OK".
Comment 3 caulier.gilles 2007-07-10 22:26:42 UTC
> hotpixel plugin will crash if i select "OK"

This is why the code have been fixed in svn...

But there is no reason than plugin do not compile as well. 

Gilles
Comment 4 Arnd Baecker 2007-09-06 19:11:03 UTC
Markus, 

could you try with current svn if the compile problem still persists?

Many thanks in advance, 

Arnd
Comment 5 Markus 2007-09-06 22:43:44 UTC
Hi
I tried to compile digikam from SVN according to the instructions on http://www.digikam.org/?q=download/svn but the instructions listed there do not seem to work (even the script listed there does not work). After i figured out how to get the svn-code i was told that i need to install libkdcraw 0.1.2. Since there is no official 0.1.2 out yet i tried to get the SVN code.. after all i failed to compile libkdcraw. However, i don't have the time to continue guessing how to get digikam installed from svn. If there is a step-by-step guide for how to compile digikam from SVN i really would like to help... otherwise... sorry.

Markus

Comment 6 Arnd Baecker 2007-09-07 08:56:25 UTC
Hi Markus,

the compile script works fine for me (just checked the whole procedure).

So what are the error messages you obtain for
a) the script  (i.e. what does not work?)
b) the compile for libkdcraw (what does fail?)

Arnd
Comment 7 Markus 2007-09-07 19:05:18 UTC
Ok... here is what i have done:

# svn co -N svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/graphics/
[Downloading some files]
# cd graphics
# svn up digikam
[Downloading some files]
# svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
[Downloading some files]
# cd ..
# svn co svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/libs
[Downloading some files]
...
Fetching external item into 'libs/admin'
svn: Unrecognized URL scheme for 'https://svn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin'

That seem to be a critical error because if i do what should be done next i'll get this:

# export UNSERMAKE=no
# make -f Makefile.cvs

This Makefile is only for the CVS repository
This will be deleted before making the distribution

Please recheckout this module!
for cvs: use checkout once and after that update again
for cvsup: checkout kde-common from cvsup and
   link kde-common/admin to ./admin
make: *** [all] Error 1

I started the whole download in an empty directory and i have never use kde/svn before (so i have used svn on other projects without any issues). I have subversion-1.4.4 installed if that helps troubleshooting.

Markus
Comment 8 Arnd Baecker 2007-09-07 19:33:11 UTC
Hmm, this
> Fetching external item into 'libs/admin'
> svn: Unrecognized URL scheme for 
> 'https://svn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin' 
is indeed the critical error.

This suggests that you svn was maybe not installed with SSL support.
(The command worked fine for me just a minute ago, but this is under
debian etch, where I never had such a problem).

Best, Arnd
Comment 9 Markus 2007-09-07 21:26:59 UTC
Hi...

Thx for the hint. I did rebuild subversion using the --disable-neon-version-check and subversion did work now. I followed the steps and started to build the libs using:

# ./configure --prefix=/opt/kde
# make

Make started to build libkexiv2 which i had allready installed in the same version (0.1.5). But the build did fail:

make  all-recursive
make[1]: Entering directory `/root/svn2/libs'
Making all in libkexiv2
make[2]: Entering directory `/root/svn2/libs/libkexiv2'
Making all in libkexiv2
make[3]: Entering directory `/root/svn2/libs/libkexiv2/libkexiv2'
if /bin/sh ../../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/kde/include -I/usr/lib/qt/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions  -MT kexiv2.lo -MD -MP -MF ".deps/kexiv2.Tpo" -c -o kexiv2.lo kexiv2.cpp; \
then mv -f ".deps/kexiv2.Tpo" ".deps/kexiv2.Plo"; else rm -f ".deps/kexiv2.Tpo"; exit 1; fi
kexiv2.cpp:57: warning: ignoring #pragma GCC visibility
kexiv2.cpp:65: warning: ignoring #pragma GCC visibility
kexiv2.cpp: In member function `bool 
   KExiv2Iface::KExiv2::setExifThumbnail(const QImage&, bool)':
kexiv2.cpp:685: error: type specifier omitted for parameter
kexiv2.cpp:685: error: syntax error before string constant
kexiv2.cpp:686: error: request for member `setAutoDelete' in `
   KExiv2Iface::thumbFile', which is of non-aggregate type `KTempFile ()(...)'
kexiv2.cpp:687: error: request for member `name' in `KExiv2Iface::thumbFile', 
   which is of non-aggregate type `KTempFile ()(...)'
kexiv2.cpp:689: error: request for member `name' in `KExiv2Iface::thumbFile', 
   which is of non-aggregate type `KTempFile ()(...)'
kexiv2.cpp: In member function `virtual bool 
   KExiv2Iface::KExiv2::setImagePreview(const QImage&, bool)':
kexiv2.cpp:1125: error: type specifier omitted for parameter
kexiv2.cpp:1125: error: syntax error before string constant
kexiv2.cpp:1126: error: request for member `setAutoDelete' in `
   KExiv2Iface::previewFile', which is of non-aggregate type `KTempFile ()(...)
   '
kexiv2.cpp:1128: error: request for member `name' in `KExiv2Iface::previewFile
   ', which is of non-aggregate type `KTempFile ()(...)'
kexiv2.cpp:1130: error: request for member `name' in `KExiv2Iface::previewFile
   ', which is of non-aggregate type `KTempFile ()(...)'
distcc[3774] ERROR: compile kexiv2.cpp on localhost failed
make[3]: *** [kexiv2.lo] Error 1
make[3]: Leaving directory `/root/svn2/libs/libkexiv2/libkexiv2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/svn2/libs/libkexiv2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/svn2/libs'
make: *** [all] Error 2

No idea why the build fails sind i compiled 0.1.5 from the official tarball and that did build fine. Since i had all deps installed i left the libs directory and went over to digikam:

# make Makefile.cvs
# ./configure --prefix=/opt/kde

Ok, i need to install libkdcraw-0.1.2. On the KDE-imaging mailing list i found a link to an testing tarball, http://mail.kde.org/pipermail/kde-imaging/2007-August/005458.html . I installed that using the usual commands.

then i tried again:


# ./configure --prefix=/opt/kde
# make
...
Making all in dmetadata
make[4]: Entering directory `/root/svn2/graphics/digikam/libs/dmetadata'
if /bin/sh ../../../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../digikam/libs/dimg -I../../../digikam/digikam -I/opt/kde/include   -I/opt/kde/include   -I/opt/kde/include -I/usr/lib/qt/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE  -MT dmetadata.lo -MD -MP -MF ".deps/dmetadata.Tpo" -c -o dmetadata.lo dmetadata.cpp; \
then mv -f ".deps/dmetadata.Tpo" ".deps/dmetadata.Plo"; else rm -f ".deps/dmetadata.Tpo"; exit 1; fi
dmetadata.cpp: In member function `bool 
   Digikam::DMetadata::loadUsingDcraw(const QString&)':
dmetadata.cpp:87: error: 'class KDcrawIface::DcrawInfoContainer' has no member 
   named 'owner'
dmetadata.cpp:88: error: 'class KDcrawIface::DcrawInfoContainer' has no member 
   named 'owner'
distcc[32271] ERROR: compile dmetadata.cpp on localhost failed
make[4]: *** [dmetadata.lo] Error 1
make[4]: Leaving directory `/root/svn2/graphics/digikam/libs/dmetadata'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/svn2/graphics/digikam/libs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/svn2/graphics/digikam'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/svn2/graphics'
make: *** [all] Error 2

Markus
Comment 10 Arnd Baecker 2007-09-07 21:38:10 UTC
This should not happen.
I would strongly recommend to follow the steps under "Install digiKam in your Home Directory" on http://www.digikam.org/?q=download/svn
This guarantees that you don't mess up anything on your
system by installing it as normal user and all paths 
are set correctly. 
Comment 11 Arnd Baecker 2007-09-07 21:53:22 UTC
Gilles just suggested on IRC to use
 --enable-gcc-hidden-visibility
as additional option to configure, this might help in this case.
Comment 12 Arnd Baecker 2007-10-09 17:18:28 UTC
Markus, what is the status about this issue, any progress?
Comment 13 Markus 2007-10-28 15:56:05 UTC
> ------- Additional Comments From arnd.baecker web de  2007-10-09 17:18 -------
> Markus, what is the status about this issue, any progress?
> 


First of all: sorry that i did not reply earlier...


I wasn't able to compile from SVN (i am a KDE-SVN-noob, sorry) but i 
tried digikam 0.9.3 beta1.

beta1 still fails to compile, with or without the 
"--enable-gcc-hidden-visibility" parameter:

======================================================================
make[4]: Entering directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/digikam/imageplugins/hotpixels'
if /bin/sh ../../../libtool --silent --tag=CXX --mode=compile g++ 
-DHAVE_CONFIG_H -I. -I. -I../../.. 
-I../../../digikam/utilities/imageeditor/editor 
-I../../../digikam/utilities/imageeditor/canvas 
-I../../../digikam/libs/histogram -I../../../digikam/libs/levels 
-I../../../digikam/libs/curves -I../../../digikam/libs/whitebalance 
-I../../../digikam/libs/widgets/common 
-I../../../digikam/libs/widgets/iccprofiles 
-I../../../digikam/libs/widgets/imageplugins 
-I../../../digikam/libs/dialogs -I../../../digikam/libs/dimg 
-I../../../digikam/libs/dmetadata -I../../../digikam/libs/dimg/filters 
-I../../../digikam/digikam  -I/opt/kde/include -I/usr/lib/qt/include 
-I/usr/X11R6/include    -DQT_THREAD_SUPPORT  -D_REENTRANT 
-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE 
-Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -O2 
-march=i486 -mcpu=i686 -Wformat-security -Wmissing-format-attribute 
-Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common 
-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT 
-DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE  -MT imageeffect_hotpixels.lo 
-MD -MP -MF ".deps/imageeffect_hotpixels.Tpo" -c -o 
imageeffect_hotpixels.lo imageeffect_hotpixels.cpp; \
then mv -f ".deps/imageeffect_hotpixels.Tpo" 
".deps/imageeffect_hotpixels.Plo"; else rm -f 
".deps/imageeffect_hotpixels.Tpo"; exit 1; fi
imageeffect_hotpixels.cpp: In member function `void
 
DigikamHotPixelsImagesPlugin::ImageEffect_HotPixels::slotAddBlackFrame()':
imageeffect_hotpixels.cpp:158: error: type specifier omitted for parameter `
    KImageIO::pattern()'
imageeffect_hotpixels.cpp:158: error: type specifier omitted for parameter
imageeffect_hotpixels.cpp:158: error: syntax error before `this'
imageeffect_hotpixels.cpp:159: error: request for member `setCaption' in `
    DigikamHotPixelsImagesPlugin::fileSelectDialog', which is of 
non-aggregate
    type `KFileDialog ()(...)'
imageeffect_hotpixels.cpp:160: confused by earlier errors, bailing out
make[4]: *** [imageeffect_hotpixels.lo] Error 1
make[4]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/digikam/imageplugins/hotpixels'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/digikam/imageplugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/digikam'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1'
make: *** [all] Error 2
======================================================================

If i apply the diff from imageplugins-0.9.1 to digikam/imageplugins:

======================================================================
--- ./digikam/imageplugins/hotpixels/imageeffect_hotpixels.cpp
+++ ./digikam/imageplugins/hotpixels/imageeffect_hotpixels.cpp
@@ -155,18 +155,20 @@

  void ImageEffect_HotPixels::slotAddBlackFrame()
  {
-    KFileDialog fileSelectDialog(QString(), KImageIO::pattern(), this, 
"", true);
-    fileSelectDialog.setCaption(i18n("Select Black Frame Image"));
-    fileSelectDialog.setURL(m_blackFrameURL.path());
+    KFileDialog *fileSelectDialog = new KFileDialog(QString(), 
KImageIO::pattern(), this, "", true);
+    fileSelectDialog->setCaption(i18n("Select Black Frame Image"));
+    fileSelectDialog->setURL(m_blackFrameURL.path());

-    if (fileSelectDialog.exec() != QDialog::Rejected)
+    if (fileSelectDialog->exec() != QDialog::Rejected)
      {
         //Load the selected file and insert into the list

-       m_blackFrameURL = fileSelectDialog.selectedURL();
+       m_blackFrameURL = fileSelectDialog->selectedURL();
         m_blackFrameListView->clear();
         new BlackFrameListViewItem(m_blackFrameListView, m_blackFrameURL);
      }
+
+    delete fileSelectDialog;
  }

  void ImageEffect_HotPixels::renderingFinished(void)
======================================================================


then digikam compiles fine for this plugin but will fail here:

======================================================================
Making all in el
make[3]: Entering directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/po/el'
rm -f digikam.gmo; /usr/bin/msgfmt -o digikam.gmo ./digikam.po
./digikam.po:12280:4: parse error
./digikam.po:12280: missing `msgstr' section
./digikam.po:12290:4: parse error
./digikam.po:12290: missing `msgstr' section
./digikam.po:12294:4: parse error
./digikam.po:12294: missing `msgstr' section
./digikam.po:12301:4: parse error
./digikam.po:12301: missing `msgstr' section
./digikam.po:12338:4: parse error
./digikam.po:12339: keyword "msgctxt" unknown
./digikam.po:12338: missing `msgstr' section
./digikam.po:12347:4: parse error
./digikam.po:12348: keyword "msgctxt" unknown
./digikam.po:12347: missing `msgstr' section
./digikam.po:12352:4: parse error
./digikam.po:12353: keyword "msgctxt" unknown
./digikam.po:12352: missing `msgstr' section
./digikam.po:12357: keyword "msgctxt" unknown
./digikam.po:12357:11: parse error
./digikam.po:12379:4: parse error
/usr/bin/msgfmt: too many errors, aborting
make[3]: *** [digikam.gmo] Error 1
make[3]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/po/el'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/root/test/digikam/source-digikam/digikam-0.9.3-beta1'
make: *** [all] Error 2
======================================================================

If i leave off the translation for 'el' digikam compiles fine on 
Slackware 10.2 using gcc 3.3.6. HotPixel still does not work on 
10.2/gcc-3.3.6 but that may be because of that build fix i applied.

Markus
Comment 14 caulier.gilles 2007-11-28 13:01:31 UTC
Markus,

Try a gcc 4.x version...

Gilles
Comment 15 Markus 2007-11-29 06:35:00 UTC
gcc 3.4.6 may work also but if it is recommended to upgrade gcc i stick with the previous release of digikam, thx.
Comment 16 Arnd Baecker 2007-11-29 07:49:06 UTC
I only now really realized what it means that you run slackware 10.2,
as this was released in 2005.  By now Slackware 12.0 is out,
and this includes a recent gcc. To me the error you encounter
sounds like a bug in gcc 3.3.6 because the corresponding code looks
ok and compiles fine with a newer gcc.
I am sorry, but if this is really the case, there is not much which
we can do, because working around bugs of compiler versions as old as this
does not sound right to me.
Thanks a lot for your understanding!