Subject: Re: Undesired buildlink2 <--> libtool interaction
To: Rene Hexel <rh@netbsd.org>
From: Julio Merino <jmmv@menta.net>
List: tech-pkg
Date: 10/29/2002 09:49:42
I've been experiencing this same problem in many packages... And, according
to buildlink2.txt:

    (7) We no longer mess around with libtool archives after the build
        process, so we don't accidentally trigger rebuilds of those files
        during the install process.

This should not happen :p

Regards

On 29 Oct 2002 18:34:49 +1000
Rene Hexel <rh@netbsd.org> wrote:

>   I've just been trying to convert the libgda package from PR 18660 from
> buildlink1 to buildlink2 and had an interesting experience:
> 
>   The package uses libtool to create a number of shared libraries and a
> main library, libgda, that uses some of the other libraries.  What
> happens is that the package links using something like
> 
> 
> libtool --mode=link cc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o libgda-2.la
> -rpath /usr/pkg/lib -version-info 1:1:0  *.lo  -Wl,--export-dynamic
> ../libsql/libgdasql.la <some_other_libs>
> 
> 
>   Due to this, libtool decides it needs to relink against libgdasql
> during install time.  Therefore, when 'make install' calls
> 
> 
>   libtool --mode install ${BSD_INSTALL_DATA} libgda-2.la /usr/pkg/lib
> 
> 
>   this includes performing a
> 
> 
>   cc -o libgda-2.so.1.1 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib ... -lgdasql
> 
> 
>   Without buildlink2, this works fine, because libgdasql has already
> been installed at its final location (/usr/pkg/lib) at this stage.
> 
>   With buildlink2, this won't work, because the 'cc' wrapper translates
> -L to point to the buildlink directory (which won't contain the freshly
> generated libgdasql, of course).
> 
>   Any ideas how such problems should be solved without ugly tricks like
> manually copying the library to the .buildlink directory during
> pre-install, or switching off buildlink in the install phase?
> 
>   Cheers
>       ,
>    Rene
> 
> 
> 


-- 
Julio Merino (http://jmmv.dyndns.org/) <jmmv@menta.net>