Subject: dependency on gcc3-c++ and gcc3-c too strict
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/10/2005 12:39:37
Yesterday, I needed fortran. It was installed, but for some reason, pkgsrc
wanted to use the latest and greatest version from pkgsrc. I stopped this
and forced it to use my old one (for fttw and it worked fine).

But my gcc3-c did get bumped to 3.3.5.

And today when building qt3-libs, it now forced me to update to
gcc3-c++-3.3.5. Well, I guess this is fine for my build system.

But maybe not fine for my system where I will be running the binaries.

Now my package has:

gcc3-c++>=3.3.5
gcc3-c>=3.3.5

But my non-pkgsrc (no pkgsrc builds) system has gcc3-c++-3.3.4 and
gcc3-c-3.3.4.

Now I see that I don't have any REQUIRES= or PROVIDES= for qt3-libs and
gcc3-c++. I see why. The bsd.pkg.mk checks for ^(bin|sbin|libexec)\/ and
^lib starting from front of line in .PLIST. I have changed it to use
(^|\/)  and will test and commit. Now back to my real issue ...

qt3/bin/moc requires libstdc++.so.5 and libgcc_s.so.1
and
qt3/lib/libqt-mt.so.3.0.3 requires libstdc++.so.5 and libgcc_s.so.1.

And gcc3-c++-3.3.5 provides gcc3/lib/libstdc++.so.5
and gcc3-c-3.3.5 provides gcc3/lib/libgcc_s.so.1.

And older version:

montecristo:~$ awk '/(^|\/)lib\/lib.*\.so\.[0-9]+$/' /var/db/pkg/gcc3-c*-3.3.4/+CONTENTS
gcc3/lib/libstdc++.so.5
gcc3/lib/libg2c.so.0
gcc3/lib/libg2c.so.0
gcc3/lib/libgcc_s.so.1
gcc3/lib/libstdc++.so.5
gcc3/lib/libstdc++.so.5


I believe that gcc-c and gcc3-c++ libraries from 3.3.4 are good enough to
work with packages built with 3.3.5.

How can the compiler.mk (or other) framework improve this so the

_GCC_DEPENDENCY=        gcc3-c>=${_GCC_REQD}:../../lang/gcc3-c
and
_GCC_DEPENDENCY+=       gcc3-c++>=${_GCC_REQD}:../../lang/gcc3-c++

(and maybe others) which end up at

DEPENDS+=       ${_GCC_DEPENDENCY}
.    else
BUILD_DEPENDS+= ${_GCC_DEPENDENCY}

are not so strict?



 Jeremy C. Reed

 	  	 	 open source, Unix, *BSD, Linux training
	  	 	 http://www.pugetsoundtechnology.com/