AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.03.20 13:32 "[Tiff] bug #732 caused other problems in building (configure and libport.so*)", by Norihiko Murase
2005.03.22 10:35 "Re: [Tiff] bug #732 caused other problems in building (configure and libport.so*)", by Andrey Kiselev
2005.03.23 06:52 "Re: [Tiff] bug #732 caused other problems in building (configure andlibport.so*)", by Norihiko Murase

2005.03.20 13:32 "[Tiff] bug #732 caused other problems in building (configure and libport.so*)", by Norihiko Murase

Hi,

I found some problems in the latest version (3.7.2) caused by the modification for the bug #732:

    Bug 732 - configure --with-zlib-lib or --with-jpeg-lib fails in IRIX
    http://bugzilla.remotesensing.org/show_bug.cgi?id=732

The priginal problem <1> could be quickly fixed, but this fix caused the other problem <2>...

I tried to build this release (3.7.2) under the following environment:

    CPU: i386 family
    OS: FreeBSD 4.8-RELEASE
    Compiler: gcc-2.95.4 (/usr/bin/gcc)
    Linker: GNU ld 2.12.1 (/usr/bin/ld)

============================================================

<1> configure: NOT "-rpath/xxx/yyy" but "-rpath /xxx/yyy"

*** Problem

When I executed the configure script with --enable-rpath and --with-(jpeg|zlib)-*, it fails with the following message:

----------
checking for inflateEnd in -lz... no
configure: error: Zlib library not found at /usr/local/zlib/lib
----------

------------------------------------------------------------ *** Cause

tiff-3.7.2/config.log says
----------
configure:23179: checking for inflateEnd in -lz

configure:23209: gcc -o conftest -g -O2  -rpath/usr/local/zlib/lib -L/usr/local/zlib/lib  conftest.c -lz  -lm -lc  >&5

/usr/libexec/elf/ld: bad -rpath option
configure:23215: $? = 1
configure: failed program was:
----------

This means the wrong usage of the -rpath option; you should have INSERTED space characters between "-rpath" and the directory. Note that

  -R/path/to/dir... OK
  -R /path/to/dir... OK
  -rpath/path/to/dir... NG
  -rpath /path/to/dir... OK
under the GNU ld.

------------------------------------------------------------ *** Solution

Users should apply the following patch:

----------
--- configure.orig Wed Mar 16 00:42:19 2005
+++ configure Sun Mar 20 17:53:35 2005
@@ -23170,9 +23170,9 @@
   if test "x$with_zlib_lib_dir" != "x" ; then
     LDFLAGS="-L$with_zlib_lib_dir $LDFLAGS"

     if test "$HAVE_RPATH" = "yes"; then
- LDFLAGS="-rpath$with_zlib_lib_dir $LDFLAGS"
+ LDFLAGS="-rpath $with_zlib_lib_dir $LDFLAGS"
     fi

   fi

@@ -23463,9 +23463,9 @@
   if test "x$with_jpeg_lib_dir" != "x" ; then
     LDFLAGS="-L$with_jpeg_lib_dir $LDFLAGS"

     if test "$HAVE_RPATH" = "yes"; then
- LDFLAGS="-rpath$with_jpeg_lib_dir $LDFLAGS"
+ LDFLAGS="-rpath $with_jpeg_lib_dir $LDFLAGS"
     fi

   fi

----------

============================================================

<2> libport.* (tiff-3.7.2/port): Shared object is generated

*** Problem

It seems that adding -rpath options to LDFLAGS causes libtool to generate the shared object libport.so at tiff-3.7.2/port.

The library libport.* should have been linked statically, NOT dynamically; otherwise the tools built can't be used because this shared object is NOT installed at $(prefix)/lib.

============================================================

I'm happy if you give me any comments for solving this problem...

Thanks,

=====
Norihiko Murase
  @ The Univ. of Aizu
    The School of Computer Science and Engineering
    Department of Computer Software
---
E-mail: s1080224 [AT] u-aizu.ac.jp
        skeleten [AT] shillest.net