Bug 147119 - Can't link against static libjasper, configure reports jasper is missing
Summary: Can't link against static libjasper, configure reports jasper is missing
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-23 11:06 UTC by Michał Kosmulski
Modified: 2017-08-20 09:25 UTC (History)
1 user (show)

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


Attachments
more precise warning (769 bytes, patch)
2007-07-04 11:25 UTC, Arnd Baecker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Kosmulski 2007-06-23 11:06:50 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Slackware Packages
Compiler:          gcc 4.1.2 
OS:                Linux

While compiling Digikam 0.9.2, if jasper (1.900.1 or 1.701.0) was compiled without --enable-dynamic (only static libraries are available), digikam's configure complains about libjasper not being installed ("WARNING: digiKam requires libjasper >= 1.7.0") and aborts.
Comment 1 caulier.gilles 2007-06-23 11:12:18 UTC
Michal,

This warning is given because the development package is not installed (witch include header file to compile)

Gilles Caulier
Comment 2 Arnd Baecker 2007-06-23 11:17:38 UTC
What do you suggest?
Should the warning be changed to
"WARNING: digiKam requires libjasper >= 1.7.0 (shared library version,
--enable-dynamic during configure of libjasper)"

Or should digiKam also accept a static library?
(Not sure if this would be a good option, personally I think
that libjasper should generate a shared library version
per default ...)

Note that this is also mentioned under:
  http://www.digikam.org/?q=download/dependencies
which it is linked from
  http://www.digikam.org/?q=download

Best, Arnd
Comment 3 Arnd Baecker 2007-06-23 11:19:32 UTC
Gilles, are you sure?

By default, installing libjasper only creates static libraries,
which are not recognized by digikam
(or has this changed?).

Arnd
Comment 4 Michał Kosmulski 2007-06-23 11:25:56 UTC
Yes, both in jasper 1.900.1 and 1.701.0 the default is static libraries only. It took me a while to find out what was wrong since on Slackware I had to compile this library from source (no packages for it in the distro) and I expected that the default options would work.
Comment 5 caulier.gilles 2007-06-23 11:33:13 UTC
Michal,

All linux distributions separate now binary and devel packages to optimize space used on host computer.

Binary package include shared library component witch is used to link with host program. It cannot be used alone to compile a program witch will use the library. This package is used to run a program already compiled witch use the library.

Development package is used to _compile_ the host program ! This is completly different. When you install bin package, generally devel package is not installed. The automake/autonconf script from digiKam test if devel package is installed, not the bin package. 

Look README file to check all depencies...

Gilles Caulier 
Comment 6 Arnd Baecker 2007-07-04 11:25:28 UTC
Created attachment 21036 [details]
more precise warning

The attached patch gives a more detailed explanation.
Full text in case of error after applying this patch:
 
 digiKam needs libjasper to support JPEG2000.
  You need to install the correct version (>= 1.7.0).
  Libjasper website is at http://www.ece.uvic.ca/~mdadams/jasper
  Important note: libjaspeer has to be configured with --enable-dynamic
  as otherwise the required dynamic libraries are not created.



Personally I think that this should be enough. There
is no need for digikam to work around configure choice of 3rd party software.
Comment 7 Michał Kosmulski 2007-07-04 18:21:30 UTC
Thanks, I think this should solve the problem for most people.
Comment 8 Arnd Baecker 2007-07-04 18:45:39 UTC
OK, I will ask that the patch gets applied (therefore re-opening until then).
Comment 9 Arnd Baecker 2007-08-30 13:26:44 UTC
Gilles, may I apply the patch (#6) and close this bug then?
Comment 10 caulier.gilles 2007-08-30 13:38:28 UTC
Arnd,

Yes of course.

Gilles
Comment 11 Arnd Baecker 2007-08-30 13:50:37 UTC
SVN commit 706424 by abaecker:

More detailed explanation when libjasper is not found. 
BUG: 147119


 M  +4 -1      configure.in.bot  


--- branches/extragear/kde3/graphics/digikam/configure.in.bot #706423:706424
@@ -62,8 +62,11 @@
 if test "x$have_jasper" != "xyes"; then
   echo "-- libjasper library found........ NO"
   echo ""
-  echo "digiKam needs libjasper to support JPEG2000. You need to install the correct version (>= 1.7.0)."
+  echo "digiKam needs libjasper to support JPEG2000. "
+  echo "You need to install the correct version (>= 1.7.0)."
   echo "Libjasper website is at http://www.ece.uvic.ca/~mdadams/jasper"
+  echo "Important note: libjaspeer has to be configured with --enable-dynamic"
+  echo "as otherwise the required dynamic libraries are not created."
   echo ""
   all_tests=bad
 else