tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc gcc discussion #3874



coypu%sdf.org@localhost writes:

> sat down and did this
> I can pass GCC_REQD to secondary users
>
> for introspection try 'make show-buildlink3' (nice target)
>
> should probably figure out a clean way to do this, but with this change,
> adding BLNK_GCC.glib2= 55 passes to secondary users.
>
> Index: bsd.buildlink3.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
> retrieving revision 1.239
> diff -u -r1.239 bsd.buildlink3.mk
> --- bsd.buildlink3.mk	1 Aug 2017 05:48:12 -0000	1.239
> +++ bsd.buildlink3.mk	30 Dec 2017 19:20:26 -0000
> @@ -233,6 +233,9 @@
>         !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild))
>  _BLNK_DEPENDS+=	${_pkg_}
>  .  endif
> +.  if (!empty(BLNK_GCC.${_pkg_}))
> +GCC_REQD+=	${BLNK_GCC.${_pkg_}}
> +.  endif
>  .endfor
>  
>  # Add the proper dependency on each package pulled in by buildlink3.mk

This goes down the path of dynamically changing the version in use,
which leads to all sorts of combinations, and I think inevitably ends up
being unsound.  In the earlier discussion we ended up at the plan of
choosing not to do that.  We also wanted to avoid adding GCC_REQD to
packages when really they should specify c++11 or c++14 in most cases.

With your change, if A has GCC_REQD=6 in Makefile and in bl3
BLNK_GCC.pkg=6, then I can see that B which includes A/bl3 will get 6.
But what about C which includes B/bl3, but does not include A/bl3?

The point is that once you build some library with a higher version,
everything needs to use that version for linking.  And it's not
necessarily ok to mix.  So we get forced into "pick one version and use
it", which seems like it will clearly work, and clearly won't hurt much.
By not hurt much, I mean "if the system used for pkgsrc is gcc and it is
older than 4.9, then you have to build gcc".  Which is some cpu time,
but little brain time to chase issues.

The logic for how we have to end up at a single version is in
  https://wiki.netbsd.org/pkgsrc/gcc/
If you can spot a flaw, please point it out.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index