Return-Path: <tiff-bounces@remotesensing.org>
Received: from inav010.isp.belgacom.be (inav010.isp.belgacom.be [195.238.3.53])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9O7aqYO009764
        for <joris.at.lebbeke@skynet.be>; Sun, 24 Oct 2004 09:36:52 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas002.isp.belgacom.be (localhost [127.0.0.1])
        by inav010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9O7aj8W005911
        for <joris.at.lebbeke@skynet.be>; Sun, 24 Oct 2004 09:36:45 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx016.isp.belgacom.be (inmx016.isp.belgacom.be [195.238.2.219])
        by inas002.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9O7ag1L016897
        for <joris.at.lebbeke@skynet.be>; Sun, 24 Oct 2004 09:36:43 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx016.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9O7aY7T016522
        for <joris.at.lebbeke@skynet.be>; Sun, 24 Oct 2004 09:36:37 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 393B2407025; Sun, 24 Oct 2004 03:36:14 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from smtp.abelia.ocn.ne.jp (abelia.ocn.ne.jp [222.146.51.174])
	by xserve.flids.com (Postfix) with ESMTP id 3F8B5406FFE
	for <tiff@remotesensing.org>; Sun, 24 Oct 2004 03:36:12 -0400 (EDT)
Received: from SKELPC01 (p98-dna04aizuwakama.fukushima.ocn.ne.jp
	[211.122.191.98])
	by smtp.abelia.ocn.ne.jp (Postfix) with SMTP id 73BC63D3F
	for <tiff@remotesensing.org>; Sun, 24 Oct 2004 16:36:09 +0900 (JST)
Message-Id: <20041024163708.b7f4c%skeleten@shillest.net>
MIME-Version: 1.0
Date: Sun, 24 Oct 2004 16:37:08 +0900
X-Mailer: Denshin 8 Go V32.1.4.5
From: Norihiko Murase <skeleten@shillest.net>
To: tiff@remotesensing.org
Subject: [Tiff] [request] add --rpath
	for jpeg and zlib
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 04170bdd568ba2d5142b3e5b825ba6c8

Hi,
I tried building tiff-3.7.0 under the following environment:
    CPU: i386 family
    OS: FreeBSD 4.8-RELEASE
    Compiler: gcc-2.95.4 (/usr/bin/gcc)
However, the built tools (such as tiffsplit) load the shared
libraries jpeg and zlib INCORRECTLY!
    % ldd tiff-3.7.0/tools/.libs/tiffsplit
    tiff-3.7.0/tools/.libs/tiffsplit:
    	libtiff.so.3 => /usr/local/tiff/lib/libtiff.so.3 (0x28067000)
    	libz.so => /usr/lib/libz.so (0x280a9000)
    	libm.so.2 => /usr/lib/libm.so.2 (0x280b6000)
    	libc.so.4 => /usr/lib/libc.so.4 (0x280d1000)
They should have loaded /usr/local/zlib/lib/libz.so, NOT
that in /usr/lib.


I did build tiff-3.7.0 in the following method:
    [01]% gzip -cd tiff-3.7.0.tar.gz | gtar xf -
    [02]% cd tiff-3.7.0
    [03]% patch -p1 < ../patch_1
        The patch 'patch_1' is described at
        http://remotesensing.org/pipermail/tiff/2004-October/000620.html
    [04]% patch  < ../patch_2
        The patch 'patch_2' is described at
        http://remotesensing.org/pipermail/tiff/2004-October/000657.html
    [05]% ./configure \
            --prefix=/usr/local/tiff                        \
            --disable-old-jpeg                              \
            --with-zlib-include-dir=/usr/local/zlib/include \
            --with-zlib-lib-dir=/usr/local/zlib/lib         \
            --with-jpeg-include-dir=/usr/local/jpeg/include \
            --with-jpeg-lib-dir=/usr/local/jpeg/lib
    [06]% gmake

# NOTE that I specified the library path for jpeg and zlib.

The tools (such as tiffsplit) built in this method should
have loaded
    /usr/local/zlib/lib
However, the following libraries are loaded:
    /usr/lib/libz.so
as the above result of ldd command tells.


The solution for this problem is to add the --rpath option
when you build libtiff.so and the tools.
    -L/usr/local/jpeg/lib -Wl,--rpath -Wl,/usr/local/jpeg/lib
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    -L/usr/local/zlib/lib -Wl,--rpath -Wl,/usr/local/zlib/lib
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ... -ljpeg -lz -lm -Wl,--rpath -Wl,/usr/local/tiff/lib


P.S. Thank you very much for fixing the bug on the
     '--disable-old-jpeg' option in the configure script!!
       :-) :-)


---
Norihiko Murase <skeleten [AT] shillest.net>
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
