Subject: Re: libtool -export-symbols-regex
To: None <>
From: Manuel Bouyer <>
List: tech-pkg
Date: 03/21/2004 16:03:31
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Mar 21, 2004 at 01:25:50PM +0100, Manuel Bouyer wrote:
> Looking closed, the "-Wl,-M -Wl,.libs/" is
> changed to "-Wl,-M -Wl,.libs-L -lgdk_pixbuf-2.0exp" within .buildlink/bin/gcc.
> The problem seems to be in .buildlink/bin/.cache-trans:
> -Wl,.libs/       # /local/funk1/pkgbuild/x11/gtk2
> /work.funk/.buildlink/bin/gcc
>         cachearg="-Wl,.libs-L -lgdk_pixbuf-2.0exp"
> 	arg="$cachearg"; cachehit=yes
> 	;;
> These lines also appear in .cache-add-trans
> And this is where I'm lost: I didn't find how these lines where added to
> .cache-add-trans

OK, it's not in the Makefiles, it's bin/.logic*
I tracked it down to this part:
        arg=`$echo "X$qarg" | $Xsed -f /local/funk1/pkgbuild/x11/gtk2/work.funk/.buildlink/bin/.transform.sed`

The problem seems to be in .transform.sed.
In bin/.gen-transform, I see:
#       p:path                  translates "path/*/" into
#                                       "-Lpath/* -lfoo"

This looks like the culprit to me, this is what happens here.
We need to find a way to tell sed to ignore it if there's something after
the,, or
I adding a '$' in the sed regexp fixes this, but I don't know yet if this has
bad side effects.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: buildlink3/
RCS file: /cvsroot/pkgsrc/mk/buildlink3/,v
retrieving revision 1.26
diff -u -r1.26
--- buildlink3/	13 Mar 2004 03:41:13 -0000	1.26
+++ buildlink3/	21 Mar 2004 14:16:06 -0000
@@ -226,16 +226,16 @@
 		case "$action" in
 			@CAT@ >> $sedfile << EOF
-s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*\.[0-9]*|-L\1 -l\2|g
-s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*\.[0-9]*|-L\1 -l\2|g
-s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*|-L\1 -l\2|g
-s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*|-L\1 -l\2|g
-s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*|-L\1 -l\2|g
-s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*|-L\1 -l\2|g
-s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so|-L\1 -l\2|g
-s|\($2\)/lib\([^/$_sep]*\)\.so|-L\1 -l\2|g
-s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.dylib|-L\1 -l\2|g
-s|\($2\)/lib\([^/$_sep]*\)\.dylib|-L\1 -l\2|g
+s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*\.[0-9]*$|-L\1 -l\2|g
+s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*\.[0-9]*$|-L\1 -l\2|g
+s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*$|-L\1 -l\2|g
+s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*\.[0-9]*$|-L\1 -l\2|g
+s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so\.[0-9]*$|-L\1 -l\2|g
+s|\($2\)/lib\([^/$_sep]*\)\.so\.[0-9]*$|-L\1 -l\2|g
+s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.so$|-L\1 -l\2|g
+s|\($2\)/lib\([^/$_sep]*\)\.so$|-L\1 -l\2|g
+s|\($2/[^$_sep]*\)/lib\([^/$_sep]*\)\.dylib$|-L\1 -l\2|g
+s|\($2\)/lib\([^/$_sep]*\)\.dylib$|-L\1 -l\2|g