Bug 90542

Summary: cant compile , jpeg missing
Product: [Applications] digikam Reporter: Martin Laberge <mlsoft>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, rdieter
Priority: NOR    
Version: 0.7.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Laberge 2004-09-30 14:48:56 UTC
Version:           0.7.0-cvs (using KDE 3.1.4)
Installed from:    compiled sources
Compiler:          gcc version 3.2.3
OS:                Linux (i686) release 2.4.26

since this morning I can't compile digikam anymore, cause it is missing a couple of jpeg functions that it is unable to find.

I tried to add any jpeg related library found on my system, and no success.
(I added the jpeg6b library over my jpeg standard library without more  success. (the missing jpegint.h file was found in this package))

could you tell me what is the esoteric jpeg library needed to compile with
the new modifications of cameraclient from this morning.
Comment 1 Renchi Raju 2004-09-30 15:58:07 UTC
CVS commit by pahlibar: 


added jpegint.h as some distributions don't include it in the jpeg library
installation.
CCMAIL: 90542-done@bugs.kde.org


  A            jpegint.h   1.1 [UNKNOWN]



Comment 2 Martin Laberge 2004-09-30 16:02:21 UTC
here is the error i get with the jpegint.h added

/bin/sh ../../libtool --silent --mode=link --tag=CXX g++  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions -DQT_NO_STL -DQT_NO_COMPAT -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -Wall -Wformat-security    -o digikam -R /opt/kde/lib -R /usr/lib/qt-3.2.1/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt-3.2.1/lib -L/opt/kde/lib  -L/usr/lib -lImlib2 -lfreetype -lz -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib main.o -lqt-mt  -lz -ljpeg -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread -lkdecore -lkdeui  -lkio -lkparts -lkexif libdigikam.la
./.libs/libdigikam.so: undefined reference to `jcopy_block_row(short (*) [64], short (*) [64], unsigned)'
./.libs/libdigikam.so: undefined reference to `jpeg_set_colorspace(jpeg_compress_struct*, J_COLOR_SPACE)'
./.libs/libdigikam.so: undefined reference to `jround_up(long, long)'
./.libs/libdigikam.so: undefined reference to `jpeg_save_markers(jpeg_decompress_struct*, int, unsigned)'
./.libs/libdigikam.so: undefined reference to `jpeg_write_marker(jpeg_compress_struct*, int, unsigned char const*, unsigned)'
collect2: ld returned 1 exit status
make[2]: *** [digikam] Error 1
make[2]: Leaving directory `/u/media/slack91/cvs/kdeextragear-3/digikam/digikam'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/u/media/slack91/cvs/kdeextragear-3/digikam/digikam'
make: *** [all-recursive] Error 1
Comment 3 Renchi Raju 2004-09-30 17:52:09 UTC
what version of libjpeg do you have?
Comment 4 Renchi Raju 2004-09-30 17:52:37 UTC
*** Bug 90550 has been marked as a duplicate of this bug. ***
Comment 5 Renchi Raju 2004-09-30 19:51:16 UTC
CVS commit by pahlibar: 


some installations do not specify extern "C" in jpeglib.h which leads to 
linking problems.
CCMAIL: 90542-done@bugs.kde.org


  M +5 -3      transupp.cpp   1.2
  M +9 -8      transupp.h   1.2


--- kdeextragear-3/digikam/utilities/cameragui/transupp.cpp  #1.1:1.2
@@ -18,6 +18,9 @@
 #define JPEG_INTERNALS
 
+extern "C"
+{
 #include "jinclude.h"
 #include "jpeglib.h"
+}
 #include "transupp.h"           /* My own external interface */
 
@@ -733,5 +735,5 @@ trim_bottom_edge (j_compress_ptr dstinfo
 
 GLOBAL(jvirt_barray_ptr *)
-jtransform_adjust_parameters (j_decompress_ptr srcinfo,
+jtransform_adjust_parameters (j_decompress_ptr ,
                               j_compress_ptr dstinfo,
                               jvirt_barray_ptr *src_coef_arrays,
@@ -888,5 +890,5 @@ jcopy_markers_setup (j_decompress_ptr sr
 GLOBAL(void)
 jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
-                       JCOPY_OPTION option)
+                       JCOPY_OPTION )
 {
   jpeg_saved_marker_ptr marker;

--- kdeextragear-3/digikam/utilities/cameragui/transupp.h  #1.1:1.2
@@ -21,12 +21,4 @@
 #define TRANSUPP_H
 
-namespace Digikam
-{
-
-/* If you happen not to want the image transform support, disable it here */
-#ifndef TRANSFORMS_SUPPORTED
-#define TRANSFORMS_SUPPORTED 1          /* 0 disables transform code */
-#endif
-
 /* Short forms of external names for systems with brain-damaged linkers. */
 
@@ -40,4 +32,13 @@ namespace Digikam
 
 
+namespace Digikam
+{
+
+/* If you happen not to want the image transform support, disable it here */
+#ifndef TRANSFORMS_SUPPORTED
+#define TRANSFORMS_SUPPORTED 1          /* 0 disables transform code */
+#endif
+
+
 /*
  * Codes for supported types of image transformations.