tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] Fixing the subtle python PLIST breakage on installing with an older version present
On Thu, 04 Apr 2019 at 22:26:35 +0200, Leonardo Taccari wrote:
> Hello Thomas,
> first, thank you very much for investigating and finally catching
> that!
>
> Dr. Thomas Orgis writes:
> > [...]
> > I propose the attached patch to fix this: Adding LD_PRELOAD on the
> > library to the variable that is intended to set up the environment
> to
> > run the built but not yet installed python.
> >
> > It worked for me with lang/python37. I suppose it is the
> same/similar
> > with all pythons down to python27. One migth even consider pushing
> this
> > upstream.
> >
> > Comments? Anybody willing to push this to CVS?
> > [...]
>
> Possible minor suggestion directly inline:
>
> > [...]
> > +.if ${OPSYS} == "Linux"
> > +SUBST_CLASSES+= usebuildlib
> > +SUBST_MESSAGE.usebuildlib= Preventing use of installed libpython.
> > +SUBST_STAGE.usebuildlib= pre-configure
> > +SUBST_FILES.usebuildlib= Makefile.pre.in
> > +SUBST_SED.usebuildlib= -e 's,^RUNSHARED= *,RUNSHARED=
> LD_PRELOAD=${WRKSRC:Q}/$$(INSTSONAME) ,'
> > +.endif
> > [...]
>
> Can it be adjusted to (WARNING: not tested!):
>
> .if ${OPSYS} == "Linux"
> SUBST_CLASSES+= usebuildlib
> SUBST_MESSAGE.usebuildlib= Preventing use of possible installed
> libpython.
> SUBST_STAGE.usebuildlib= pre-configure
> SUBST_FILES.usebuildlib= configure
> SUBST_SED.usebuildlib= -e
> '/RUNSHARED=LD_LIBRARY_PATH=/s,$,
> LD_PRELOAD=`pwd`/"$LDLIBRARY".$SOVERSION,'
> .endif
>
> In that way all @RUNSHARED@ occurencies will be adjusted
> (unfortunately
> we could not reuse $(INSTSONAME) because it's defined later).
>
> At least the configure logic in python27 is the same and probably
> applying this patch or something similar will probably also fix PR
> pkg/52766 and PR pkg/53312 (I have not investigated python3[4-6]
> though, but hopefully it's the same there too)!
This fixed the build of Python 2.7 and 3.7 for me on Fedora 29. (I also
just noted that in PR pkg/53312, though I'm not the original reporter
there.)
Dave
Home |
Main Index |
Thread Index |
Old Index